Repository navigation
fix(control-ui): keep cached Details progress until live facts differ - #189769
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: blocked before merge. What this changesThis PR preserves cached desktop Details progress presentation until live progress and child-session reads settle. Example: Reload a conversation whose revision 1 progress card shows “Waiting for delegated work.”
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open as a maintainer-directed experiment under its explicit do-not-merge hold; current main lacks the proposed progress-display handoff, and no definite introduced defect was found. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI combines scoped browser snapshots with live progress and child-session observations to render Details, while existing owners retain action authority. flowchart LR
A[Scoped browser snapshot] --> B[Details progress presentation]
C[Live progress owner] --> B
D[Child roster owner] --> B
B --> E[Progress card display]
B --> F[Existing snapshot writer]
F --> A
Technical reviewBest possible solution: Use the existing scoped snapshot and live owners for the narrow handoff, and land only if the declared experiment succeeds. Do we have a high-confidence way to reproduce the issue? Current-main source derives the saved card’s presentation from partial live reconnect facts; the supplied browser regression targets that transition, but this read-only review ran no target code. Is this the best way to solve the issue? The patch follows existing snapshot, presentation, and roster ownership and removes the duplicated readiness predicate; unlike the rejected predecessor, it adds no eager Details-loading path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7b29a23da2a6. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +100, Tests +157, Docs +2, Other +11. Total +270 across 14 files. Added test files: 1. View PR surface stats
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 October 31, 2026, 5:37 PM ET / 21:37 UTC. |
b24fd05 to
119beb7
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. |
563e0ea to
b8fc714
Compare
b8fc714 to
7125471
Compare
Prepare the existing desktop Details boundary before mounting a cached route and retain its progress presentation in the scoped browser snapshot until live reads settle. Failed optional child reads still yield to live parent activity. Cover native chat and dashboard reloads, unchanged reconnects, and changed live facts.
7125471 to
5d7bc46
Compare
|
Lead landing note for ClawSweeper's two pre-merge items (review of older head
These records are a disposable, bounded browser cache, not server or SQLite state. No migration is needed. Exact head |
…openclaw#189769) A warm reload with cached Details no longer replaces the saved Progress activity label with a disconnected warning and then changes it again after reconnect when the progress facts have not changed. The existing Details snapshot owner now retains Progress display inputs (session status/timestamps, active-run flag and the projected runtime) keyed by card revision and updatedAt. The desktop Progress card shows the matching cached presentation until live progress and the own-parent/child reads settle, then writes the live projection back. A settled failed child read publishes through SwarmRosterHydrator so fresh parent facts replace the cache instead of waiting on retries. Progress and Background share the loaded-child predicate, and Background's duplicate readiness gate is deleted. The route-level Details preload from the earlier slice is not included. The Details field is optional within chat snapshot projection 14: old records fall through to live rendering, and older readers ignore it. No protocol, server schema or config change. Proof: 11 interleaved AWS pairs per route plus A/A on the native Gateway rig and the Team-scale bench: cached Progress cards unchanged through reconnect 0/11 -> 10/11, runtime labels 0/11 -> 11/11; snapshot growth <= 1.27%. Native chat LoAF paired +33.8 ms sits inside that rig's A/A absolute-delta Q3 of 65.8 ms and was accepted by the lead; the Team-scale bench shows chat LoAF -6 ms (9/11) and dashboard 0, and native FCP/first painted rows improve by about 88 ms. UI production +96 LOC. Exact-head CI green; full UI 892 pass / 1 fail, which reproduces on pinned main. Release-note context: Control UI warm reloads keep cached Details Progress activity labels and content through reconnect until live facts differ.
What Problem This Solves
A signed-in warm reload with cached Details replaces the saved Progress activity label with a disconnected warning, then changes it again after reconnect even when Progress facts have not changed. This fixes the Progress presentation after Details admission. The original reload evidence documented 14 visible stages.
Why This Change Was Made
Save Progress display inputs and revision/update time in the existing bounded, scoped browser snapshot. Preserve matching cached presentation until live Progress and own-parent/child reads settle, including optional-child failure. Progress and Background share the existing roster helper's loaded-child predicate; the hydrator publishes settled failure and recovery. Background's duplicate readiness gate is removed.
The route-level desktop Details preload is absent. No new store, configuration, server schema or Gateway protocol is introduced. Cached presentation does not authorize Gateway mutations; those retain live connection and permission checks. Main's pane/session-state/header snapshot shape is retained with only the Progress display facts added.
User Impact
Previously loaded Progress keeps its label and plan through reconnect; changed live facts replace values in place. This slice addresses Progress after admission. Complete Details at first app paint, ordinary-child geometry, and glyph repaint are parked follow-ups.
Accepted Performance Result
The lead explicitly accepted slice A for landing and overrode the earlier stop decision. No AWS comparison is being rerun. The acceptance rationale supplied by the lead is:
Arithmetic clarification from the retained raw tables: there are three, rather than four, positive A/B deltas ≤ +2.3 ms (+2.3, +1.5, +1.0), and three, rather than four, signed A/A deltas ≥ +49 ms (+57.7, +49.2, +53.2). The full values are preserved below. This correction does not change the lead's explicit acceptance, paired medians, sign counts, or IQRs.
The earlier stop correctly followed the standing paired-regression rule: native chat LoAF was +33.8 ms, worse in 9/11. Lead acceptance applies the slice's stated “beyond A/A” criterion with the disclosed controls; this is an accepted tradeoff, not an erased adverse measurement or a change to the campaign's general rule.
Evidence
Performance evidence remains pinned to 7125471 versus 91880bf. The accepted 11 A/B + 11 A/A pairs on both routes ran on one quiet AWS c7a.4xlarge lease cbx_ab4fd7c5d3dc, run_42a5e610af2c28b4f466bc2cddf09861, with repo Playwright Chromium, live-like latency and unprofiled runs. Source/asset/fixture guards and independent raw arithmetic were verified. The new rebased/compressed head receives fresh correctness validation; these are not claimed as new timing measurements.
The synthetic fixture preserves involving-me/category/created, 97 groups, 102 section-order entries, five collapsed sections, always-visible empty groups, no previews and pinned rows. A minimal active-Progress variant is used where archived targets intentionally disable Progress. No private captures or production data are included.
Progress DOM witnesses are strictly unchanged in 10/11 candidate runs versus 0/11 base; runtime labels are unchanged in 11/11 versus 0/11. One relative-time tooltip aging change is counted as a raw-card failure. This is not an assertion that every first compositor frame was audited or that all Details geometry is stable. Snapshot maxima are 1.269661% chat / 0.622054% dashboard in Team-scale, native chat 0.436617%, native dashboard zero; all ≤2%. Team RPC counts and request/response bytes are unchanged. Unavailable metrics remain unavailable; final-row DOM settlement is not final pixel paint.
Native Gateway: medians, IQRs and every paired delta
chat: every A/B and A/A paired delta (candidate minus base; ms except CLS)
dashboard: every A/B and A/A paired delta (candidate minus base; ms except CLS)
Team-scale bench: medians, IQRs and every paired delta
chat: every A/B and A/A paired delta (candidate minus base; ms except CLS)
dashboard: every A/B and A/A paired delta (candidate minus base; ms except CLS)
Synthetic visual evidence on this head
Representative cached Progress while the real Gateway upgrade is held, pair 1. Baseline shows the disconnected activity warning; candidate retains the saved runtime label. These are pre-hello captures after app admission, not proof of complete Details in the first app frame. Both entire captures were inspected for unrelated/private content; all conversation content is synthetic.
B: composition attribution only
The diagnostic source is
b8fc7149262f, AWS c7a.4xlarge leasecbx_455c917053b7, two observations of the same candidate bundle. These are profiled attribution observations, not final-head A/B performance proof.Inclusive stacks overlap and cannot be summed; no samples does not mean no execution. The first Details owner sample occurs after hello publication and before handling completes. The broad owner-to-DOM windows, 141.282/82.725 ms, include unrelated work and scheduling and are not synchronous composition cost. Neither those windows nor the ~8.8 ms ancestry sample bounds the cost of moving module evaluation/layout into first paint.
Initial section roots total 167 elements/249 nodes; settled total 191/277. There is no measured offscreen expanded list to defer. These are DOM/rAF checkpoints corroborated by inspected populated frames, not exact first-paint census.
The ordinary-child row is missing from the cached panel and later adds a 112 px section in both arms of the earlier held comparison: Background snapshots listed collection members while ordinary children render from the live roster. Removing collection filtering or hydration/access gates would change semantics. A coherent receipt/admission repair is estimated at 100–180 runtime lines, above B's 60-line ceiling. Deferring three eager closed-menu SVGs might cost 6–12 lines, but its saving is unmeasured and does not establish complete first-pane admission or ≤25 ms added LoAF. No qualifying B implementation is proposed for landing.
C: glyph repaint attribution only
One of two same-b8-bundle observations reproduces grayscale-to-LCD Progress text while its visible content remains unchanged. A populated 343×535, opacity-1, non-opaque
Overlapcompositor layer has LCD exclusioncontents-not-opaque; it disappears before the next LCD frame. The later plan-line pixels equal the settled crop byte-for-byte. The other observation's first complete frame already has LCD glyphs.Across 47 targets and 41 normal/pseudo style properties, sampled DOM/rAF/settled checkpoints show no changes; fonts are loaded. Sampling does not cover every actual glyph frame. A hidden add-reaction opacity/transform animation co-occurs, but no trace edge establishes it as the cause. The layer/pixel evidence supports compositing, not a confirmed entry-transition trigger. No general ≤10-line fix or zero-repaint claim is justified; no C source change is included.
Rebase, Compression and Final-Head Validation
Final head:
5d7bc4674e5c5d4de290a03b93e0f5d36d117fcb, pinned main9084b1500f4cfbc7b293e71c660e469866fc261c. Main includes #190251 (9a7aab324b77), #189918 and #190245. The pane/header/session-state snapshot shape survives; this slice adds only the Progress facts and optional child-read failure presentation. No route preload or B/C implementation is present.Correctness proof ran on AWS c7a.4xlarge
cbx_de72ce476f94, validation run, against the exact source above. The fresh-PR route applied no local patch. Final candidate/base source guards are clean. The complete measurement comparison was not rerun. The lease is released, provider cleanup is complete, and no host remains; no local Gateway was started.pnpm test ui/src/e2e/chat-details-reload.e2e.test.ts --maxWorkers=1node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --maxWorkers=4node scripts/check-changed.mjs --base <pinned-main>5d7bc4674e5c5d4de290a03b93e0f5d36d117fcb: 37 passed / 24 intentionally skipped, no failures; all threechecks-uishards, selectedchecks-ui-e2e (1/2),control-ui-performanceandopenclaw/ci-gatepass. The watcher confirms a green full PR rollup with zero pending checks. Prior draft-skipped checks are not counted.The full suite's sole failed file is
ui/src/e2e/chat-outbox-migration.e2e.test.ts, case at line 71. Pinned main reproduces the same initial-roster timeout in that case, with one failed/one passed test in the same file and the same test-source blob as head. It is inherited. The other 892 files passed, including all six boot-composer cases and both new Details reload cases. The three skipped files are unchangeddesktop-resize.real-gateway.e2e.test.ts,chat-steer-deferred-custody.real-gateway.e2e.test.ts, anddeepseek-search.real-gateway.e2e.test.ts; no skip was introduced.The unused-export finding is also inherited: actual production and full-tree scans on pinned main report the same
retireControlUiSessionPrStateexport insrc/gateway/control-ui-session-pr-prepared-read.ts. No Gateway source is changed here.The candidate whole-core lint ended with 137, correlated with a kernel global OOM kill at 18:16:46 UTC and 98.28% machine memory usage. The same-command pinned-main control completed with exit 1 and 12 existing lint errors; it did not reproduce exit 137. These are distinct outcomes. The maintained split-core/scripts route covering every changed TypeScript/TSX file, including proof tooling, passes on the candidate with zero warnings and zero errors. Whole-tree check-changed is not claimed green.
Both builds report identical existing CSS audit warnings: 302.3 KiB gzip / 1564.1 KiB raw, against caps of 302.1/1561.8 KiB. This branch changes no stylesheet. These warnings did not fail either build.
Production Size and Test Cost
One compression pass reduced UI production growth from +108 to +96 lines (118 added, 22 deleted), removing 12 lines from the earlier candidate. Proof tooling remains +8, so total production growth fell +116 → +104. Tests remain +157, docs +2, and the exact test-allocation record +3.
The shared readiness predicate now belongs to the existing roster helper and reuses its session-key import/type. This removes the snapshot-to-component type backedge and the resulting patch-type relocation; two files disappear from the PR diff. The Progress memo captures its card/session and receipt once while preserving the old desktop/readiness short circuit. Background's duplicate readiness gate is deleted.
Remaining UI growth is required by the display receipt and its lifecycle: 36 schema lines, 37 Progress presentation/publication lines, 14 roster-helper/type lines, 12 hydrator failure/recovery lines, two pane/props wiring lines, less five Background lines. The existing schema helpers, cache scope/incarnation/locale checks, quotas and invalidation remain the owners. No new store, configuration, server schema or protocol is added.
The 120-line parameterized native regression covers both routes through real browser rendering and the existing persistence owner; 32 lines cover the distinct failed-child-read presentation handoff and five assertions cover producer settlement/recovery. The exact 157-line allocation is lead-authorized for those behavioral regressions, with no slack and no shared scalar raise. Physical source counts include comments/types.
The requested filtered statistic is +139 (161 insertions, 22 deletions): its exclusions still count 32
.test.tsxlines, three allocation lines and eight proof-tool lines. The production/test split below is fromgit diff --numstat origin/main...HEADat the pinned base.config/test-lines-allocations/details-first-pane.txtdocs/web/control-ui.mdscripts/perf/warm-reload-proof.tsui/src/e2e/chat-details-reload.e2e.test.tsui/src/lib/sessions/swarm-roster.test.tsui/src/lib/sessions/swarm-roster.tsui/src/pages/chat/chat-pane-state-owner.tsui/src/pages/chat/chat-spawned-subagent.tsui/src/pages/chat/components/chat-details-arrival.test.tsxui/src/pages/chat/components/chat-details-background.tsxui/src/pages/chat/components/chat-details-progress.tsxui/src/pages/chat/components/chat-details-types.tsui/src/pages/chat/session-details-snapshot-schema.tsRelease-note context: keep cached Details Progress activity labels and content through reconnect until live facts differ. B/C are parked by the lead. Do not merge automatically; the lead reviews and lands this PR.