Skip to content

Stash Remotes message drafts per thread - #209

Draft
simonhamp wants to merge 1 commit into
mainfrom
fix/stash-remote-drafts
Draft

simonhamp wants to merge 1 commit into
mainfrom
fix/stash-remote-drafts

Conversation

@simonhamp

Copy link
Copy Markdown
Member

A message you were writing in a Remotes thread was lost when you left the screen. Now the conversation composer stashes its text and photos as you type, like the reply bar on a commit does, and restores them when you open that thread again. Pushing the message, emptying the field or taking off the last photo forgets the draft. Signing out still clears it through Account::forget.

The stash names match what the web uses for the same drafts: remote:{username} for a direct thread and remote:org:{id} for an org.

Things to watch for:

  • The draft is forgotten as soon as the message is queued in the outbox. If devnull turns it down, the message already stays in the thread as rejected with a Retry, so it isn't put back in the composer the way a failed commit reply is.
  • Only text and photos are kept. The message being replied to isn't, which matches the web.
  • No "restored draft" label on the composer. The web doesn't show one for conversations either.
  • Picking an @mention suggestion changes the text without going through updatedDraft, so the stash catches up on the next keystroke. The commit reply bar behaves the same way.

Six new tests in RemotesComposerTest. Full suite: 2041 passed.

🤖 Generated with Claude Code

A message you were writing in a Remotes thread was lost as soon as you left
the screen. The composer now keeps its text and photos in the stash as you
type, the same way reply drafts on a commit are kept, and puts them back when
you open the thread again. Pushing the message or emptying the field forgets
the draft.

The stash names match the web's: remote:{username} for a person and
remote:org:{id} for an org. A push devnull turns down already stays in the
thread with Retry, so the draft is forgotten once the message is queued.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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