Skip to content

[Bug]: Mod+S while editing a queued message leaves the composer stuck in edit mode and the message still queued #44898

Done

Description

@imryanthedev

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Start a turn that runs long enough to queue a follow-up.
  2. Queue a follow-up message.
  3. Click the pencil on the queued message, so it opens in the composer ("Editing in the composer").
  4. Press Mod+S (Cmd+S on macOS) to stash the prompt.

Expected behavior

The edited message moves to the stash: the edit ends, the queued message leaves the queue, and the composer goes back to the draft it held before the edit.

Actual behavior

The edited text is stashed and the composer is emptied, but:

  • the composer stays in "Editing in the composer" mode, so you end up editing an empty queued message;
  • the queued message keeps its original text and stays in the queue, so it still sends after the stash has taken the edited copy.

The stash shortcut never checks for a queued-message edit. It stashes and clears the edit draft but never ends the edit (useComposerStash.ts, handleStashShortcut / stashCurrentPrompt).

Impact

Minor bug or occasional failure

Version or commit

Nightly 0.1.14-nightly.20261128 (also present in the code on main @ 981aeb5)

Environment

macOS desktop app connected to a remote Linux server

Screenshots, recordings, or supporting files

Queued message Editing it After Mod+S
Queued message Editing the queued message Empty composer still in edit mode

Workaround

Click Cancel after stashing, then remove the queued message with its X button.

Notes

A queued message can carry things the stash cannot hold: its already-uploaded attachments, and context records other than thread, machine and reply (terminal output, review comments, preview annotations) stay outside the composer draft while it is edited. Moving such a message to the stash would drop them, so a fix should leave the edit alone in that case rather than lose data.

Related, but a different bug: #15611 (a queued message sends its original text while it is being edited).

I opened #44881 to fix this.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions