Skip to content

Take queued messages back in a Claude chat - #603

Open
thiblahute wants to merge 1 commit into
powerfooI:mainfrom
thiblahute:upstream/remove-queued
Open

thiblahute wants to merge 1 commit into
powerfooI:mainfrom
thiblahute:upstream/remove-queued

Conversation

@thiblahute

Copy link
Copy Markdown
Collaborator

Summary

Take a message queued for Claude back from its chat: out of the queue, or into the message box to edit.

Why

Since #553 the chat shows the messages queued for Claude at the end, marked Queued, but a message sent too early could only wait to be read. Claude Code's own prompt gives the queue back on Up.

What changed

  • AgentHistoryChat.tsx: in a pane's chat on a Claude pane, a queued message has a cross, which takes it out of the queue, and a pencil, which takes it into the box to edit.
  • AgentHistoryComposer.tsx, ComposerVimEditor.tsx: with messages queued, Up in the empty box (plain or with Vim keys) takes the whole queue back to edit.
  • AgentHistoryDrawer.tsx: Claude Code can only give its whole queue back to the prompt (Up, recorded as popAll). So Roamgate sends Up, waits for the popAll records, empties the prompt with Backspace and Delete (the cursor may be at either end; Ctrl+C and Esc would interrupt the agent) and sends the messages that stay queued again, in order. Only while the agent works: one that is done has taken its queue already, and sending the rest again would deliver them twice.
  • FEATURES.md: the cross, the pencil and Up.

Verification

  • bun test web/src/components/AgentHistoryChat.test.ts web/src/components/AgentHistoryComposer.test.tsx: new tests "a queued message can be taken back or edited when the chat allows it" and Up in the empty box with messages queued (and not with text in the box, nor without a queue); both fail on main.
  • bun run format:check, bun run lint (only the existing TerminalView.tsx warning), bun run typecheck:bun, bun run build:web, bun run test:quick with an isolated HOME/TMPDIR.
  • Asset budget: initial JS 832.3/833 KiB, gzip 256.7/257 KiB.

Manual checks

  • While Claude works, send two messages from its pane's chat, then take the first out with its cross: the second stays queued and Claude only reads the second.
  • Take a queued message back with its pencil: its text is in the box, the others stay queued, in order.
  • Up in the empty box: every queued message is back in the box.
  • Once Claude is done: the cross says it already took its queue, nothing is sent twice.

A queued message has a cross, which takes it out of the queue, and a
pencil, which takes it into the box to edit; Up in the empty box takes the
whole queue back to edit, as Up does in Claude Code's prompt.

Claude Code can only give its whole queue back to the prompt (Up, recorded
as popAll). So Roamgate sends Up, waits for the popAll records, empties the
prompt with Backspace and Delete (the cursor may be at either end; Ctrl+C
and Esc would interrupt the agent) and sends the messages that stay queued
again, in order. Only while the agent works: one that is done has taken its
queue already, and sending the rest again would deliver them twice.
@github-actions github-actions Bot added the enhancement New feature or request label Nov 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant