Skip to content

[feat] canvas: withdraw a queued message and continue a stalled queue - #385

Draft
wtz2333 wants to merge 2 commits into
ThinkFlowLab:mainfrom
wtz2333:feat/midturn-composer-actions
Draft

wtz2333 wants to merge 2 commits into
ThinkFlowLab:mainfrom
wtz2333:feat/midturn-composer-actions

Conversation

@wtz2333

@wtz2333 wtz2333 commented Nov 17, 2026

Copy link
Copy Markdown

Summary

  • A queued bubble carries Withdraw next to its position. The removal goes through the same admission lock the chain takes when it picks the next message up, so it either disappears from the thread or the server answers 409 because it has already started and the reply has to be stopped instead. Another window watching the same chain drops the bubble on the retracted frame.
  • When messages are waiting and nothing is running — after a restart, or after a reply failed with the queue untouched — a banner above the composer shows how many are waiting and offers Continue, which starts the oldest one and reads its reply from the usual stream.
  • A cancelled message offers Edit again, which puts its text and references back in the composer, so it is sent deliberately with the settings the user sees rather than silently resent with stale ones.

Stacked on #383 (feat/midturn-queue-composer) and therefore on #381 (feat/midturn-queue): the withdrawals and the Continue button call endpoints added by #381 and #384. Please review #381, then #383, then this one; once those land I will rebase this on main and it will show only its own commit.

Linked issue

Refs #379

  • Refs #379 is included

Labels

  • Not applied: wtz2333 cannot add labels here. Suggested: type:feat, area:canvas, area:agent.

Test plan

Evidence that it works

  • Media attached, or N/A because: the composer changes are covered by the unit tests above; no recording was made here (no isolated API or browsers in this environment).

Provider verification

  • Real-provider calls are described honestly, or none were made: none; the tests replace fetch.

Bilingual UI

  • Both locales gain the same six keys: assistant.panel.retract, retractHint, refill, refillHint, waiting, proceed.

While a reply streams, the composer kept the draft but replaced Send with
Stop and Enter returned without a word, so a supplement could only be
typed in and lost. It is sent now: the server answers 202 with the queued
message, the log shows it as queued, and the same stream keeps feeding the
replies that follow until the chain ends.

Refs ThinkFlowLab#379
A message waiting behind the running reply showed its position but offered
no way to take it back, and a queue left behind by a failure or a restart
had no way to start again without retyping it.

A queued bubble now carries Withdraw, which removes it from the thread
under the same lock the chain takes when it picks the next message up. A
queue with nothing draining it shows a banner with the count and Continue,
which starts the oldest message and reads its reply from the usual stream.
A cancelled message offers Edit again, which puts it back in the composer so
it is sent deliberately rather than silently.

Refs ThinkFlowLab#379
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