Skip to content

fix(ui): keep working claw below the first message - #157708

Merged
fuller-stack-dev merged 1 commit into
mainfrom
openclaw/fix-first-message-claw-20260924
Sep 25, 2026
Merged

fuller-stack-dev merged 1 commit into
mainfrom
openclaw/fix-first-message-claw-20260924

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes the working claw appearing above the first message when the Control UI restores an active run without a browser-local send record.

User Impact

The first message stays above its working indicator. Later queued messages remain below the active response. No configuration or migration is required.

Why This Change Was Made

The UI was relying on the browser outbox to recognize the active prompt, even though the Gateway already supplied the matching run ID. Match that authoritative run ID directly, without treating unrelated pending messages as active.

Evidence

  • The added queue-absent regression failed on the original code: Working, Current input instead of Current input, Working.
  • All 323 focused tests passed across chat-thread, pending-input, and live-terminal continuity coverage. The required single-file cost measurement (pnpm test ui/src/pages/chat/chat-thread-live-final.test.ts --maxWorkers=1) passed all 14 cases in 19.26 s wall time (Vitest 15.66 s; individual tests 0–7 ms).
  • Chromium proof exercised the real Control UI startup against an isolated mock Gateway: one first message, one working indicator, zero browser send requests, and no page errors. It reproduced the wrong order before and verified the correct order after.
  • Whole-file audit of chat-thread-live-final.test.ts retained distinct message-ordering, terminal continuity, collaborator attribution, and reader-anchor coverage. No dead or redundant cases required pruning.
  • Independent API-backed review, including the full touched test file: no actionable P0–P2 findings. The full changed-file gate (node scripts/check-changed.mjs --base b5cfc8dd9221e23c04f336555eb061a289ec5b4d) passed, including formatting, repository guards, six affected type-check graphs, UI typecheck, dead-code scans, and changed-file lint. The first GitHub run passed 73 other jobs but exposed the guest-question fixture defect described below; updated-head CI is pending.
  • CI fixture repair (now upstream, no longer in this PR diff): the guest-question E2E helper manually created admitted authority without a prepared role assignment, causing an authorization error followed by a 120 s registration timeout. It now uses the production authority-capture owner and releases that capture during cleanup. The unchanged reconnect/answer/cancel lifecycle passes (5.157 s test, 61.12 s full Vitest run); no assertions or timeouts were weakened. The complete helper and lifecycle test were audited; distinct coverage and private test state remain intact. The repair passed independent API-backed review (no actionable P0–P2 findings) and the complete changed-file gate against ee0e120a5c3b3cc54a1623682661f7c10cb64394, including the affected UI E2E typecheck.
  • Live Gateway deployment is outside this change and was not performed.

CI follow-through

The repaired head 0753dff passed all nine UI E2E and three UI unit shards. Its full CI run exposed two failures outside the three changed UI files:

  • Gateway node terminal delivery: unchanged standalone proof passed 2/2, and the original 58-file CI plan passed 812/812 on macOS/Node 24.20. The Linux/Node 24.21 failure was not reproduced. This branch now incorporates upstream #139131, commit 104e67f55edc7dc38bb81420a95895f9edb77e9e, which waits for the actual terminal event. This is a source-changing prerequisite refresh, not an unchanged CI rerun.
  • Managed-update cancellation concurrent with parent exit: the failed job returned managed-service-handoff-helper-failed instead of cancellation. All five unchanged cancellation-table cases passed locally with database paths validated before opening/spawning and every helper confined to task-private state; the concurrent-exit case took 255 ms. The Linux failure remains unexplained; a passing macOS replay is not a fix. No update source, assertion, timeout, or baseline was changed. Related update-owner work was checked and is not an established fix for this case.

Main then landed the Guest-question repair in 229ab8a, creating a conflict with this branch's equivalent fixture repair. The pending auto-merge request was cancelled through native recovery before rebasing. The duplicate fixture commit was dropped in favor of the upstream implementation; this PR now contains only the two-file claw-ordering fix and regression. Its remaining commit is patch-identical (git range-diff), and all chat-owner files and dependency manifests are unchanged across the incorporated main range. All 323 focused tests passed again on the refreshed candidate (12.23 s Vitest, 13.25 s wrapper). The previous whole-file audit, visual proof, and independent review remain applicable. The complete changed-file gate against 229ab8a1fe957d3d4822309a39ddf9c7ec616395 passed, including all six affected typecheck graphs, UI typecheck, repository guards, formatting, dead-export scans, and changed-file lint. New-head hosted CI and bot review remain required before landing; no pending gate is claimed as passed.

Before

Working indicator above the first message

After

First message above its working indicator

@clawsweeper

clawsweeper Bot commented Sep 24, 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.

@fuller-stack-dev
fuller-stack-dev marked this pull request as ready for review September 24, 2026 23:35
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 9:21 PM ET / September 25, 2026, 01:21 UTC (Revision 4).

ClawSweeper review

What this changes

The Control UI uses the active run ID to keep an accepted first message above its working indicator after a browser reload, and adds a regression for a missing local send record.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Keep open. Current main still requires a browser-local send record to place the active pending input, while the proposed fix has a focused regression and inspected visual proof.

Priority: P2
Reviewed head: fca92f1fa2533428190d2ff5c77222f3a403a4e1

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A narrow owner-level fix pairs an observable regression with direct before/after Control UI proof.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The PR body reports a Chromium Control UI startup against an isolated mock Gateway with an accepted first input and no local send; inspected before/after images show the working claw moving below that input, and the changed test exercises the same chat builder path. No stored-data contract changes.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The PR body reports a Chromium Control UI startup against an isolated mock Gateway with an accepted first input and no local send; inspected before/after images show the working claw moving below that input, and the changed test exercises the same chat builder path. No stored-data contract changes.
Evidence reviewed 8 items Introduced change: The PR replaces the local-queue prerequisite with an exact match between the accepted input and the active run ID.
Regression coverage: The added case supplies an accepted active input without a local queue entry and expects the message, working indicator, then later queued input.
Rendering path: The chat builder passes its current run ID into input placement and uses the resulting floor when inserting live output and the working indicator.
Findings None None.
Security None None.

How this fits together

The Gateway supplies active-run and pending-input state to the Control UI, which combines it with transcript history and browser-local sends. The chat thread builder orders the resulting messages, live output, and working indicator for display.

flowchart LR
A[Gateway active run] --> D[Chat thread builder]
B[Accepted pending input] --> D
C[Browser send queue] --> D
D --> E{Input matches active run?}
E --> F[Ordered message and working claw]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -7, Tests +7. Total 0 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 2 9 -7
Tests 1 11 4 +7
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 13 13 0

Review metrics

None.

Technical review

Best possible solution:

Keep the active input's display position tied to the matching Gateway run ID and retain the queue-absent ordering regression.

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

Yes. A restored active run with an accepted input and no browser-local send record follows a clear current-main path; the PR supplies a failing baseline regression and inspected before/after browser captures, though this read-only review did not rerun them.

Is this the best way to solve the issue?

Yes. The change repairs the existing chat placement owner using the run ID already supplied to it, without adding a second state source or changing Gateway behavior.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a visible chat-ordering defect with a limited Control UI impact.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body reports a Chromium Control UI startup against an isolated mock Gateway with an accepted first input and no local send; inspected before/after images show the working claw moving below that input, and the changed test exercises the same chat builder path. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body reports a Chromium Control UI startup against an isolated mock Gateway with an accepted first input and no local send; inspected before/after images show the working claw moving below that input, and the changed test exercises the same chat builder path. No stored-data contract changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body reports a Chromium Control UI startup against an isolated mock Gateway with an accepted first input and no local send; inspected before/after images show the working claw moving below that input, and the changed test exercises the same chat builder path. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 03405c3 adds ui/src/pages/chat/chat-thread-inputs.ts:101 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 03405c36ecad; files: ui/src/pages/chat/chat-thread-inputs.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 (3 earlier review cycles)
  • reviewed 2026-09-24T23:54:14.753Z sha ee0e120a5c3b3cc54a1623682661f7c10cb64394 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-25T00:12:59.562Z sha 0753dff38a37b3a6ca28f349ee45248353a83b32 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-25T00:54:44.194Z sha 9e6e472 :: needs maintainer review before merge. :: none

@fuller-stack-dev
fuller-stack-dev force-pushed the openclaw/fix-first-message-claw-20260924 branch from 9e6e472 to fca92f1 Compare September 25, 2026 01:11
@fuller-stack-dev
fuller-stack-dev merged commit 55b843f into main Sep 25, 2026
123 of 124 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the openclaw/fix-first-message-claw-20260924 branch September 25, 2026 02:33
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

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 P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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.

1 participant