Repository navigation
fix(ui): shorten blocking work during warm chat reloads - #196385
Conversation
Keep early warm history admission while yielding between pane and transcript construction. Preserve the existing empty restored viewport when the warm-frame deadline expires, and retain immediate cached route handoffs.
|
🦞👀 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 Summary: ✅ CompletedThis 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 yields between restored chat-pane construction and transcript rendering while the existing warm-frame hold is active. Example: Reload a cached 400-message conversation in Chromium at 1440×1000.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR makes a focused, measured responsiveness improvement, and no actionable introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI transcript owner receives restored history and pane visibility, schedules transcript construction, and renders conversation content beside the retained composer. flowchart LR
A[Restored chat history] --> B[Chat pane and composer]
B --> C[ChatThread admission]
D[Existing warm frame hold] --> C
C --> E[Browser task continuation]
E --> F[Visible transcript]
Technical reviewBest possible solution: Keep admission in ChatThread and split only held warm restoration, preserving immediate cached handoffs, current history, cancellation, and composer identity. Do we have a high-confidence way to reproduce the issue? Current main constructs restored transcript content immediately with its pane; the supplied matched browser comparisons demonstrate the resulting longer tasks, but this review executed no target code. Is this the best way to solve the issue? The patch is the smallest complete fix supported by the evidence: reuse the existing warm hold and transcript admission owner, add one task boundary, and guard the deferred reveal without introducing another state owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 55ccfca464d9. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +36, Tests +30. Total +66 across 4 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 Reviewed November 9, 2026, 9:54 PM ET / November 10, 2026, 02:54 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
) * perf(ui): split warm chat transcript construction Keep early warm history admission while yielding between pane and transcript construction. Preserve the existing empty restored viewport when the warm-frame deadline expires, and retain immediate cached route handoffs. * test: register one-shot chat task lint exception * test(ui): reuse warm history fixture within budget
#196432) * fix(test): reconcile warm reload and procfs test-line debt Allocate nine missing lines for #196385 and correct #196416 from 33 to its actual 36 test lines. #196423 is already fully allocated. Restore exactly 6615748 lines of ceiling with zero slack; preserve all regression coverage and the shared scalar. * fix(test): account for the latest main test-line offset Main #196305 removed one test line after the first reviewed candidate. Reduce the warm-reload debt allocation from nine to eight so total credit is exactly 11 and the current 6615839-line tree has zero slack.
#196432) * fix(test): reconcile warm reload and procfs test-line debt Allocate nine missing lines for #196385 and correct #196416 from 33 to its actual 36 test lines. #196423 is already fully allocated. Restore exactly 6615748 lines of ceiling with zero slack; preserve all regression coverage and the shared scalar. * fix(test): account for the latest main test-line offset Main #196305 removed one test line after the first reviewed candidate. Reduce the warm-reload debt allocation from nine to eight so total credit is exactly 11 and the current 6615839-line tree has zero slack. (cherry picked from commit 644ff7d)
…esults (#196266) * improve(tool-search): show input signatures for MCP tools in search results tool_search rendered input "unknown" for every MCP tool, so models called tool_describe before almost every MCP call. Render the same bounded, structure-only signature used for OpenClaw tools from the MCP input schema. Client tools keep "unknown" because Code Mode lists them in its system prompt from the same compact entries. Remote schemas can carry huge literals, so string literals longer than the hint budget are rejected before serialization. Code Mode prompt construction skips MCP entries before compaction; it never listed them. Co-authored-by: jalehman <[email protected]> Co-authored-by: GrahamMcBain <[email protected]> * improve(tool-search): show input signatures for MCP tools in search results Worked on by: - @jalehman - @GrahamMcBain Co-authored-by: jalehman <[email protected]> Co-authored-by: GrahamMcBain <[email protected]> OpenClaw-Publication: a0929bba-b988-4c27-b67d-606a685a1e6e * fix(test): restore the main test-line budget after warm reload changes (#196432) * fix(test): reconcile warm reload and procfs test-line debt Allocate nine missing lines for #196385 and correct #196416 from 33 to its actual 36 test lines. #196423 is already fully allocated. Restore exactly 6615748 lines of ceiling with zero slack; preserve all regression coverage and the shared scalar. * fix(test): account for the latest main test-line offset Main #196305 removed one test line after the first reviewed candidate. Reduce the warm-reload debt allocation from nine to eight so total credit is exactly 11 and the current 6615839-line tree has zero slack. (cherry picked from commit 644ff7d) * test(agents): align host-denial proof with immediate failure settlement --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: jalehman <[email protected]> Co-authored-by: GrahamMcBain <[email protected]> Co-authored-by: Dallin Romney <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
openclaw#196432) * fix(test): reconcile warm reload and procfs test-line debt Allocate nine missing lines for openclaw#196385 and correct openclaw#196416 from 33 to its actual 36 test lines. openclaw#196423 is already fully allocated. Restore exactly 6615748 lines of ceiling with zero slack; preserve all regression coverage and the shared scalar. * fix(test): account for the latest main test-line offset Main openclaw#196305 removed one test line after the first reviewed candidate. Reduce the warm-reload debt allocation from nine to eight so total credit is exactly 11 and the current 6615839-line tree has zero slack.
…esults (openclaw#196266) * improve(tool-search): show input signatures for MCP tools in search results tool_search rendered input "unknown" for every MCP tool, so models called tool_describe before almost every MCP call. Render the same bounded, structure-only signature used for OpenClaw tools from the MCP input schema. Client tools keep "unknown" because Code Mode lists them in its system prompt from the same compact entries. Remote schemas can carry huge literals, so string literals longer than the hint budget are rejected before serialization. Code Mode prompt construction skips MCP entries before compaction; it never listed them. Co-authored-by: jalehman <[email protected]> Co-authored-by: GrahamMcBain <[email protected]> * improve(tool-search): show input signatures for MCP tools in search results Worked on by: - @jalehman - @GrahamMcBain Co-authored-by: jalehman <[email protected]> Co-authored-by: GrahamMcBain <[email protected]> OpenClaw-Publication: a0929bba-b988-4c27-b67d-606a685a1e6e * fix(test): restore the main test-line budget after warm reload changes (openclaw#196432) * fix(test): reconcile warm reload and procfs test-line debt Allocate nine missing lines for openclaw#196385 and correct openclaw#196416 from 33 to its actual 36 test lines. openclaw#196423 is already fully allocated. Restore exactly 6615748 lines of ceiling with zero slack; preserve all regression coverage and the shared scalar. * fix(test): account for the latest main test-line offset Main openclaw#196305 removed one test line after the first reviewed candidate. Reduce the warm-reload debt allocation from nine to eight so total credit is exactly 11 and the current 6615839-line tree has zero slack. (cherry picked from commit b67d29e) * test(agents): align host-denial proof with immediate failure settlement --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: jalehman <[email protected]> Co-authored-by: GrahamMcBain <[email protected]> Co-authored-by: Dallin Romney <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Warm chat reloads combine pane and transcript construction into one long task, briefly blocking interaction while the restored chat appears.
User Impact
Restored chat has shorter uninterrupted rendering tasks without delaying readiness or changing its visible content. The composer remains available as early as before. No settings or migration are required.
Why This Change Was Made
#196311 correctly admitted warm history earlier and improved readiness, but that made transcript rendering join pane construction in the same task. This keeps early history admission and yields once between constructing a restored pane/composer and its transcript, only while the existing warm-frame hold is active. Ordinary cached route handoffs remain immediate.
The
yieldChatTaskinterface is coordinated with the cold-preparation lane: nativescheduler.yield(), or one MessageChannel task where unavailable. This is its first production caller; the cold lane retained the shared prototype after rejecting its own experiment. Disposed or hidden panes cannot mount from a stale continuation. The existing viewport remains connected for composer sizing. No geometry owner, lazy boundary, or size ceiling changes.Evidence
Synthetic 400-message warm reload through production HTTP serving and a mocked Gateway; desktop 1440×1000, mobile 390×844. Chromium uses the headless shell; Firefox uses its headless browser. All acceptance observations are untraced, fresh-browser runs. Each cell has 20 rotated base/head/identical-base triplets. All 360 final-candidate observations passed. Separate renderer traces provide attribution only.
Values below are median/p95 milliseconds. Paired changes compare each candidate with the mean of its two controls; A/A is median absolute variation.
<50is a censored Long Task API result, not zero-duration work. Its paired improvement uses a conservative 50 ms upper bound.Firefox composer readiness improves 12.41% desktop / 16.45% mobile. Chromium 4× composer readiness improves 20.35% / 15.49%. No total scripting CPU win is claimed: the change splits work. Mobile 1× scripting changes +4.14% (within the 5% band); task CPU changes −1.37%. Host one-minute load: 1× 6.25–12.38; 4× 8.43–13.81.
Verdict: qualifies. Both 1× median tasks are below 50 ms and all task improvements exceed A/A. Readiness and visuals hold. The 4× absolute 200 ms target is still missed; its relative improvement qualifies. This is not a claim that every task is now below the target.
Matched historical regression
Same harness, toolchain and fixtures; 10 rotated triplets per comparison and viewport, 180 passing observations. Current comparison base:
e1af43161bd8982f3092c9069cb5c1222d93de31.518e8a7d43f→ currentbd63497962a1→ #1963118861d63e3b07Census's original ~54 ms mobile value differs from this replay's ~59 ms, but the matched parent/merge comparison establishes a real regression. One censored census control is excluded from percentage A/A (9 valid pairs in that cell). #196311 also improves readiness by 9.79% desktop / 11.64% mobile in this replay; later main drift is within A/A.
Source-mapped historical traces locate the large task in
sessions.resolvedelivery plus Solid microtasks. History response moves from after that task (desktop 293 ms, mobile 298 ms) to before it (168 ms, 157 ms). Geometry's sampled envelope grows only 12.6→14.1 ms desktop / 8.3→12.2 ms mobile; native layout/style grows about 3 ms. The larger addition is combined pane and transcript construction. These sampled envelopes are diagnostic, not additive CPU or invocation counts.The final source-mapped 1× captures show the following split (trace overhead means these are not acceptance timings):
Native schedule/resume events and the following JavaScript checkpoints are distinct outer tasks. The new continuation contains the source-mapped transcript work. The remaining largest task contains pane/bridge/header/composer construction, boot-composer scroll snapshots, and Details positioning (desktop) or compact textarea reset (mobile). Layout/style counts are rendering passes, not geometry-call counts, and redistributed passes are not deleted work. Both boot-only and full capture-window maxima identify the same tasks.
At 4×, the profiled head follows the deliberately retained immediate path (418.053 ms desktop / 440.393 ms mobile), with synchronous transcript construction and no warm yield. An expired hold is consistent with this path, but these traces do not instrument the attribute and cannot prove that reason. This diagnostic does not demonstrate a split at 4×; the untraced 20-triplet cohort above establishes the relative win, and separate 4× compositor captures exercise both held and expired paths. The 200 ms target and slow expired-hold path remain open.
Correctness and size
The existing pane integration test covers held-warm deferral, absence of a new warm loading placeholder, current history on continuation, preserved composer identity, and disposal before continuation. Ordinary restored handoffs retain their immediate-mount assertion.
Inspected synthetic compositor captures cover complete-snapshot and early/missing-sidebar-snapshot branches at 1×, and expired-hold plus held-yield paths at 4×. The 4× check caught and corrected an added loading placeholder before this revision. Final frames preserve the baseline empty viewport, then the same complete transcript. Mobile first-content pixels match; desktop same-phase frames match, with earlier captures differing only in existing sidebar/rail animation phase. Settled warm and cleared-draft images match byte-for-byte. Firefox multiline draft scrolling/clearing passes without page errors. The initial WebKit launch timed out; the closeout launch also failed to finish under its requested timeout and was interrupted. WebKit correctness is unavailable on this host, not a pass.
Startup JS stays 91,882 B normalized gzip, with one startup CSS request. Served startup gzip is 92,418→92,396 B. Chat boot is 1,298,275→1,298,406 B (+131 B), inside the existing 1,298,528 B cap; New boot stays 802,871 B. No ceiling or baseline was raised.
Production LOC: 493→529 across two files (+36); integration test: 167→195 (+28), plus two lines registering the intentional one-shot-port lint exception in its existing inventory. The new helper supplies the coordinated task boundary. Refactor checklist: effects, render effects, untrack, direct listeners, DOM queries, flush, owner APIs and onCleanup remain zero; four onSettled and two lazy calls are unchanged. The complete change is 71 insertions, 5 deletions in four files; no report or generated proof is committed.
CI found the new, documented one-shot MessageChannel lint exception missing from the exact suppression inventory. The follow-up adds that entry and its reason; it does not alter the measured runtime code. The narrow exception is for a fresh private port whose
onmessagestarts delivery and whose callback closes both ports.The replacement run exposed a five-line test-budget excess. Reusing the existing updated-history fixture removes those five lines while preserving all assertions and the existing ceiling. The pane test and test-line ratchet pass; the fixture repair has a fresh independent review. Runtime sources remain identical to the measured candidate.
CI qualification
Run42744110322 initially failed four exact test names:
Control UI session ownership > aligns Person left status at 1200 pxand thealigns Person left status at 390 pxcase: expected13px, observed14px. Both exact cases/assertions also fail on latest completed scheduled main run42742883765.Control UI mocked Gateway E2E > keeps a single web conversation with in-page native navigation and Dashboard handoff: expected64px header, observed56px. Same exact case/assertion fails on that main run.Cached transcript text fidelity > keeps the cached end stable through an active history refresh (two rounds: false, appended pairs: 1):70px excess movement. This is not attributed as inherited. The complete six-case file passes on the unchanged candidate, frozen measurement base, and actual CI merge base9ccdad09a9df. A diagnostic capture shows no warm-frame hold and connected=false at cached restoration, so the new yield branch is inactive in this case. A tentative connection guard did not remove the intermittent failure and was discarded. The targeted CI retry passed this case (6,224 ms), all 610 tests, and all 147 files in shard 4.The earlier Settings layout-shift case passed in this full CI run. Its first local replay used the wrong prebuilt build identifier and was invalid setup evidence; only the real CI result is cited. No source change or size ceiling was used to mask a failure.
The final controlled CI size comparison passed: startup91,812→91,812B normalized gzip with one CSS request; Chat1,297,974→1,298,104B (+130B, below1,298,528B); New802,719→802,719B; total CSS326,553B unchanged and below current main's ceiling. The PR changes no budget/baseline. These exact-head controlled numbers supersede the older local-base CSS cap status above.
Final qualification is run 42744110322, attempt 3, on head
b24945cadb2a3ace99dff85597f9cdedc5fe26b6. The cached-transcript case and entire shard4 now pass (610 tests /147 files). Only the three matching-main layout assertions remain, across shards2/5; the latest completed scheduled main run is42742883765. The first requested retry accidentally targeted shard5; its completed retry retained only the known header assertion (497 passed). The next retry correctly targeted shard4. No production change was made in response to the intermittent cached-end result. Native landing uses the documented inherited-failure route and retains the failed aggregate rather than claiming all-green CI.