Repository navigation
fix(ui): keep working claw below the first message - #157708
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 9:21 PM ET / September 25, 2026, 01:21 UTC (Revision 4). ClawSweeper reviewWhat this changesThe 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 provenancePossible 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 Review scores
Verification
How this fits togetherThe 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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -7, Tests +7. Total 0 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest 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. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
0753dff to
9e6e472
Compare
9e6e472 to
fca92f1
Compare
|
Merged via squash.
|
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
Working, Current inputinstead ofCurrent input, Working.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).chat-thread-live-final.test.tsretained distinct message-ordering, terminal continuity, collaborator attribution, and reader-anchor coverage. No dead or redundant cases required pruning.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.ee0e120a5c3b3cc54a1623682661f7c10cb64394, including the affected UI E2E typecheck.CI follow-through
The repaired head
0753dffpassed all nine UI E2E and three UI unit shards. Its full CI run exposed two failures outside the three changed UI files:104e67f55edc7dc38bb81420a95895f9edb77e9e, which waits for the actual terminal event. This is a source-changing prerequisite refresh, not an unchanged CI rerun.managed-service-handoff-helper-failedinstead 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 against229ab8a1fe957d3d4822309a39ddf9c7ec616395passed, 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
After