Skip to content

fix(ui): pause queued messages after Stop - #192250

Merged
vyctorbrzezowski merged 5 commits into
mainfrom
openclaw/sharp-crayfish-2
Nov 4, 2026
Merged

vyctorbrzezowski merged 5 commits into
mainfrom
openclaw/sharp-crayfish-2

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Pressing Stop while messages wait in the composer queue previously sent the next queued message as soon as the aborted run ended. The aborted terminal event drained the queue just like final.

Solution

Stop parks the rows waiting when it was pressed.

  • handleAbortChat records never-attempted queued rows before the abort request, because the terminal event can beat its response. This covers Stop, Esc, typed stop and /stop.
  • chat-queue-pause.ts keys those rows by Gateway owner and conversation scope, shared across panes. drainStoredChatOutbox skips parked rows unless the user explicitly retries, steers or saves an edit.
  • Messages submitted after Stop are not parked, including a correction typed before the abort settles.
  • A row above the queue reads Queue paused · You stopped the run. Clear discards parked rows; Resume releases them in order. The notice disappears once the parked rows are gone.
  • The notice uses the queue rows' icon column and text inset. Both actions now use neutral muted text and icons, a neutral text hover state and a soft hover surface—no accent/red foreground or filled pill. The secondary reason truncates first on narrow widths.

Normal completion, errors and Gateway-side aborts keep draining as before.

Accepted edge cases

  • The pause is in memory per tab; reloads and other tabs do not preserve it.
  • If the abort request fails, the rows remain parked behind a visible Resume.
  • Gateway-held follow-ups retain the Gateway's existing Stop policy; this parks browser-held rows only.

Latest color correction — validation blocked

At Vyctor's request, 7cbbc8353bbc3f93662b20be3206da1761e682b7 adds .chat-queue__resume to Clear's neutral default and hover selectors. No layout or behavior changes.

Source inspection confirms both selectors use the same neutral theme tokens. Fresh light/dark screenshots and local checks could not finish: the execution service repeatedly stalled and reported child-cleanup hard-deadline failures. Both the full E2E runner and a focused component-browser route were attempted. Temporary capture fixtures were restored. The screenshots and passing checks below are prior-revision evidence, not validation of the neutral-color follow-up. Updated visual verification remains outstanding.

Earlier behavior and layout evidence

Before: Stop auto-sent the first queued follow-up.

Before: queued message auto-sent after Stop

Earlier layout, light theme (Resume still accented in this prior capture):

Earlier layout: paused queue, light

Earlier layout, dark theme:

Earlier layout: paused queue, dark

Earlier layout, 390px wide:

Earlier layout: paused queue, narrow

Earlier full page:

Earlier layout: paused queue in the page

Prior-revision proof:

  • New parks queued follow-ups after Stop until Resume sends the next one E2E checks that Stop parks two rows, a correction typed before abort settles still sends, the pause outlasts that run, and Resume sends the first parked row. It failed on base and passed with the behavior change.
  • Light/dark/390px screenshots were inspected at 2x scale; icon and text columns matched the queue rows.
  • Four E2E files passed (32 tests): chat-flow.active-run-follow-ups, chat-flow.queue-edit, chat-flow.queue-reorder, chat-run-lifecycle.
  • Related unit tests passed: chat-composer-queue (unit/browser), run-lifecycle.abort, chat-outbox-reconnect, chat-pane-stop, chat-send-abort.
  • Prior checks passed: UI and UI-test typechecks, touched-file oxlint, stylelint, controller checks, i18n verification, formatting and git diff --check.
  • Docs: docs/web/control-ui/chat.md (Stop and abort).

Worked on by

roboclaw-bot and others added 2 commits November 3, 2026 20:32
Stop parks the composer rows waiting at that moment, so the aborted run no
longer starts the next queued turn. A paused row above the queue offers
Resume and Clear; messages sent after Stop are not parked.

Co-authored-by: vyctorbrzezowski <[email protected]>
Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: d82c088a-1691-4577-a551-21ca3c06bbe8
@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: M labels Nov 3, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 3, 2026
@clawsweeper

clawsweeper Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR pauses browser-held messages when Stop is pressed and adds Resume and Clear controls.

Example: Two follow-ups, “Check the logs” and “Summarize the results,” are queued when the user presses Stop.

  • Before: The first follow-up starts automatically after the aborted run ends.
  • After: Both follow-ups remain paused until an explicit action, while newly submitted messages can proceed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful, owner-directed behavior with inspected visual evidence, but queue recovery and patch-specific validation failures prevent a passing review.
Proof confidence 🦐 gold shrimp (3/6) This collaborator-authored PR is outside the ordinary contributor proof gate; inspected before/after browser screenshots show the queue presentation change, while the mocked-Gateway regression supplies supporting execution evidence with the CI failure recorded above.
Patch quality 🦪 silver shellfish (2/6) 4 actionable review findings remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Pressing Stop can immediately start another turn from an older browser-held follow-up.
Reason: The maintainer-authored direction gives Stop a visible, recoverable pause while retaining new sends and the existing server cancellation boundary.

Merge readiness

⛔ Needs changes before merge - 4 items remain

Keep open: this maintainer-authored PR addresses unwanted queue restarts, but explicit-send recovery and three patch-related CI failures need repair.

Priority: P2
Reviewed head: e5723bd7af4f48e45465d80b0c605117c2e270f3

Before merge

  • Release a paused row when an explicit send takes custody (P2) - Pause two rows, explicitly Steer one, then lose the connection before its acknowledgment. The explicit action admits the original row ID once, but neither retryQueuedChatMessage nor delivery removes that ID from parkedRows. After the fresh admission is consumed, reconnect and scheduled recovery hit this filter and skip the attempted row indefinitely until the user resumes the whole queue or reloads. Release that individual pause when the explicit action takes custody, so its existing reconnect/reconciliation path can continue while the other rows stay paused.
  • Defer the abort response before asserting the correction is queued (P2) - This test says the correction is submitted before abort settles, but the default mock answers chat.abort immediately and commits the session as killed. By the time the correction is submitted, it can send immediately instead of remaining a visible queue row. Exact-head CI times out at line 672 on that locator. Use the existing deferred-response fixture before clicking Stop, then explicitly settle the response and terminal event after the queued-correction assertion.
  • Account for the added regression in the test-line allocation (P2) - The new regression adds 52 test lines without a matching allocation or offset, and the exact-head baseline-ratchet check identifies test-lines as failing. The repository's test-cost policy requires a separate justified allocation for necessary regression growth. Add the focused allocation for the retained test, or offset its growth through justified consolidation, without raising the shared baseline.
  • Fit the pause controls within the existing CSS budget (P2) - The added pause-control stylesheet grows total CSS beyond the performance gate's permitted variance. Exact-head CI reports both raw and gzip totals exceeding their limits and explicitly notes that the already-over-budget base permits only 64 bytes of additional variance. Reuse existing control styles or offset the added CSS within this surface so control-ui-performance passes without increasing its budget.

Findings

  • [P2] Release a paused row when an explicit send takes custody — ui/src/pages/chat/chat-outbox-drain.ts:177-178
  • [P2] Defer the abort response before asserting the correction is queued — ui/src/e2e/chat-flow.active-run-follow-ups.e2e.test.ts:663-664
  • [P2] Account for the added regression in the test-line allocation — ui/src/e2e/chat-flow.active-run-follow-ups.e2e.test.ts:645-646

Tests

  • Missing end-to-end proof: The supplied screenshots do not show reconnect recovery after explicitly sending a paused row, and current-head CI does not complete the new Stop/correction/Resume regression.
Agent review details

How this fits together

The Control UI outbox owns browser-held chat inputs; composer actions and Gateway lifecycle events wake its drain, which submits eligible rows through chat.send.

flowchart TD
  A[Composer and Stop] --> B[Shared browser outbox]
  A --> C[Paused row identities]
  C --> D[Outbox drain]
  B --> D
  E[Resume or explicit send] --> D
  D --> F[Gateway chat send]
  F --> G[Lifecycle events]
  G --> D
Loading

Technical review

Best possible solution:

Keep row-specific pauses in the shared outbox flow, release individual rows on explicit submission, and repair the focused browser test and budget failures.

Do we have a high-confidence way to reproduce the issue?

Current-main terminal-event handling wakes an unpaused outbox drain, establishing the reported path in source; supplied screenshots corroborate the visible before/after behavior, and no target code was executed during review.

Is this the best way to solve the issue?

A row-specific pause preserves newly submitted corrections and existing Gateway cancellation semantics, but explicit submission must permanently release that row from the pause rather than temporarily bypass it.

Full review comments:

  • [P2] Release a paused row when an explicit send takes custody — ui/src/pages/chat/chat-outbox-drain.ts:177-178
    Pause two rows, explicitly Steer one, then lose the connection before its acknowledgment. The explicit action admits the original row ID once, but neither retryQueuedChatMessage nor delivery removes that ID from parkedRows. After the fresh admission is consumed, reconnect and scheduled recovery hit this filter and skip the attempted row indefinitely until the user resumes the whole queue or reloads. Release that individual pause when the explicit action takes custody, so its existing reconnect/reconciliation path can continue while the other rows stay paused.
    Confidence: 0.98
  • [P2] Defer the abort response before asserting the correction is queued — ui/src/e2e/chat-flow.active-run-follow-ups.e2e.test.ts:663-664
    This test says the correction is submitted before abort settles, but the default mock answers chat.abort immediately and commits the session as killed. By the time the correction is submitted, it can send immediately instead of remaining a visible queue row. Exact-head CI times out at line 672 on that locator. Use the existing deferred-response fixture before clicking Stop, then explicitly settle the response and terminal event after the queued-correction assertion.
    Confidence: 0.99
  • [P2] Account for the added regression in the test-line allocation — ui/src/e2e/chat-flow.active-run-follow-ups.e2e.test.ts:645-646
    The new regression adds 52 test lines without a matching allocation or offset, and the exact-head baseline-ratchet check identifies test-lines as failing. The repository's test-cost policy requires a separate justified allocation for necessary regression growth. Add the focused allocation for the retained test, or offset its growth through justified consolidation, without raising the shared baseline.
    Confidence: 0.98
  • [P2] Fit the pause controls within the existing CSS budget — ui/src/styles/chat/composer-queue-content.css:52-57
    The added pause-control stylesheet grows total CSS beyond the performance gate's permitted variance. Exact-head CI reports both raw and gzip totals exceeding their limits and explicitly notes that the already-over-budget base permits only 64 bytes of additional variance. Reuse existing control styles or offset the added CSS within this surface so control-ui-performance passes without increasing its budget.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 259fdd26fbd6.

Provenance checked

  • Outbox selection and reconnect recovery keeps the original intent (11cb698: Reconcile pending sends automatically after reconnect rather than requiring users to decide whether delivery occurred.)
  • Fresh active-run follow-ups keeps the original intent (cc1ab7a: Allow fresh direct follow-ups to bypass older queued rows while preserving explicit queue ordering.)
  • Stop request preparation keeps the original intent (543dd39: Stop cancels unsent startup work while dispatched operations retain their original result and idempotency identity.)
  • Queue presentation keeps the original intent (07384e0: Move composer presentation to Solid while plain TypeScript owners retain queue authority and stable row interactions.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test:ui:e2e ui/src/e2e/chat-flow.active-run-follow-ups.e2e.test.ts ui/src/e2e/chat-flow.queue-edit.e2e.test.ts ui/src/e2e/chat-flow.queue-reorder.e2e.test.ts ui/src/e2e/chat-run-lifecycle.e2e.test.ts
  • pnpm test ui/src/pages/chat/chat-outbox-reconnect.test.ts ui/src/pages/chat/run-lifecycle.abort.test.ts ui/src/pages/chat/chat-send-abort.test.ts
  • pnpm tsgo:ui
  • pnpm lint:ui:styles
  • Pass checks-fast-baseline-ratchets and control-ui-performance on the repaired head.

What I checked:

PR surface

Source +206, Tests +52, Docs +1. Total +259 across 12 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 10 217 11 +206
Tests 1 52 0 +52
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 270 11 +259

Labels

Label changes:

  • add P2: This affects queued Control UI follow-ups and has a focused repair boundary.
  • add merge-risk: 🚨 message-delivery: An explicitly steered paused message can remain excluded from reconnect recovery after its initial admission is consumed.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: This affects queued Control UI follow-ups and has a focused repair boundary.
  • merge-risk: 🚨 message-delivery: An explicitly steered paused message can remain excluded from reconnect recovery after its initial admission is consumed.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 3, 2026, 3:52 PM ET / 20:52 UTC.

roboclaw-bot and others added 3 commits November 3, 2026 21:19
Rebuild the Stop pause notice on the queue row grid: same icon column and
text inset, two-tone "Queue paused · You stopped the run" copy, solid pause
and play glyphs, and Clear/Resume using the existing row action style.

Co-authored-by: vyctorbrzezowski <[email protected]>
Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 9c0bc654-be5f-443a-80ad-0b640243f54e
Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 527eeb0b-2fb7-468a-9974-7f278e2af353
@vyctorbrzezowski
vyctorbrzezowski merged commit 51071fc into main Nov 4, 2026
90 of 93 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the openclaw/sharp-crayfish-2 branch November 4, 2026 12:50
steipete added a commit that referenced this pull request Nov 4, 2026
Keep distinct route, ordering, trigger, publication, custody, and fixture-lifecycle contracts from #192769, #192540, #192250, #192812, #191643, #192584, #192588, and #192083. Raise only the scalar by the exact measured inherited deficit; production and test LOC remain unchanged.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 5, 2026
fix(ui): pause queued messages after Stop

Co-authored-by: vyctorbrzezowski <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 5, 2026
Keep distinct route, ordering, trigger, publication, custody, and fixture-lifecycle contracts from openclaw#192769, openclaw#192540, openclaw#192250, openclaw#192812, openclaw#191643, openclaw#192584, openclaw#192588, and openclaw#192083. Raise only the scalar by the exact measured inherited deficit; production and test LOC remain unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants