Skip to content

feat(chat): keep what the owner was writing when they switch chats - #127

Merged
httpsphl merged 1 commit into
mainfrom
feat/composer-drafts
Oct 2, 2026
Merged

httpsphl merged 1 commit into
mainfrom
feat/composer-drafts

Conversation

@httpsphl

@httpsphl httpsphl commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Why

If you typed something in a chat, went to another chat and came back, the text was gone.

What

  • Each bot has its own draft (app/src/features/chat/drafts.ts). The composer starts from that draft and updates it as you type. Sending clears it.
  • Drafts stay in memory only, while the app is open. Nothing goes to disk, because a message can carry personal data.
  • The composer is keyed by bot, so a draft or a "changes after this turn" note never shows in another bot's chat.
  • Files picked but not sent are still not kept.
  • Spec 15.1 updated.

Checks

  • New test: write to Scout, open Writer (empty), write there, back to Scout (text is back), send (cleared), Writer still has its own text.
  • pnpm check passes (287 tests).
  • Browser preview with the fake daemon: a draft for Scout came back after opening another bot and returning.

The composer text lived in component state, so going to another chat and
back lost it. Each bot now has its own draft, kept in memory while the
app is open (never on disk, since a message can carry personal data).
The composer is keyed by bot so drafts and pending notes do not leak
between chats. Files picked but not sent are still not kept.

Spec 15.1 updated.
@httpsphl
httpsphl enabled auto-merge October 2, 2026 20:41
@httpsphl httpsphl mentioned this pull request Oct 2, 2026
@httpsphl
httpsphl merged commit 452fe37 into main Oct 2, 2026
4 checks passed
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