Skip to content

fix(ui): unify disconnected chat queue state - #128701

Merged
vyctorbrzezowski merged 2 commits into
mainfrom
fix/queue-state-invariant
Aug 27, 2026
Merged

vyctorbrzezowski merged 2 commits into
mainfrom
fix/queue-state-invariant

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 24, 2026 •

Copy link
Copy Markdown
Member

Closes #128700

What Problem This Solves

After the composer queue landed in #127823, Control UI still projected two contradictory labels for one disconnected steer follow-up: the queue-mode badge said “Steer” while the delivery-state badge said “Waiting for reconnect”.

Why This Change Was Made

Delivery state is the stronger row-level fact. The queue renderer now shows the queue-mode badge only when no delivery-state label owns the row. The change stays at the presentation owner and does not alter Gateway behavior, delivery state, persistence, protocol, or configuration.

The current exact-run Stop behavior remains intact: its lifecycle owner can record abort intent while disconnected and replay it safely after reconnect.

User Impact

Disconnected queued follow-ups communicate one actionable state instead of displaying contradictory status badges.

Evidence

Rebased onto origin/main at f8ad31333bf77b3befd7f82e30ca1c425cb1b02f; exact PR head: bc4623b33ceb6775e7aaead0bf916f72e9d1d553.

Focused proof on the exact head:

  • node scripts/run-vitest.mjs ui/src/pages/chat/chat-composer-queue.test.ts --run - 24 passed.
  • node scripts/run-vitest.mjs ui/src/e2e/chat-flow.active-run-follow-ups.e2e.test.ts --run -t 'projects one disconnected state for an offline steer follow-up' - 1 passed.
  • Real Chromium with mocked Gateway - one row, one “Waiting for reconnect” badge, zero “Steer” badges, reconnect styling present, one initial chat.send, no second send. Screenshot and video were inspected and attached in the exact-head proof comment.
  • Fresh Codex autoreview with gpt-5.6-sol / high reasoning - clean, no actionable findings.
  • git diff --check origin/main...HEAD - passed.

Rank-up Moves

  • Applied: rebased onto current main and reran the focused owner and browser scenarios on the published head.
  • Applied: preserved the post-composer exact-run Stop behavior instead of restoring the stale connection gate.
  • No skips.

Review Metrics

Production LOC: +1/-1 (net 0). Tests: +42/-2 (net +40). Production remains net-neutral; the tests cover the single-label invariant at the renderer and operator-flow boundaries.

@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Aug 24, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 24, 2026
@clawsweeper

clawsweeper Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 3:11 AM ET / 07:11 UTC.

ClawSweeper review

What this changes

The PR changes Control UI queue rows so disconnected steering follow-ups display only the delivery-state badge, with renderer and mocked-browser regression coverage.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The patch correctly gives a non-null delivery label precedence over the steering-mode badge, and current main still has the pre-fix renderer behavior. This MEMBER-authored, maintainer-labeled PR should remain open for normal maintainer merge handling after exact-head checks finish.

Priority: P2
Reviewed head: bc4623b33ceb6775e7aaead0bf916f72e9d1d553
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A small owner-boundary repair with direct renderer and browser-boundary coverage, with no actionable patch defect found.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate; its exact-head comment nevertheless documents a Chromium and mocked-Gateway result.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate; its exact-head comment nevertheless documents a Chromium and mocked-Gateway result.
Evidence reviewed 7 items Pre-fix state conflict: Current-main-equivalent base code returns a reconnect delivery label for offline nonfailed rows, then independently marks every nonfailed steer row as steered, allowing both badges to render.
Narrow owner-boundary repair: The proposed predicate renders the steer badge only when no delivery-state label exists; it leaves queue admission, delivery state, persistence, and Gateway protocol unchanged.
Caller and delivery producer checked: The composer passes its offline fact to the renderer, while delivery admission writes waiting-reconnect when no Gateway client is connected; the repair consumes those existing facts rather than deriving a second delivery state.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs ui/src/e2e/chat-flow.active-run-follow-ups.e2e.test.ts --run -t 'projects one disconnected state for an offline steer follow-up'

Result: FAIL (failed) — step 1 expect_output 1 passed: expected terminal output was not visible within 30 seconds: "1 passed"

[test] starting test/vitest/vitest.ui-e2e.config.ts
[test] preflight test/vitest/vitest.ui-e2e.config.ts
[ui-e2e] Using system Chromium at /usr/bin/chromium-browser.
Downloading FFmpeg (playwright ffmpeg v1011) from https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/1011/ffmpeg-linux.zip
|                                                                                |   0% of 2.3 MiB
|■■■■■■■■                                                                        |  10% of 2.3 MiB
|■■■■■■■■■■■■■■■■                                                                |  20% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■                                                        |  30% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                                |  40% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                        |  50% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                |  60% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                        |  70% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                |  80% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■        |  90% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■| 100% of 2.3 MiB
FFmpeg (playwright ffmpeg v1011) downloaded to /tmp/clawsweeper-live-proof-128701-bpE65J/profile/cache/ms-playwright/ffmpeg-1011

 RUN  v4.1.11 /tmp/clawsweeper-live-proof-128701-bpE65J/target

Assertions:

  • FAIL expect_output: 1 passed

How this fits together

The Control UI projects Gateway connection and queued-send state into chat composer rows. The queue renderer receives those facts and produces the badges and controls an operator sees.

flowchart LR
  A[Gateway connection state] --> C[Composer queue]
  B[Queued send state] --> C
  C --> D[Queue row renderer]
  E[Steering mode] --> D
  D --> F[Delivery-state badge]
  D --> G[Steering badge]
  F --> H[Operator-visible queue row]
  G --> H
Loading

Decision needed

Question Recommendation
Should a maintainer merge this exact reviewed head once the remaining exact-head checks complete? Merge after checks complete: Merge the reviewed head when GitHub’s required checks are green and mergeability remains clean.

Why: The patch has no supported correctness blocker, but MEMBER authorship and the maintainer label require explicit maintainer handling rather than automated cleanup.

Before merge

  • Complete next step (P2) - No repair lane is needed: the review found no actionable defect, and this protected maintainer PR follows the normal merge path.
Agent review details

Security

None.

PR surface

Source 0, Tests +40. Total +40 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 2 42 2 +40
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 43 3 +40

Review metrics

Metric Value Why it matters
Production vs test LOC production +1/-1 (net 0); tests +42/-2 (net +40) The bug fix is absorbed into the existing renderer predicate, while added coverage protects both the badge invariant and the disconnect flow.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #128700
Summary: This PR is the concrete candidate fix for the linked disconnected queue-state bug.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep delivery-state precedence in the queue renderer and merge this focused repair once the exact reviewed head satisfies the repository’s normal merge gates.

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

Yes, source establishes the path: an offline steer row receives a reconnect delivery label and previously also received a Steer badge; current main is unchanged on this surface.

Is this the best way to solve the issue?

Yes. The renderer is the presentation owner, and making an existing delivery label suppress the secondary steering badge preserves normal idle steering without changing transport behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1d872fe87ea0.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.
  • remove proof: 🎥 video: Current real behavior proof evidence kind is not_applicable.

Label justifications:

  • P2: This is a bounded Control UI correctness repair that removes confusing disconnected queue state without changing message delivery.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate; its exact-head comment nevertheless documents a Chromium and mocked-Gateway result.

Evidence

What I checked:

Likely related people:

  • vyctorbrzezowski: Authored the merged composer-queue feature that owns this renderer and the focused follow-up. (role: recent queue feature contributor; confidence: high; commits: 18beca535036, bc4623b33ceb; files: ui/src/pages/chat/components/chat-composer-queue.ts, ui/src/pages/chat/chat-composer-queue.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-08-24T11:34:35.407Z sha 415c02e :: needs changes before merge. :: [P2] Keep volatile sends actionable after reconnect
  • reviewed 2026-08-24T12:16:05.746Z sha 415c02e :: needs changes before merge. :: [P2] Keep volatile sends retryable after reconnect
  • reviewed 2026-08-24T14:28:41.830Z sha 61d0039 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-25T15:59:55.793Z sha 61d0039 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-26T14:44:04.841Z sha 714745c :: needs maintainer review before merge. :: none

@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 24, 2026
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 24, 2026
@clawsweeper clawsweeper Bot removed the proof: 🎥 video Contributor real behavior proof includes video or recording evidence. label Aug 25, 2026
@vyctorbrzezowski
vyctorbrzezowski force-pushed the fix/queue-state-invariant branch 2 times, most recently from 9443917 to 714745c Compare August 26, 2026 14:37
@clawsweeper clawsweeper Bot added proof: 🎥 video Contributor real behavior proof includes video or recording evidence. and removed merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Aug 26, 2026
@vyctorbrzezowski
vyctorbrzezowski force-pushed the fix/queue-state-invariant branch from 714745c to bc4623b Compare August 27, 2026 07:00
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 27, 2026 07:03
@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Exact-head browser proof

Validated bc4623b33ceb6775e7aaead0bf916f72e9d1d553 through the mocked Gateway and real Chromium flow. After disconnecting an active run and submitting a steer follow-up, the visible queue contains one row with one Waiting for reconnect badge, no Steer badge, reconnect styling, and no second chat.send request.

Disconnected queue shows one delivery-state badge

queue-state-bc4623b.mp4

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. labels Aug 27, 2026
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Land-ready verification

Exact head: bc4623b33ceb6775e7aaead0bf916f72e9d1d553

  • Full owner/caller/callee/sibling review: no blocking findings; best fix is the net-neutral renderer predicate.
  • Fresh Codex autoreview (gpt-5.6-sol, high): clean.
  • Focused renderer test: 24 passed.
  • Mocked-Gateway Chromium regression: 1 passed; screenshot/video inspected in the proof comment above.
  • Exact-head CI: green, https://github.com/openclaw/openclaw/actions/runs/33048176490
  • Exact-head ClawSweeper: no findings; no rank-up moves remain.
  • Production LOC: +1/-1 (net 0). Tests: +42/-2.
  • Native review artifacts validated and OPENCLAW_TESTBOX=1 scripts/pr prepare-run 128701 passed.

Known proof gaps: none.

@vyctorbrzezowski
vyctorbrzezowski merged commit dff2d26 into main Aug 27, 2026
170 checks passed
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

@vyctorbrzezowski
vyctorbrzezowski deleted the fix/queue-state-invariant branch August 27, 2026 07:23
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 28, 2026
* fix(ui): unify disconnected chat queue state

* fix(ui): keep volatile sends retryable after reconnect
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 maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Chat steering queue shows contradictory state while disconnected

1 participant