Skip to content

feat: persist message drafts in localStorage per conversation/thread - #118

Merged
Ali1raz merged 1 commit into
mainfrom
feat/message-draft-persistence
Nov 14, 2026
Merged

Ali1raz merged 1 commit into
mainfrom
feat/message-draft-persistence

Conversation

@Ali1raz

@Ali1raz Ali1raz commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add reusable useDraft hook (ui-sdk storage) to save/restore/clear in-progress message text.
  • Debounced writes (300ms) with immediate removal on empty field.
  • Unmount flush so switching threads doesn't lose the pending draft.
  • Clear draft on successful send/update; preserve on failure.
  • Per-channel/team/thread draft keys so drafts stay separate.

Test plan

  • Type in channel composer, refresh page → draft restored.
  • Switch channels → each keeps its own draft.
  • Send message → draft cleared.
  • Failed send → draft preserved.
  • Type in thread reply, switch threads and back → draft preserved.

@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
team-flow Ready Ready Preview Nov 14, 2026 10:45am UTC

@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e0b5df4e-2a27-4c88-bf33-8e9402ff58a7
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@Ali1raz Ali1raz left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@Ali1raz
Ali1raz merged commit da5c4df into main Nov 14, 2026
4 checks passed
@Ali1raz
Ali1raz deleted the feat/message-draft-persistence branch November 14, 2026 10:45

This branch was successfully deployed

1 active deployment
Preview — ff7b6bc1 Deployed Nov 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant