Repository navigation
fix(control-ui): align reload fixtures with subscribed history - #183832
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR serves initial history through mock subscriptions and updates browser tests and reload instrumentation to recognize that transport. Example: Open agent:ops:notes with the transcript “Cached conversation.”
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs a current fixture mismatch, resolves all three prior findings, and introduces no new actionable defect. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe browser fixture supplies simulated Gateway responses to the real Control UI, while the reload probe observes responses and records transcript catch-up milestones. flowchart LR
Browser[Control UI browser] --> Subscription[Message subscription]
Subscription --> Fixture[Subscription fixture]
Fixture --> Startup[Existing startup response owner]
Startup --> History[Initial history receipt]
History --> Browser
History --> Probe[Reload milestone probe]
Technical reviewBest possible solution: Use the existing startup-response owner for subscription history while preserving explicit standalone-fallback tests and transport-aware assertions. Do we have a high-confidence way to reproduce the issue? Source establishes that main omits requested subscription history despite the Gateway contract; the PR reports red-on-base regressions, and exact-head CI passes without running target code during this review. Is this the best way to solve the issue? The change reuses existing response and subscription owners, preserves fallback controls, and adds focused contracts for nested success, failure, cursor selection, and observer-only responses. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 201127429a03. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 25, 2026, 6:22 PM ET / 22:22 UTC (Revision 2). |
684a659 to
403a89a
Compare
|
Addressed all three P2 findings on Exact-head CI is green. AWS @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
403a89a to
259dd12
Compare
…claw#183832) The Control UI mock Gateway answered sessions.messages.subscribe with only the canonical key, even when the request asked for initialHistory. Since openclaw#182846 the real Gateway returns the initial transcript inside the subscription reply, so the fixture forced a fallback chat.startup round trip that production no longer makes. Every reload benchmark and browser test therefore measured an outdated request chain. The mock subscription now builds initialHistory from the existing startup-response owner when requested, matching the Gateway contract. Scenarios that exercise the separate chat.startup fallback opt in with subscriptionInitialHistory: false. Browser tests wait on subscription readiness instead of the removed standalone history request, and the warm-reload probe recognizes the subscribed-history transport. Test and tooling only; no runtime code changes. Exact-head CI green; focused fixture and probe tests plus native e2e of the rebased files pass; full AWS UI suite earlier: 3,275 passed, 2 failures reproduced on main.
What Problem This Solves
The Control UI browser fixture omits requested initial history from
sessions.messages.subscribe, forcing reload tests and the cold-load benchmark through a standalonechat.startuprequest that the current Gateway no longer needs.The campaign baseline records 14 visible states during a signed-in dashboard deep-link reload. A faithful history transport is a prerequisite for measuring improvements to that sequence.
User Impact
Test and benchmark fidelity only. No deployed runtime, Gateway protocol, or cache-shape change; no warm-reload performance improvement is claimed in this prerequisite PR.
Why This Change Was Made
Subscription history now uses the existing startup-response owner, including configured transcripts, cursor-selected responses, durable input receipts, and nested history failures.
subscriptionInitialHistory: falseexplicitly selects the standalone fallback in tests that control its delay, error, or request count. Normal readiness and history-count assertions follow initial history delivered through subscribe or standalone startup during same-connection navigation; approval upgrades remain excluded from history counts.The recovered-search test enters chat through the sidebar after the existing roster-ready boundary, retaining its single full-message read and search assertions. This isolates search from a separately observed boot-time scope transition (details below).
The old key-only default is removed. Static transcript overrides and subscription response packaging live in their existing fixture owners, keeping the large fixture module below its line-cap ratchet. The warm-reload probe now recognizes catch-up delivered inside subscribe while ignoring observer-only replies.
Evidence
Rebased onto main
8ebe2147e41fat head259dd129e79629f21963e8f90d8842a81ddf8151. The copy-test conflict retains main’s scroll setup and uses subscribe readiness. Main’s auto-merged dictation, reverse-tab, message-action, and video-gallery setup stays intact. The newly added ordinaryaction-foregroundstartup wait now waits for the foreground subscription; explicit fallback scenarios retainsubscriptionInitialHistory: false. No runtime code changed.cbx_129652986dc4(requested c7a.4xlarge; quota fallback t3.small), exact head259dd129e79629f21963e8f90d8842a81ddf8151--maxWorkers=1on Hetznercbx_fdda12bf1694(ccx33, Node 26.12.1, Chromium 1248), exact head259dd129e79629f21963e8f90d8842a81ddf8151; native runner duration 151.55 s259dd129e79629f21963e8f90d8842a81ddf8151: run 40247731398. No red checks to classifyinitialHistoryis absent403a89aa29b381a6e391fd6ae44702d57b1fa580;pnpm test ui/src/test-helpers/control-ui-e2e.sessions.test.ts --maxWorkers=1wall time 5.64 s403a89aa29b381a6e391fd6ae44702d57b1fa580;pnpm test ui/src/test-helpers/control-ui-transcript-paint.browser.test.ts --maxWorkers=1wall time 2.67 s403a89aa29b381a6e391fd6ae44702d57b1fa580(39.52 s)cbx_b9fab6b0ee67(c7a.4xlarge, Node 26.12.1), exact head403a89aa29b381a6e391fd6ae44702d57b1fa580cbx_298c9d997b94, c7a.4xlarge, Node 26.12.1, same Chromium revision 1248; pinned mainbb6a983a9d85f80e11b79e8a06644bd7f3409c6areproduces both UI failures and the dead-export scan failure403a89aa29b381a6e391fd6ae44702d57b1fa580: run 40236659402The rebased-head browser files are
action-foreground,browser-dictation-status,chat-composer-reverse-tab,chat-content-copy,chat-message-actions, andchat-video-gallery. Fixture helper files arecontrol-ui-e2e.sessions,control-ui-e2e.deferral,control-ui-e2e.chat-inputs, andcontrol-ui-e2e.mock-gateway, plus thecontrol-ui-transcript-paintbrowser probe. All ran throughscripts/run-vitest.mjswith their native configs. The full UI suite was not repeated after this test-only rebase; its earlier result is labeled historical above.The AWS quota fallback to t3.small was killed with exit 137 during the UI build after the helper/probe passes. Hetzner setup initially stopped for missing Corepack; installing Corepack into the scratch toolchain on the same lease allowed the native browser run to pass. These were setup failures, not test failures. Both rebased-head leases are released with cleanup complete.
Full-suite failures:
ui/src/e2e/team-scale-cold-load.e2e.test.ts(the sidebar resize handle intercepts the transcript’sx: 4hover point) andextensions/qa-lab/src/control-ui-automation-management.real-gateway.e2e.test.ts(Crabline provider readiness rejects a writable private mutation boundary). Both files are unchanged, and both exact failures reproduce on the historical pinned-main control above. The control’s preceding automation case passes, matching the full-run setup order.The historical pre-rebase dead-export scan reports 24 findings; the historical pinned main control reports 23, with 21 identical entries. The three PR-head-only entries are the internal fixture exports removed by commit 9076855 in #183933. This diff changes none of those declarations or references. The remaining two main-only findings are outside this diff as well.
Historical commands on pre-rebase head
403a89aa29b381a6e391fd6ae44702d57b1fa580:Historical control commands on pinned main:
Both leases are released with provider cleanup complete.
The four existing gated skips are
desktop-resize.real-gateway.e2e.test.ts,peer-followup-restart.real-gateway.e2e.test.ts,chat-steer-deferred-custody.real-gateway.e2e.test.ts, anddeepseek-search.real-gateway.e2e.test.ts.The +30 tooling lines model the nested initial-history success/failure contract, retain explicit fallback coverage, and record the new response milestone. No deployed code grows.
The fixture audit found a standalone startup fallback that current live reloads with embedded subscription history do not need. This PR fixes that measurement boundary for the campaign’s signed-in dashboard deep-link reload. Cursor presence at dispatch, full/delta/not-modified bytes, the real long-transcript Gateway run, and the 11-pair performance gates remain follow-up work; there are no before/after latency claims or per-pair results for this test-only stage. No private captures or content are included.
Follow-up uncovered by the faithful fixture
On direct entry with a truncated assistant message, a held
chat.message.getreply can outlive the transition from displayed session identity to the authoritative roster row. The full-message loader rejects that earlier scope, and subsequent unconfigured fixture replies show the recovery error. This reproduced with both an explicit canonical row and the original scenario; canonical row data alone does not remove it. The search test now starts after actual roster admission, so it continues proving expansion retention across filtering without claiming to cover boot ordering. Production recovery and a real Gateway reproduction remain follow-up work; this PR does not change the freshness guard or claim a production fix.