Skip to content

perf(control-ui): split cached chat mount after connect dispatch - #179701

Merged
steipete merged 13 commits into
mainfrom
steipete/coldload-chat-rows-split-mount-accepted
Oct 22, 2026
Merged

steipete merged 13 commits into
mainfrom
steipete/coldload-chat-rows-split-mount-accepted

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Reloading a full-UUID chat deep link waited for sessions.resolve before mounting an already cached transcript, leaving a serial blank/skeleton interval. The pane can now mount from an exact, scoped snapshot after the initial connect request is sent. Cached rows hydrate in a separate task after hello; sessions.resolve remains authoritative and replaces deleted, moved, or mismatched routes.

The snapshot path requires a full UUID, matching agent, matching account/host snapshot key, and the same connection revision after its asynchronous read. Roster matches keep their existing precedence. Parsed prewarm data stays with the snapshot-store owner and is shared with hydration.

Write hold scope

Only composer sends and restored queued sends/outboxes wait for route confirmation. Admission already requires an exact full-UUID and agent match on the account/host-scoped snapshot, so a stale mapping means the session was recently deleted or moved. Other mutations retain server-side authorization and target resolution by session key, ID, or view ticket, and fail safely without writing to another session. Task suggestion, question, and board-action affordances come from live data. User-composed messages are the harmful stale-target case, so delivery is held until confirmation. A different confirmed outbox remains independent.

This scope is an explicit maintainer decision. The previous per-call-site holds across goals, history actions, boards, discussion, headers, reactions, menus, sharing, settings, and run lifecycle are removed. No generic mutation gate or new targeting registry is introduced.

Reconnect verification stays at the route loader and is loaded through the existing async boundary. Moving its route-specific parsing out of eager startup code also removes this PR’s startup gzip growth without raising a ceiling.

Accepted tradeoff

The previously accepted comparison showed hello +14.5 ms paired (11/11 slower), against transcript paint −252 ms, final rows −205 ms, and LoAF blocking −93 ms. The earlier tuned experiment showed hello +13 ms versus transcript −240 ms, final rows −197 ms, and LoAF −29 ms. The hello shift was accepted because it did not cascade into the outcome metrics.

L156/#177153 was reverted in #177760 after an early mount delayed hello and subsequent RPCs. The split schedule preserves the corrected handshake timing and yields cached-row hydration after hello. Live revert rule: revert if live hello or final rows materially regress after deployment. This PR does not deploy the service.

Evidence

Campaign evidence for a signed-in reload of a dashboard deep link recorded 14 visible states and sidebar settlement around 15 seconds. This change targets the cached-chat route-resolution dependency.

The accepted performance comparison is retained below. A subsequent canonical-global reopen repair is described after the tables; it does not execute for these explicit UUID routes.

Performance comparison head: 974978ffcd7b51361e2cbf940984b57d484f141e; measured base: 9d2ac90d14da283e9f6595eeaf483f4c19a5dbac.

AWS Crabbox cbx_b98c9da9a02b, fixed c7a.4xlarge (16 CPUs, 30 GiB available); run. Same repo Chromium, Team-scale fixture and probes across all variants. Eleven interleaved triplets: baseline / original split / final tuned split. Connect is withheld until 340 ms and then takes 220 ms; resolve/describe take 195 ms. The primary gate is at least 100 ms better transcript paint and at least 9/11 faster pairs; hello follows the explicitly accepted tradeoff. Other secondaries use the campaign IQR/paired regression rule; FCP may rise at most 50 ms.

The final transcript-paint gate passes in 11/11 pairs (paired median −252 ms). Final rows improve 11/11 (−158.9 ms paired), LoAF 10/11 (−38 ms paired), and FCP is flat. Hello-handled shifts +15.6 ms paired (10/11), while response dispatch is flat (−0.2 ms paired); no downstream cascade appears. The warm-roster control has overlapping IQRs and no regression. The off-roster request census is 50 → 51 RPCs: one additional session-scoped cron.list; other method counts match.

The first mount task is 78 ms median, ending at 415–422 ms. Final cached-row hydration runs in a separate 151 ms median task, starting 615–628 ms, after hello-handled in all 11 runs. Original split folds that work into the hello task; its LoAF result is worse than the tuned split.

Startup JS gzip is 325,810 → 325,768 B (−42 B) on the remote same-toolchain builds, replacing the previous +170 B growth. No budget/ceiling is changed. The unchanged 325,657 B enforcement advisory is inherited (base +153 B, final +111 B); chat boot stays below 1,500,000 B (1,443,895 → 1,444,683 B).

Off-roster full-UUID reload

Milliseconds, median [Q1–Q3], inclusive quartiles. Each variant has 11 runs.

Metric Baseline Original split Tuned split (final)
Connect sent 353.2 [348.2–354.9] 354.5 [350.3–356.1] 353.4 [348.1–355.0]
Hello response dispatch 573.7 [568.5–574.9] 574.7 [570.4–576.2] 573.5 [569.0–575.0]
Hello handled 586.5 [581.0–587.6] 602.0 [597.9–603.8] 602.2 [597.4–602.5]
FCP 248.0 [246.0–254.0] 248.0 [244.0–248.0] 248.0 [242.0–254.0]
Transcript paint (Element Timing) 1,112.0 [1,092.0–1,112.0] 844.0 [834.0–846.0] 860.0 [854.0–864.0]
Final rows 1,278.6 [1,254.4–1,304.8] 1,119.5 [1,108.9–1,141.2] 1,119.3 [1,117.2–1,125.4]
LoAF blocking 240.0 [226.5–263.5] 246.0 [234.0–265.5] 208.0 [180.5–213.0]

Paired deltas: Original split minus baseline

Metric Pairs 1–11 (ms) Median
Connect sent +0.2, +0.5, +0.1, +0.6, +7.4, -7.0, -0.1, +1.4, +8.0, +9.8, -9.1 +0.5
Hello response dispatch +0.3, +0.5, +0.6, +0.7, +6.8, -6.8, +0.8, +0.8, +8.9, +9.1, -30.7 +0.7
Hello handled +13.9, +14.5, +15.2, +17.4, +21.2, +7.9, +15.4, +15.6, +23.9, +22.9, -19.1 +15.4
FCP -8.0, +12.0, -12.0, +0.0, -4.0, -4.0, +4.0, +0.0, -8.0, -16.0, -4.0 -4.0
Transcript paint (Element Timing) -268.0, -276.0, -276.0, -208.0, -264.0, -244.0, -276.0, -240.0, -268.0, -260.0, -316.0 -268.0
Final rows -120.6, -214.8, -174.8, -117.4, -114.6, -204.7, -119.2, -184.0, -140.8, -94.2, -244.4 -140.8
LoAF blocking +19.0, -3.0, -7.0, +59.0, -19.0, +51.0, +15.0, +9.0, -22.0, -10.0, -11.0 -3.0

Paired deltas: Tuned split (final) minus baseline

Metric Pairs 1–11 (ms) Median
Connect sent -5.1, -5.1, +6.2, +0.9, +6.8, -7.2, -7.3, +0.2, +9.0, +0.2, +1.4 +0.2
Hello response dispatch -1.4, -5.7, +6.6, +0.3, +6.1, -7.0, -6.1, -0.2, +8.6, +0.2, -19.9 -0.2
Hello handled +16.0, +10.4, +22.0, +15.6, +21.4, +8.5, +9.1, +14.2, +26.0, +16.5, -8.0 +15.6
FCP -4.0, +8.0, -8.0, +4.0, +12.0, -8.0, +16.0, -16.0, -8.0, +4.0, +0.0 +0.0
Transcript paint (Element Timing) -264.0, -248.0, -256.0, -204.0, -252.0, -216.0, -264.0, -224.0, -228.0, -252.0, -276.0 -252.0
Final rows -136.0, -196.4, -179.8, -137.5, -147.1, -201.3, -158.9, -168.3, -82.5, -117.9, -217.6 -158.9
LoAF blocking -99.0, -23.0, -47.0, -7.0, -84.0, -38.0, -23.0, -41.0, +3.0, -62.0, -26.0 -38.0

Warm roster reload control

Milliseconds, median [Q1–Q3], inclusive quartiles. Each variant has 11 runs.

Metric Baseline Final
Connect sent 481.7 [471.2–487.5] 472.4 [467.2–486.2]
Hello response dispatch 701.9 [691.0–707.5] 692.7 [687.0–706.0]
Hello handled 738.8 [728.3–745.9] 729.9 [723.9–744.2]
FCP 252.0 [248.0–256.0] 244.0 [240.0–250.0]
Transcript paint (Element Timing) 504.0 [500.0–512.0] 500.0 [492.0–506.0]
Final rows 1,080.0 [1,054.2–1,090.2] 1,058.3 [1,040.9–1,080.3]
LoAF blocking 210.0 [194.5–214.0] 202.0 [198.0–202.0]

Paired deltas: Final minus baseline

Metric Pairs 1–11 (ms) Median
Connect sent -23.7, +15.6, -9.5, +23.6, -14.6, +3.1, +1.6, -17.7, -3.3, -26.4, +11.0 -3.3
Hello response dispatch -23.5, +15.5, -9.0, +23.5, -14.8, +3.0, +1.9, -17.8, -3.3, -26.2, +10.8 -3.3
Hello handled -28.3, +17.1, -8.7, +23.8, -14.3, +2.7, +4.0, -17.4, -2.6, -31.9, +12.5 -2.6
FCP -20.0, +0.0, -4.0, +8.0, -8.0, +12.0, +8.0, -12.0, -4.0, -20.0, -8.0 -4.0
Transcript paint (Element Timing) -36.0, +16.0, -20.0, +8.0, -4.0, -8.0, +8.0, -12.0, -4.0, -40.0, -8.0 -8.0
Final rows -25.5, +23.0, -53.1, +27.5, -25.0, +51.7, -28.7, -43.9, -1.6, -37.5, +10.5 -25.0
LoAF blocking -22.0, +76.0, -2.0, +20.0, -11.0, +7.0, -13.0, -4.0, -103.0, -34.0, -10.0 -10.0

Prior split-mount validation

Head 974978ffcd7b51361e2cbf940984b57d484f141e:

  • Autoreview clean through P2 for the scoped-send candidate; all patches remained identical through rebase.
  • Packaged runtime/plugin build, core/UI/script typechecks, formatting, controller/i18n checks, and touched-file lint pass.
  • Focused unit/browser tests: 164/164 pass across 11 files. Focused native E2E: 33/33 pass, including warm navigation, deleted/moved/mismatched routes, held composer and restored outboxes, unrelated confirmed outboxes, and reconnect during admission.
  • Full UI E2E: 848 passed / 2 failed / 4 skipped files (854); 3679 passed / 2 failed / 4 skipped tests; 5544.11 s. Both failures have baseline/main evidence below. The changed snapshot-route file passes all 13 cases in the full run, and real-Gateway reconnect continuity passes.

All remote proof used AWS lease cbx_b98c9da9a02b, fixed c7a.4xlarge. Command: node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts. Focused unit tests also prove the new admission/send behavior fails on the old production path.

Failing check Evidence / classification
Full UI: QA-lab automation management Private mutation boundary is writable by another POSIX principal. Same case/error reproduced with the baseline runtime projection (32 s including build); its owner and the entire extensions/src/test/config trees are unchanged.
Full UI: header/subagents Same case and line 122 hidden .chat-details-session assertion as scheduled-main run 39693906280 / job 119546724037; timeout budgets differ (10 s remote, 30 s CI).
Changed checks: max-lines suppressions Same three unchanged files fail in the baseline projection (5 s): chat-message tests, config-page state, sessions-page state.
Changed checks: core graph boundary Same baseline gateway-root 726 / infra 749 roots exceed 720 (1 s); the entire src/test/config trees are identical.
Changed checks: unused exports Same seven symbol findings reproduce in baseline (100 s); owner/policy files and symbol-reference inventories are identical. Production unused-export scan passes.

The baseline classification runs retained the candidate UI test files while restoring all changed runtime route/pane/send owners. Source hashes, tree identities and symbol-reference comparisons verify the unchanged inputs to those global guards. They are baseline-runtime projections, not a claim that the whole checkout was main.

The subsequent canonical-global CI failure is resolved by the owner repair below; it is not classified as inherited from a passing replay.

pnpm test <file> --maxWorkers=1 wall times (remote, via corepack pnpm):

File Seconds Result
ui/src/e2e/chat-snapshot-route.e2e.test.ts 57.442 pass
ui/src/pages/chat/route-snapshot.test.ts 2.869 pass
ui/src/pages/chat/chat-route-write-readiness.test.ts 2.762 pass
ui/src/pages/chat/route-warm-boot.test.ts 2.606 pass
ui/src/test-helpers/control-ui-cold-load-probes.browser.test.ts 2.853 pass
ui/src/test-helpers/control-ui-team-scale-fixture.test.ts 3.012 pass

Canonical global reopen repair

Final head: 5ee2d37fa4293184e0ace4695f9304125fe6be27; current base: cadafc0084e25aa63a91506d4378d1f6db7ea7d2.

CI run 39696722804, job 119556453178 exposed a real ordering defect: an implicit canonical-global reopen selected the default agent before the roster arrived, then retained that default because it was valid. A saved selection could consequently reopen /chat/dummy instead of /chat/openclaw. The resolver now chooses defaults and validates the saved selection after the roster read and existing connection checks. This removes ten runtime lines; explicit agent precedence, removed-agent fallback, and reconnect fences remain intact.

The new deterministic regression fails with the old owner (/chat/dummy) and passes after repair (/chat/openclaw). The pre-repair head reproduced the identical native-E2E failure in a diagnostic pilot (1/3 head attempts; base 0/3). That small pilot is not a rate comparison. The completed final-head comparison used thirty alternating-order pairs on one AWS c7a.4xlarge, pinned to two CPUs with native E2E --maxWorkers=2 and the same chat-boot-render-storm companion. Each invocation used fresh browser state and a separate module cache. Tracked source was verified against the selected revision before each trial.

Revision Valid target attempts Target failures Setup failures
Final 5ee2d37fa429 30 0 0
Base cadafc0084e2 30 0 0

These counts do not establish that the original failure was inherited or quantify an amplification by the split mount. The matching native failure and red/green deterministic regression establish the repaired ordering defect. No timeouts, retries, weakened assertions, or test-only production hooks were added.

Final focused units: 179/179 pass across 12 files, including the new saved-agent regression and existing warm-route, connection replacement, snapshot admission, composer, and outbox boundaries. corepack pnpm test ui/src/app/bootstrap.agent-selection.test.ts --maxWorkers=1 took 10.895 s (12 passing tests; new cold module cache).

Final same-toolchain bundle comparison on the updated base: startup gzip 325,800 → 325,703 B (−97 B). The base-aware budget check reports no violations or warnings; no ceiling is raised. The unchanged absolute 325,657 B limit remains exceeded by both builds (base +143 B, final +46 B). Chat boot is 1,443,181 → 1,443,906 B, below its unchanged 1,500,000 B ceiling. This replaces the original +170 B startup growth.

Final proof: AWS lease cbx_28bd62bf493a, run. Final full UI: 842 passed / 3 failed / 4 skipped files (849); 3667 passed / 3 failed / 4 skipped tests; 5494.92 s. The canonical-global test and all 13 snapshot-admission cases pass in the full run. Focused native E2E also passes 34/34.

The exact-base comparison used a detached checkout of cadafc0084e2 on the same AWS machine, with dependencies and runtime rebuilt. Baseline run reproduces the QA-lab POSIX boundary error and the complete max-lines, core-graph, and unused-export outputs. All core/UI/script typechecks, formatting and changed-file lint pass. No baseline or ceiling was raised.

Two full-suite color assertions remain unclassified, not claimed as inherited. A further seven-pair comparison used alternating head/base order on the same instance:

Check Full head Exact-base first replay Seven further head/base replays Classification
Sidebar customization, pin/navigation persistence Reference color captured as alpha 0.992; hovered color settles opaque pass head 6/7 pass; base 7/7 pass Unresolved intermittent color assertion; no inheritance claim
Retry feedback, 140% text scale Spinner and label return different theme colors pass head 7/7 pass; base 7/7 pass Not reproduced in targeted comparisons; no inheritance claim
QA-lab automation management Private mutation boundary writable by another POSIX principal same case/error not repeated Confirmed baseline failure
Max-lines suppression guard same three untouched files as prior proof identical output not repeated Confirmed baseline failure
Core graph guard gateway-root 726 / infra 749 versus 720 identical output not repeated Confirmed baseline failure
Unused exports script, production and full-tree findings identical output not repeated Confirmed baseline failure

The sidebar test freezes a reference color while it is transitioning; the retry test reads colors across a theme change. These are candidate test-timing explanations, not proof of inheritance. The lead approved this content, including the recorded unresolved color assertions, before requesting the rebase-only update below. No assertion, timeout, retry, or product behavior was changed to hide them.

Exact-head CI run 39710543926 is green, including selected UI E2E shards; the transient dependency-review status completed successfully without a rerun. Full-diff and final-commit autoreview are clean through P2, the latter with the resolver, caller, identity helpers, and test setup supplied as source context.

Per the follow-up instruction, no new 11-triplet performance comparison is required: the explicit full-UUID route returns before the changed implicit-landing block. The accepted performance table above remains tied to its original measured head. The message-delivery hold and UUID admission are unchanged by this repair.

Rebase-only validation

The lead approved the previous content at 5ee2d37fa4293184e0ace4695f9304125fe6be27. Rebased onto 5684da26ff62d6a5b0e847c67d32fedd74635764; final head is 24c08ef6d39ee156b65606adede37557349cd048.

  • route-warm-boot.test.ts: retained main's reduced scenario matrix and abort cleanup, with this PR's "roster" cache-provenance assertion.
  • bootstrap-location.ts: retained agent/default selection after awaited roster hydration and connection revalidation, combining the equivalent saved-agent fix now on main with this PR's ordering; retained main's foreground-scope resynchronization after hello. Explicit-UUID admission and composer/outbox holds are unchanged.

The pre-push follow-up rebase was conflict-free; git range-diff shows all 13 PR patches unchanged by it. No performance rerun: neither conflict changed the explicit-UUID mount path. The accepted measurements above remain evidence for their stated measured revisions.

Final-head proof on AWS c7a.4xlarge, lease cbx_1e23a424733d (run):

Check Result
Focused admission, send-hold, agent-selection units 180/180, 12 files
Warm reload, deleted/moved/mismatched routes, held sends, reconnect during admission, agent-selection persistence e2e 34/34, 4 files
UI runtime, UI app/chat tests, UI e2e/chat-e2e tests, scripts typechecks All six passed
Touched UI/script lint; formatting; diff checks Passed, no lint warnings
Exact-head CI run 39730748698 Completed successfully; no failing checks to classify
Final-head autoreview through P2 Clean

The pnpm test ui/src/app/bootstrap.agent-selection.test.ts --maxWorkers=1 wall time was 10.395 seconds. The first AWS setup attempt stopped before tests because the image had Node 24.19.0; validation used the current required Node 24.22.1. The lease was released after collecting proof. No merge or deployment performed.

Code size and ownership

Application runtime after rebase: +163 LOC (235 additions / 72 deletions), reduced from +272. The difference from the prior +158 accounting comes from the newer base, which already includes the saved-agent hydration fix. The requested production filter (git diff --stat origin/main...HEAD -- ':!*.test.ts' ':!*test-support*' ':!docs/*') is +177 LOC (268 / 91), 25 files; that filter also includes bench/test helpers. Necessary growth implements scoped UUID admission, authoritative replacement, split hydration, and message-delivery hold/resume. It removes the obsolete per-action policy and shares the snapshot parse between admission and hydration.

Files are confined to the chat route/snapshot/send/pane owners, app route verification, and the existing bench/fixture/probe owners plus their regression tests. No server schema, durable record, configuration option, or permission model changes.

Synthetic before / after

The attached 400/800/1100/1500 ms filmstrips use only the synthetic Team-scale fixture. Screenshot capture is illustrative; the untraced measurements above are the performance evidence. No private captures are uploaded.

Before: synthetic full-UUID reload at 400, 800, 1100, and 1500 milliseconds

After: synthetic full-UUID reload at 400, 800, 1100, and 1500 milliseconds

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui scripts Repository scripts size: L labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@steipete
steipete force-pushed the steipete/coldload-chat-rows-split-mount-accepted branch 2 times, most recently from f6ab019 to 524a0e9 Compare October 21, 2026 16:57
@steipete steipete changed the title experiment(control-ui): accepted cached chat split mount [do not merge] perf(control-ui): split cached chat mount after connect dispatch Oct 21, 2026
@steipete
steipete marked this pull request as ready for review October 21, 2026 17:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T06:08:16.261683Z 24c08ef New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete force-pushed the steipete/coldload-chat-rows-split-mount-accepted branch from 524a0e9 to d3bb139 Compare October 21, 2026 17:17
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 524a0e9411

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -315,6 +315,7 @@ export abstract class ChatPaneLifecycle extends ChatPaneSessionObservation {
}
pageState.sidebarLayout = this.restorePaneSidebarLayout(pageState.sidebarLayout);
pageState.getWorkContext = () => this.workContext;
pageState.isRouteSessionPending = () => this.routeResolutionPending;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate cached transcript mutations until route confirmation

When an off-roster UUID is provisionally mounted and sessions.resolve later reports it as moved, mismatched, or deleted, cached message actions are already enabled: createChatPaneSessionActionCallbacks can expose rewind/fork actions, whose handlers immediately call sessions.rewind or sessions.fork. The new pending predicate is only consulted by send/outbox paths, so clicking one of these actions while the cached transcript is visible can mutate the stale session before route authority resolves. Propagate this state into all session mutation gates, including rewind, fork, abort, and branch switching.

AGENTS.md reference: AGENTS.md:L65-L65

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the current head. Provisional route admission now reaches the shared session-action gate and the dispatch owners for rewind, fork, branch switching, reset, abort and settings. Retained callbacks recheck authority; queued Stop remains held and resumes after confirmation. Regression coverage exercises pending-to-confirmed transitions and stale callbacks, including a readiness case that failed before the repair. The snapshot and send admission rules remain intact.

@steipete
steipete force-pushed the steipete/coldload-chat-rows-split-mount-accepted branch 3 times, most recently from ede2d83 to 37cb28b Compare October 21, 2026 18:17
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The current head fixes the provisional-route mutation finding, including retained callbacks, settings changes, and queued Stop. Focused regressions, admission browser tests, UI typecheck and targeted lint pass. The PR body now includes the final-head interleaved measurements and synthetic screenshots; it explicitly tracks the full-suite and CI gates still running.

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@steipete
steipete force-pushed the steipete/coldload-chat-rows-split-mount-accepted branch from 37cb28b to 1b54170 Compare October 21, 2026 18:58

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1b541706d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui/src/pages/chat/chat-pane-header.ts Outdated
const branchSwitchAccess = readChatSessionActionAccess(
this.context.gateway.snapshot,
Boolean(this.state?.chatRunId),
{ routePending: this.routeResolutionPending },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate all header mutations until route confirmation

When an off-roster cached route is mounted and chat.startup returns a session descriptor before a held sessions.resolve, this pending flag disables only branch switching. The same header still exposes handleHeaderSessionAction, which dispatches rename, ownership/metadata changes, archive, and delete without checking routeResolutionPending (chat-pane-session-menu.ts:349-395), so a user can mutate cached session A before route authority redirects to session B or reports deletion. Fresh evidence beyond the prior comment is that these header mutation paths bypass the newly added shared action gate; gate their admission and recheck immediately before dispatch.

AGENTS.md reference: AGENTS.md:L65-L65

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed on 7b86a68ee33e007fb88bc51c5e653c6e5da97126. Header presentation and dispatch now share pending-route access; rename, metadata/lifecycle and placement actions remain unavailable until authoritative confirmation. Retained rename/action callbacks also recheck before dispatch. The same admission contract is enforced by the other mutation owners.

The regression proving chat.startup can publish before held sessions.resolve passes through the browser (all 10 admission cases), and the relevant mutation regressions fail against the old handlers and pass with the guards. The final-head full UI run and all failure classifications are recorded in the PR; exact-head CI is green.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 21, 2026
@steipete
steipete force-pushed the steipete/coldload-chat-rows-split-mount-accepted branch from 1b54170 to 727b6e3 Compare October 21, 2026 20:36
@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Oct 22, 2026
@steipete
steipete force-pushed the steipete/coldload-chat-rows-split-mount-accepted branch from 974978f to 5ee2d37 Compare October 22, 2026 02:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5ee2d37fa4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

face: { type: "string", default: "dashboard" },
"short-route": { type: "boolean", default: false },
"full-uuid-route": { type: "boolean", default: false },
"off-roster-route": { type: "boolean", default: false },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require a UUID route for off-roster benchmarks

When --off-roster-route is used without --full-uuid-route or --short-route, the URL selection below falls through to controlUiSessionUrl, which deliberately emits an exact-key literal route. That route bypasses the new full-UUID snapshot-admission and sessions.resolve flow, while the fixture still removes the session from the saved roster and the summary reports offRosterRoute: true; the benchmark therefore completes with plausible but unrelated timings. Make this option imply a UUID route or reject the invalid flag combination.

Useful? React with 👍 / 👎.

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Updated head fixes canonical-global agent restoration at the bootstrap owner and adds a deterministic regression. The final native comparison passed 30/30 on head and 30/30 on base; exact-head CI and P2 autoreview pass. Composer/restored-outbox-only write holds remain the deliberate scoped contract described in the PR.

The full UI result and exact-base comparisons are now in the body. Two intermittent color assertions remain explicitly unclassified; they are not being presented as inherited or hidden by weaker assertions.

@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete
steipete force-pushed the steipete/coldload-chat-rows-split-mount-accepted branch from 5ee2d37 to 24c08ef Compare October 22, 2026 05:54
@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Oct 22, 2026
@steipete
steipete merged commit 8e639ee into main Oct 22, 2026
120 checks passed
@steipete
steipete deleted the steipete/coldload-chat-rows-split-mount-accepted branch October 22, 2026 06:07
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 23, 2026
….resolve, off the hello window (openclaw#179701)

On a warm reload of a full-UUID chat link for a session outside the cached sidebar roster (Peter's sessions on Team), the transcript waited for sessions.resolve before the pane mounted. An earlier attempt (openclaw#177153) rendered the cached transcript first but its single mount landed on the WebSocket connect response and was reverted (openclaw#177760).

Admit the route from the account/host-scoped prewarmed snapshot only for an exact full-UUID + agent match (scope key and connection revision re-checked after the read), schedule the cached pane mount after the connect request is sent and split it so no task lands in the hello window, and keep sessions.resolve authoritative (deleted, moved or mismatched sessions are replaced). Composer sends and restored queued sends are held until the route is confirmed; other mutations stay server-authorized by session key, ID or view ticket and fail safely on a deleted/moved session (see "Write hold scope" in the PR). Saved agent selection is restored after roster hydration so a fresh shell reopening the canonical global session lands on the selected agent (regression test; the old head reproduced the failure, 0/30 on the final head and base).

Evidence (AWS c7a.4xlarge, 11 interleaved triplets): transcript paint 1,112 -> 860 ms (11/11), final rows 1,279 -> 1,119 ms, LoAF 240 -> 208 ms, FCP flat. Accepted tradeoff: hello handling +15.6 ms paired, which does not cascade (final rows improve in the same runs). Live rule: revert if Team's live final rows or hello regress materially.

Runtime +163 LOC; startup gzip 325,800 -> 325,703 B. 179 unit and 34 focused e2e tests; full UI 842 passed (QA-lab failure reproduces on base; two intermittent color assertions - a sidebar hover reference captured mid-transition and a theme-change color read - did not differ meaningfully between head and base in paired replays and passed in CI); exact-head CI green.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant