Repository navigation
perf(control-ui): restore composer display facts on warm reload - #184383
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. What this changesThis PR restores saved effort, effective speed, and permission presentation alongside cached chat content during warm reload. Example: Reload a conversation saved with High effort and Full permissions while connection establishment is delayed.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: the prior cached-speed finding is fixed, the focused improvement remains useful, and no new actionable defect was found; required CI remains unresolved. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI captures composer display facts from existing catalog and session owners into its scoped transcript snapshot, restores them during reload, and replaces them with live facts without transferring mutation authority. flowchart LR
A[Live session and model catalog] --> B[Composer snapshot capture]
B --> C[Scoped transcript cache]
C --> D[IndexedDB snapshot]
D --> E[Cached composer presentation]
A --> F[Live readiness and mutation owners]
F --> E
Technical reviewBest possible solution: Retain the existing-owner display projection and resolve the required CI gate before landing. Do we have a high-confidence way to reproduce the issue? Current main stores only model identity, explaining the later effort and permission transition; inspected screenshots and the supplied paired results support that behavior, without a new execution during this review. Is this the best way to solve the issue? Extending the existing scoped snapshot is a focused solution: the live resolver supplies speed presentation, existing owners retain mutation authority, and session replacement cannot inherit another incarnation’s composer facts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c152c5976b21. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +104, Tests +235, Other +200. Total +539 across 19 files. Added test files: 1. View PR surface stats
Review metrics
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 26, 2026, 1:08 PM ET / 17:08 UTC (Revision 2). |
c98f5e6 to
7260b2c
Compare
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. |
84a0f08 to
7329930
Compare
7329930 to
215fe8a
Compare
|
@clawsweeper re-review The cached-speed finding is fixed: the snapshot stores only the four display fields produced by the live speed resolver. It does not reconstruct speed policy from a saved preference. Regression coverage is red before the fix and green for Standard-only and recovered-Fast capability cases; actions remain live-authorized. The cache is intentionally disposable. Projection 5 invalidates older records instead of migrating them, and tests cover direct-read and prewarm rejection of obsolete projections, including version 4. There is no durable server data or protocol change. The fixture-only static assertion was removed. The PR body contains the final paired performance results, current validation, and inspected synthetic before/after screenshots. Composer transitions improve 1 → 0 in all 11 pairs on each route. Full UI e2e completed (842 files passed, one inherited permission failure, four opt-in skips). Exact-head CI still has three failures that did not reproduce in the matched main shard; that unresolved gate is explicitly recorded. The change remains awaiting the lead's review and is not merged. |
|
🦞👀 Re-review progress:
|
* perf(ui): isolate chat model selection derivation Keep current mutation guards while retaining model choices across unrelated frame updates. Preserve in-place session facts and locale invalidation. Add a reproducible reconnect matrix with separate update prompt and reload intervals. * perf(ui): defer unopened model picker options Derive the selected model summary without expanding every option family. Let the retained picker panel request the full options on first open while preserving Default, runtime and context-budget semantics. * perf(ui): retain fast-mode derivation across unrelated frames Compare the model, runtime, speed and availability fields before rescanning the catalog. Keep locale invalidation and live outer mutation guards. Narrow helper input types to the facts it reads. * test(ui): cover reconnect picker and HTTP latency costs * perf(ui): retain saved model presentation across reconnect frames * fix(ui): preserve reconnect profiling across refresh * refactor(ui): separate shared model control types * perf(ui): retain eager model options after mobile measurements Reject lazy option expansion after 20 interleaved mobile first-open pairs increased script CPU by 8.5 percent with a flat control. Keep the narrower selection and Fast-mode derivations and stable saved-model snapshot; restore the original picker API and eager option preparation. * test(ui): add diagnostic interaction function counts * perf(ui): limit model search to searchable presentation facts * test(ui): collect function coverage before browser warmup * perf(ui): narrow model selection and catalog search inputs * test(ui): record first-open input phases * test(ui): preserve input cadence in picker diagnostics * test(ui): align model fixture types and benchmark formatting * test(ui): await lazy transcript group before label assertion * test(ui): reopen publication menu after request admission * test(ui): await queued patch admission without polling * test(ui): settle lazy sharing content before assertions * perf(control-ui): restore composer controls from the cached snapshot (#184383) Warm reloads restored the composer's model control from the cached composer snapshot but rendered effort, fast mode and permission from live data only. Those controls changed once after first content on every reload. The existing composer snapshot now also carries display facts for the reasoning/thinking level and profile (capped list), fast-mode presentation, and permission mode with its agent default. Until the selected session is live and its accepted history matches, the composer renders those cached facts with final geometry. The permission control stays disabled while it shows cached state, live owners supersede the snapshot once ready, and actions remain live-authorized. Evidence, 11 interleaved pairs per route on AWS c7a.4xlarge: composer transitions after first content 1 -> 0 in 11/11 pairs on both chat and dashboard; no secondary regression under the campaign rule; snapshot +235 bytes (+0.49%). Full UI e2e: 842 files passed, 1 inherited filesystem failure. The three checks-ui (1/3) CI failures sit outside this diff and passed in matched shard replays of both main and this head (two replays), so they are classified as load-sensitive flakes. Runtime +104 LOC.
…o live (#185144) Warm reloads render the composer from cached facts (#184383) with the permission/effort controls deliberately non-interactive until live authority arrives. That gate rendered them with a disabled style, so every reload showed the trigger restyling from disabled to enabled when authority landed. Cached-authority controls now look exactly like live controls while staying non-interactive: no activation by pointer or keyboard, truthful aria state describing the pending authority, and no choice queued against cached authority. Live authority that differs renders as an ordinary value update. Results (11 interleaved pairs per route, Team-scale fixture, AWS c7a.4xlarge): composer authority styling transitions 1 -> 0 per trigger in 11/11 on both routes, no secondary regression; inspected synthetic filmstrips. Runtime +8 LOC. Native regression, 51 focused tests and changed-file checks pass; autoreview clean through P2; exact-head CI green. A one-off 4 px mobile thinking-arguments bounds miss in a full local run passed 5/5 head and 5/5 base in isolation and in a parallel control (load-sensitive). Release-note context: Control UI composer controls no longer change style when a reloaded chat reconnects.
…penclaw#184383) Warm reloads restored the composer's model control from the cached composer snapshot but rendered effort, fast mode and permission from live data only. Those controls changed once after first content on every reload. The existing composer snapshot now also carries display facts for the reasoning/thinking level and profile (capped list), fast-mode presentation, and permission mode with its agent default. Until the selected session is live and its accepted history matches, the composer renders those cached facts with final geometry. The permission control stays disabled while it shows cached state, live owners supersede the snapshot once ready, and actions remain live-authorized. Evidence, 11 interleaved pairs per route on AWS c7a.4xlarge: composer transitions after first content 1 -> 0 in 11/11 pairs on both chat and dashboard; no secondary regression under the campaign rule; snapshot +235 bytes (+0.49%). Full UI e2e: 842 files passed, 1 inherited filesystem failure. The three checks-ui (1/3) CI failures sit outside this diff and passed in matched shard replays of both main and this head (two replays), so they are classified as load-sensitive flakes. Runtime +104 LOC.
* perf(ui): isolate chat model selection derivation Keep current mutation guards while retaining model choices across unrelated frame updates. Preserve in-place session facts and locale invalidation. Add a reproducible reconnect matrix with separate update prompt and reload intervals. * perf(ui): defer unopened model picker options Derive the selected model summary without expanding every option family. Let the retained picker panel request the full options on first open while preserving Default, runtime and context-budget semantics. * perf(ui): retain fast-mode derivation across unrelated frames Compare the model, runtime, speed and availability fields before rescanning the catalog. Keep locale invalidation and live outer mutation guards. Narrow helper input types to the facts it reads. * test(ui): cover reconnect picker and HTTP latency costs * perf(ui): retain saved model presentation across reconnect frames * fix(ui): preserve reconnect profiling across refresh * refactor(ui): separate shared model control types * perf(ui): retain eager model options after mobile measurements Reject lazy option expansion after 20 interleaved mobile first-open pairs increased script CPU by 8.5 percent with a flat control. Keep the narrower selection and Fast-mode derivations and stable saved-model snapshot; restore the original picker API and eager option preparation. * test(ui): add diagnostic interaction function counts * perf(ui): limit model search to searchable presentation facts * test(ui): collect function coverage before browser warmup * perf(ui): narrow model selection and catalog search inputs * test(ui): record first-open input phases * test(ui): preserve input cadence in picker diagnostics * test(ui): align model fixture types and benchmark formatting * test(ui): await lazy transcript group before label assertion * test(ui): reopen publication menu after request admission * test(ui): await queued patch admission without polling * test(ui): settle lazy sharing content before assertions * perf(control-ui): restore composer controls from the cached snapshot (openclaw#184383) Warm reloads restored the composer's model control from the cached composer snapshot but rendered effort, fast mode and permission from live data only. Those controls changed once after first content on every reload. The existing composer snapshot now also carries display facts for the reasoning/thinking level and profile (capped list), fast-mode presentation, and permission mode with its agent default. Until the selected session is live and its accepted history matches, the composer renders those cached facts with final geometry. The permission control stays disabled while it shows cached state, live owners supersede the snapshot once ready, and actions remain live-authorized. Evidence, 11 interleaved pairs per route on AWS c7a.4xlarge: composer transitions after first content 1 -> 0 in 11/11 pairs on both chat and dashboard; no secondary regression under the campaign rule; snapshot +235 bytes (+0.49%). Full UI e2e: 842 files passed, 1 inherited filesystem failure. The three checks-ui (1/3) CI failures sit outside this diff and passed in matched shard replays of both main and this head (two replays), so they are classified as load-sensitive flakes. Runtime +104 LOC.
…o live (openclaw#185144) Warm reloads render the composer from cached facts (openclaw#184383) with the permission/effort controls deliberately non-interactive until live authority arrives. That gate rendered them with a disabled style, so every reload showed the trigger restyling from disabled to enabled when authority landed. Cached-authority controls now look exactly like live controls while staying non-interactive: no activation by pointer or keyboard, truthful aria state describing the pending authority, and no choice queued against cached authority. Live authority that differs renders as an ordinary value update. Results (11 interleaved pairs per route, Team-scale fixture, AWS c7a.4xlarge): composer authority styling transitions 1 -> 0 per trigger in 11/11 on both routes, no secondary regression; inspected synthetic filmstrips. Runtime +8 LOC. Native regression, 51 focused tests and changed-file checks pass; autoreview clean through P2; exact-head CI green. A one-off 4 px mobile thinking-arguments bounds miss in a full local run passed 5/5 head and 5/5 base in isolation and in a parallel control (load-sensitive). Release-note context: Control UI composer controls no longer change style when a reloaded chat reconnects.
What Problem This Solves
On a signed-in warm reload of a chat or dashboard deep link, the cached transcript appears before the effort and permission controls settle. The campaign's initial evidence recorded 14 visible reload states; this focused change removes one remaining composer transition.
Why This Change Was Made
Extend the existing per-session composer snapshot with reasoning/effort facts, resolved speed presentation, and permission display. Capture at the existing catalog/history owner points, using the same bounded, scoped, disposable cache. Projection version 5 resets older projections; preservation across transcript replacement requires the same session incarnation.
The live speed resolver owns capability and recovery policy. The cache retains only its four display fields, so a preserved Ultrafast preference cannot masquerade as an active Ultrafast badge when live capabilities mean Standard or Fast.
Cached facts never authorize actions. Model and effort controls remain disabled until their live owners are ready. Permission controls hand off independently when live session authority arrives, even if the model catalog is unavailable. Accepted empty live values clear stale presentation.
Application production delta: +104 lines. Growth pays for the bounded display projection and live-authority handoff in existing owners. Benchmark instrumentation is separately +200 lines. There is no new pane-display layer, generated validator, configuration option, Gateway protocol field, or server storage change.
User Impact
Saved composer triggers appear with cached content and retain their shape while live facts load. This removes one visible transition; it does not claim a general reload speedup.
Parked work: Details/automations need reliable capture coordinated with their lazy bodies and transcript settlement. Header presence/avatar transitions belong with avatar settlement. Workspace icons are outside this small slice.
Evidence
Head:
215fe8ab32f4abad47fcc6f059c2fbabc271a111; base:d777ae1239625a8cadb3da17e7a057d0c4de71fa. Performance and validation gates are met. Full UI e2e completed with one inherited filesystem failure. The three red CI failures are classified as load-sensitive flakes not caused by this diff after main and two clean PR-head shard replays pass under the declared matched conditions. Ready for lead review; stop before merge.Qualification run, AWS lease
cbx_428f0626a56a, c7a.4xlarge (16 CPUs, about 32.9 GB RAM), completed successfully. Repository Playwright Chromium, live-fast latency, warm chat and dashboard routes, two-pair structural preflights followed by 11 interleaved baseline/candidate pairs per route. Structural probes are separate from unprofiled timing runs.Composer transitions are 1 → 0 in 11/11 pairs on both routes. Snapshot size is 47,917 → 48,152 bytes: +235 bytes / +0.490%. No secondary meets the declared regression criterion. Chat first-row median is unchanged; dashboard is −4 ms. Chat last observed row paint rises 16 ms in aggregate, with overlapping IQRs and mixed pair signs (5 better / 6 worse); this is not claimed as an improvement. All per-pair deltas are below.
UI/scripts typechecks, focused UI/probe lint, native changed/cleared-settings reload (21.21 s wall), and Team-scale e2e (24.12 s wall) passed. Independent review is clean through P2. Focused store/model/cache/warm-startup/write tests passed. Cached controls remain disabled until live owners are ready.
Focused test wall times (single-file runner, one worker):
chat-pane-model-control.test.tsxsession-snapshot-store.test.tssession-message-cache.test.tschat-history-warm-startup.test.tssession-snapshot-write.test.tschat-pane-session-controls.permissions.node.test.tsThe new cached-effort, resolved-speed, and independent permission-readiness regressions were observed failing before their fixes and passing afterward. Native reload proof covers changed and cleared live facts while cached controls remain disabled.
Exact-head CI remains red in
checks-ui (1/3)for overlay-anchor animation alignment, Details CI renderer readiness, and transcript browser-preview readiness. The original failure logs are retained. The declared follow-up gate is now met: the matched main replay and both matched replays on this exact PR head pass, including all three originally failing tests. These CI failures are classified as load-sensitive flakes not caused by this diff. No source changes, assertion relaxation, or GitHub CI rerun was used.All three replays use checksum-pinned Bun
1.4.4-canary.1+807211511, Nodev26.12.1, the original include list, UI shard1/3, three workers, and two-CPU affinity. Both PR replays used separate clean checkouts on AWSc7a.4xlarge, leasecbx_5394c63ffcd5; resource telemetry confirms the test processes saw two CPUs. The three test files and relevant owners are unchanged between the PR base and the main control.ba427f88834f215fe8ab32f4215fe8ab32f4Full UI e2e completed on this exact head and the same lease with Chromium, WebKit, and Firefox installed: 842 files passed, 1 failed, 4 skipped; 3,214 tests passed, 1 failed, 4 skipped; 4,507.83 s wall. The failure is the automation-management real-Gateway fixture rejecting a writable private mutation boundary. The identical error and stack reproduce on main
5eeb65403c1905503bb2c7d273d8b128cc91d414in the same-path comparison: the lease has umask0002and0775checkout ancestors. The comparison also reports a separate setup rejection in main’s first case because its artifact path is outside that checkout; that does not establish a product failure for that case. The PR’s first case passes. The four skips require explicit live/fixture opt-ins (desktop resize, peer follow-up restart, deferred steer custody, and DeepSeek search).Chat
Composer transitions:
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]→[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; deltas[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]. Primary wins: 11/11.Snapshot bytes: median 47917 [47917, 47917] → 48152 [48152, 48152], growth 0.490%; paired byte deltas
[235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235].Per-pair candidate-minus-baseline deltas:
[0.8, -3.2, 11.2, 14.9, -12.3, 18.4, 2.8, -0.1, 0.4, -11.3, 88.9].[-8, -8, 4, 4, -8, 12, 8, 0, 0, 4, 0].[0, 0, 8, 4, 0, 20, 4, 0, 0, 0, 76].[12, 32, 36, 164, -52, 32, -44, -52, -48, -124, 60].[5, -14, 43, 15, -21, 34, 27, -45, -2, -76, 60].[-0.000533, -0.000533, -0.000274, -0.000533, -0.109173, -0.000274, -0.000533, -0.000533, -0.000792, -0.109173, -0.000274].Dashboard
Composer transitions:
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]→[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; deltas[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]. Primary wins: 11/11.Snapshot bytes: median 47917 [47917, 47917] → 48152 [48152, 48152], growth 0.490%; paired byte deltas
[235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235].Per-pair candidate-minus-baseline deltas:
[-54.7, -53.8, -3.1, 4.6, -0.2, 0.7, 2.1, -8.1, 5.2, 2.6, -1.0].[0, 0, -8, 8, -12, -8, -12, -4, 12, 4, 4].[-24, -48, 8, 20, 0, -16, -8, -4, 0, -4, -4].[-24, -48, 8, 20, 0, -16, -8, -4, 0, -4, -4].[-113, -55, -12, 13, -4, -16, 0, -16, 33, -77, -8].[0.018041, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.1e-05, 1.1e-05, -1.1e-05].Hello handled is completion of synchronous connect-response dispatch. Final rows uses the benchmark's last observed transcript text paint. Values use inclusive-quartile IQRs; paired deltas are candidate minus baseline. Timing increases are reported against the predeclared overlap/paired-sign rule, not judged from a single median.
Application production growth is +104 lines; opt-in benchmark tooling is +200 lines and the synthetic fixture is +3. The requested stat filter reports +364 net lines because it also retains +57 lines from a
.test.tsxfile.Before: cached model identity, effort absent, permission at its default.
After: saved effort and permission presentation, with controls disabled until live authority.