Repository navigation
fix(control-ui): settle cached Details through lazy loading - #190929
Conversation
Retain session attribution, participant counts, and branch/worktree display facts in the scoped Details snapshot. Remove lazy boundaries that leave the restored inspector empty or grow it after the first frame. Live full-row receipts replace cached presentation without transferring action authority.
Retain the existing projection-14 display facts while restoring all four Details lazy boundaries. Prepare the nested Environment body before the desktop composition fills its panel, so cached Automations stays in place without eager transcript-path imports.
|
🦞👀 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: blocked before merge. What this changesThis PR retains additional Details display facts and prepares the lazy Environment body before mounting desktop Details. Example: Warm-reload a saved desktop conversation showing feature/verification and Automations.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep this maintainer-authored experiment open under its explicit do-not-merge hold; no definite introduced runtime bug was found. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI combines scoped browser snapshots and live Gateway session observations into Details presentation, while existing owners retain read and mutation authority. flowchart TD
A[Browser snapshot] --> C[Pane presentation]
B[Live session observation] --> C
C --> D[Lazy Details composition]
E[Environment body preparation] --> D
D --> F[Settled Details content]
C --> A
Technical reviewBest possible solution: Restore stable Details geometry through the existing scoped snapshot and lazy composition owners while preserving live reconciliation and transcript performance. Do we have a high-confidence way to reproduce the issue? Source inspection supports the missing display-fact and nested-loading path, and the author reports baseline browser failures; this review did not execute a reproduction. Is this the best way to solve the issue? The patch follows the smallest complete repair for the stated branch/worktree scenario: retain missing facts in the existing snapshot and prepare the nested body at the existing lazy loader. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6deb24aa4654. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +66, Tests +118, Docs +2, Other +24. Total +210 across 16 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 Reviewed November 2, 2026, 2:15 AM ET / 07:15 UTC. |
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. |
…law#190929) Warm reloads of a chat with Details open no longer push the Details panel down after first paint. The existing scoped Details snapshot (projection 14) now retains optional display facts: session creator and participant count, plus Environment branch and worktree. They render until the full session observation is accepted, and live facts then replace them in place. The desktop composition's existing lazy loader prepares its nested Environment body before mounting, so the panel fills once. All four lazy boundaries are kept, with no transcript hold, placeholder geometry or new store. Native 11-pair gate: Details movement 81 -> 0 px in 11/11 reloads; first painted rows 376 -> 376 ms; visible rows 297.1 -> 296.0 ms; snapshot growth +648 B (chat) and +475 B (dashboard). Older records without the fields render live, and non-strict older readers ignore them. Supersedes openclaw#190898.
What Problem This Solves
A warm signed-in reload showed incomplete desktop Details and pushed Automations down as Environment filled above it. The existing Details snapshot omitted creator/count and branch/worktree display facts, while the nested Environment body crossed a second lazy boundary after the panel became visible.
Why This Change Was Made
Retain those optional facts in the existing scoped Details snapshot. Keep all four lazy boundaries. The desktop composition's existing lazy loader now prepares its nested Environment body before mounting, so the already-present panel fills once with settled content (shape b). This uses the existing loading boundary without adding a transcript timing hook, transcript reveal hold, placeholder geometry or static Details import into the transcript-critical chunk.
Full live session observations replace cached display facts in place; compact roster rows do not clear them first. Projection stays 14: fields are optional, absent fields keep live rendering, and non-strict older readers ignore unknown fields. Existing account/scope/epoch/incarnation/locale checks and bounds remain the snapshot owner. No new store, application setting, Gateway protocol field, server schema or durable server-record shape. Cached presentation grants no action authority.
User Impact
Previously loaded Details fills in one step, with Automations at its final position, then updates changed live values in place. Archived sessions retain the existing rule hiding Progress; active chat/dashboard regression cases cover Progress separately.
Open limit: machine placement, PR/work and dirty-file rows remain live. This candidate does not claim cached first-frame stability for those variants.
Evidence
Supersedes the rejected eager experiment #190898. Candidate a22829c; baseline 796b147.
All numeric gates pass. Eleven interleaved pairs per route plus eleven chat A/A pairs on one quiet AWS c7a.4xlarge, 16 vCPU, about 31 GiB RAM, 99% idle preflight. Repo Playwright Chromium 156.0.8078.4, unprofiled Team-scale bench, live-capped latency, archived chat with desktop Details, populated Automations, session creator/count and branch/worktree facts. Sidebar settings: involving-me, category/created, 97 groups/102 order entries, five collapsed sections, empty groups always, preview off and pins.
The first nonempty Details frame is the revised one-fill contract: an empty existing panel may precede it. Movement is cumulative Automations top displacement; an independent check requires all section identities, tops and heights to equal settled geometry within 1 px. Median [Q1,Q3] uses inclusive quartiles. All times below are ms except movement (px), CLS and snapshot bytes. “Final row window” is the first sample of the eventual rendered row-key set; “live catchup” is transcript-ready publication, not compositor paint. The fixture has its four final rendered rows from its first row window. A/A labels mean the first and second copies of the same baseline bundle. No local performance timings are used.
chat
All section identities, tops and heights final within 1 px from first nonempty Details sample: 11/11 candidates.
dashboard
All section identities, tops and heights final within 1 px from first nonempty Details sample: 11/11 candidates.
aa
All section identities, tops and heights final within 1 px from first nonempty Details sample: 0/11 candidates.
Split attribution
Original baseline c9cd215. Arm F is d33328e plus only the four lazy-boundary restorations; arm E is baseline plus only the four eager-boundary changes. Same quiet AWS c7a.4xlarge lease cbx_4c37ee29d3b2, run run_686cec6f8a06ffc9050d9e46ac1ba0f9. Five interleaved baseline/arm pairs each, archived chat with Details open, Team-scale fixture and live-capped latency; unprofiled. Median [Q1,Q3], inclusive quartiles. No local performance timing results.
Facts-only has mixed transcript timing signs and zero painted-row paired median delta. It fixes the missing initial Environment shell (51 px) but leaves its 30 px lazy body growth. Eager-only reproduces the +20 ms painted-row median and does not fix movement. This five-pair diagnostic supports separating the levers; it is not the eleven-pair final gate. The candidate adds shape (b): desktop lazy composition waits for its nested Environment body before mounting, so the existing panel fills once. No transcript hold, placeholder geometry or static import is added.
The native test starts at visible session content (not the existing empty panel), preserving the revised one-fill contract. Baseline and facts-only must still fail on post-content geometry; candidate is facts plus a preload awaited by the existing lazy composition loader. All four boundaries remain dynamic. The current runtime delta is +66 LOC (roughly 60); it retains complete creator display identity and keeps cache retirement behind the full-session receipt. There is no added render-timing hook.
Real-Gateway and visual proof
The isolated synthetic Gateway exercises signed-in document reload, real transport and persisted snapshots, with two warm reloads per arm and route. Both candidate chat reloads keep session height 178 px, Environment 81 px and Automations top 183 px; baseline session 148→178 px / Automations top 153→183 px. No browser errors; PaintHolding capture-method calibration passed. Dashboard captures had no Details section and provide route/transport evidence only. This small diagnostic is not substituted for the eleven-pair timing gate.
Inspected synthetic-only strips, identical 320×390 crop and scale. These are each arm's first captured nonempty Details surface (baseline 1098 ms, candidate 1302 ms in this diagnostic), not a same-time comparison. The baseline body later fills and moves Automations another 30 px; the candidate's first content is complete. Raw full frames and crop coordinates are retained locally. No private Team media was uploaded.
Before
After
Validation and size
Native browser regression is red 3/3 on pre-fix runtime, green 3/3 on this head: active chat, active dashboard, archived chat. It exercises actual IndexedDB snapshot writes/reload, a held connection, per-frame geometry and subsequent live Progress changes.
pnpm test ui/src/e2e/chat-details-reload.e2e.test.ts --maxWorkers=1: 21.68 s wall. Existing Details session tests 17/17, arrival tests 8/8. Independent local Codex review of the complete candidate is clean through P2; the patch-identical rebase preserved it.Runtime delta +66 LOC (roughly 60). Growth is the missing display facts, full-live cutover and lazy preparation; all four eager boundaries from the rejected candidate are removed. Prescribed non-test/non-doc stat: 157 additions / 24 deletions, net +133 (includes diagnostics, test helpers and allocation). Exact test/helper allocation 118 supports the consolidated behavior regression and shared live-like fixture; no slack added to a shared scalar ceiling.
AWS attribution: lease
cbx_4c37ee29d3b2, runrun_686cec6f8a06ffc9050d9e46ac1ba0f9. Final proof: leasecbx_268667101bb5, runrun_fb86fcf421c71ad835f7c52641b89d65. Focused setup retries and baseline/main controls: runrun_231fd797ae96a788d5e7b5f258b03c4e, same AWS c7a.4xlarge. All source builds succeeded.Full UI e2e ran once on the final head: 896 files: 886 passed, 7 failed, 3 skipped; 3,372 tests passed, 2 failed, 20 skipped (Vitest 3,345.22 s; command wall 57m55.7s). This is not an all-green full suite. Complete per-file results and raw logs are retained with the lane evidence. Only failed files were rerun afterward, one at a time with
--maxWorkers=1.ui/src/e2e/logs-scroll.e2e.test.tsui/src/e2e/chat-history-reading-stability.e2e.test.tsui/src/e2e/tooltip-first-activation.e2e.test.tsui/src/e2e/chat-composer-picker-layout.e2e.test.tsui/src/pages/workboard/workboard-native-bundle.e2e.test.tsui/src/e2e/chat-outbox-migration.e2e.test.tsextensions/qa-lab/src/control-ui-automation-management.real-gateway.e2e.test.tsFollowupSummaryEntryinsrc/sessions/session-controller.contracts.ts50f868506375d43773c96cfe98ae6e6e18962d33Controls used pinned base
796b14713458a20de36316eff479603dd84c7225and freshly fetched maind9627ecb437b2a0fdaa2215137b291dbbc806137, isolated with their own installs/builds. No main source was changed to obtain a control. The three suite-level skipped files weredesktop-resize.real-gateway,chat-steer-deferred-custody.real-gateway, anddeepseek-search.real-gateway.Changed-file types, lint, formatting, i18n and UI guards passed; its only failure was the inherited dead export above. Exact-head CI run 41406417388 finished with 36 successful, 24 skipped, 2 failed jobs. Selected UI/performance/lint checks passed. Failures are the inherited boundary violation and its aggregate
openclaw/ci-gate. Failed job log fetched once; no CI reruns or update-branch actions to chase unrelated reds. CI is not green; the baseline reproduction and subsequent main fix explain the red.All owned leases are released; final lease cleanup is verified complete with no host remaining. All owned Gateways are stopped. The campaign lead owns landing; this PR is ready for review and this lane has not merged it.