Skip to content

perf(ui): remove request readiness waterfalls - #182347

Merged
steipete merged 7 commits into
mainfrom
solid2/w-perf-rpc-critical-path
Oct 24, 2026
Merged

steipete merged 7 commits into
mainfrom
solid2/w-perf-rpc-critical-path

Conversation

@steipete

@steipete steipete commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Control UI can wait for unrelated configuration or subscription cleanup before showing the requested screen. Automations also downloads a redundant entry chunk before its page.

User Impact

Sessions can show its roster while configuration loads. Settings starts independent config and schema reads together. Replacing a chat subscription no longer waits for the old observer to release, while the new subscription acknowledgement still precedes history. Automations keeps its lazy route with one fewer sequential chunk. New Session reuses the existing system-info owner’s current machine-label sample instead of forcing another read.

Why This Change Was Made

Request policy stays with the existing runtime-config, session, chat and system-info owners. There is no new cache, public option, dependency, protocol change, tag, route or selector. Failed old subscription releases remain the capability’s cleanup responsibility and produce a warning. New Session retains the system-info owner’s ten-second expiry and connection/authorization checks; reconnect with a replacement hello still requests a new name.

The benchmark records browser-frame readiness, exact method/parameter duplicates, RPC request/reply intervals, chunk loads, and renderer thread CPU for all seven requested paths. Each first route visit resets origin storage, owners and HTTP cache. A fixture progress card now belongs only to the requested session, eliminating wrong-target synthetic retries.

Evidence

Current source: 42029f8d9ce6a23e8463ec11317b72e0017c1e83, integrated with main fade14fea6536384ac6697638d21159175faf424. The shared benchmark conflict preserves both critical-path collection and main’s thread-CPU/selector instrumentation. The later commits only complete the test hello type and add benchmark attribution; shipped UI bundle inputs are unchanged from the integrated build.

Proof Result
Original owner regressions 57 tests passed across three changed owner files; eight intended failures on the original base; 18 subscription cases also passed after the first main integration
New Session reuse/reconnect 35 tests passed; the new cross-consumer case fails with two RPCs before the fix and passes with one, then proves a second read after reconnect
Probe browser tests Five passed; UTF-8 transfer regression is red on the original base
UI/scripts and exact core UI-pages test typechecks, focused lint/format Passed; CI fixture typing repaired
Fresh independent review P0–P2 clean through integration, fixture repair and route profiling; the profiling boundary finding was fixed
Test-line ratchet Passed, 12,609 lines of existing headroom; no baseline change
Final production builds and strict comparison Passed against integrated main
Startup JS gzip 281,309 → 281,570 B (+261 B), seven requests unchanged; enforcement limit 281,809 B
Startup CSS 40,132 B, one request on both sides
Chat / New Session JS gzip 1,278,491 → 1,278,579 B / 767,021 → 767,176 B; 20 / 16 JS requests unchanged
Production Knip Same unused src/gateway/assistant-human-mentions.ts failure on the candidate and pinned baseline; no ignore or unrelated deletion
Final integration browser verification Passed all seven paths on both profiles, one fresh base/head pair each; config/schema overlap rechecked. These are behavior checks, not a new timing sample.
Full CI Exact-head 40081368160, attempt 1: all 72 jobs completed. The typecheck repair passed. Four E2E jobs fail only on the six matching inherited names below; their aggregate gate fails. Security and all other non-skipped jobs pass. Landed through the native inherited-failure route as b382f0d62ec0d8b97cf7b011b573e9d3904c596f; CI remains recorded as failed.

Production: 2,007 → 1,985 lines (−22). Tests/fixtures: 3,827 → 3,967 (+140). Benchmark/docs: 2,445 → 2,925 (+480). The growth is reusable measurement instrumentation and regression proof.

CI repair and baseline attribution

Prior run 40079389784 found one PR defect: the new reconnect tests assigned an incomplete hello fixture to the real Gateway type. The fixture now satisfies GatewayHelloOk; the exact failing core UI-pages test typecheck passes. No runtime guard or cast was added.

The six E2E failures in both that run and final-head run 40081368160 match exact names and errors in scheduled main 40078639310 at ee855ce57341. They cover active-turn navigation, delayed archive Undo after navigation, model-provider headroom's Usage link, Models-to-Usage layout at 400/820 px, and sidebar pin/unpin persistence. The first two also fail independently on clean exact merge base fade14fea653. The active-turn diagnostic shows Usage throwing on an incomplete sessions.usage mock (aggregates.costDaily), rather than delayed routing. These remain reported failures; no assertions, timeouts, or expected-failure lists were weakened.

Exact inherited cases:

Test file and case Final-head failure Matching scheduled-main failure
ui/src/e2e/session-management.archive-undo.e2e.test.ts — Control UI session management mocked Gateway E2E > offers Undo when an individual archive completes after navigate on the Sessions page job 120835704680 main job 120827460243
ui/src/e2e/chat-active-turn-recovery.e2e.test.ts — active turn recovery > restores the active assistant and tool after navigation job 120835704718 main job 120827460133
ui/src/e2e/settings-exit-layout-shift.e2e.test.ts — Settings exit layout shift > keeps the shell still from Models to /usage at 400px job 120835704721 main job 120827460205
ui/src/e2e/settings-exit-layout-shift.e2e.test.ts — Settings exit layout shift > keeps the shell still from Models to /usage at 820px job 120835704721 main job 120827460205
ui/src/e2e/sidebar-customization.e2e.test.ts — Control UI sidebar customization mocked Gateway E2E > pins and unpins routes and persists navigation state across reloads job 120835704721 main job 120827460208
ui/src/e2e/model-providers-studio-shape.e2e.test.ts — Control UI Model providers studio-shaped data mocked Gateway E2E > shows plan headroom per provider and leaves local usage to the Usage page job 120835704727 main job 120827460243

Solid refactor census for the touched Cron renderer and removed entry: createEffect 1→1, createMemo 1→1; render effects, untrack, direct listeners, DOM queries, flush, owner APIs and component cleanup remain 0. The route remains lazy; the serial entry/renderer import chain changes from two modules to one. Existing effect ownership and loading presentation are retained.

Performance experiment and its limits

Cron CPU-tail follow-through: the original local Task p95 increase prompted four separate profiled pairs and one final 20-pair, normal-instrumentation Cron-only comparison against the same original bundles. The final 20 pairs reduce Task median/p95 by 5.00%/1.44% and Thread median/p95 by 5.12%/1.79%; no pair increases total Task by more than 14.39% or Thread by more than 12.56%. Script median/p95 changes +0.32%/+3.60%. All samples retain five RPCs, 24,153 RPC bytes, zero duplicates and zero carry-in requests. Host one-minute load median is 50.40 (39.05–63.34).

Across all 40 unprofiled pairs, Task median is −1.91% and p95 is +17.34%; Script median/p95 is +0.45%/+7.57%. The original +43.59% Task tail remains unexplained and visible below—it was not discarded or conclusively attributed to instrumentation. It did not repeat in either half of the new run (Task p95 +0.36%/+1.50%), and the full new run's total CPU tails improve. On that repeated evidence, the lazy-entry deletion is retained; this is not a claim that every historical tail improves.

Local Cron CPU follow-up Median base → candidate p95 base → candidate
Final 20, total Task 243.292 → 231.118 ms 280.076 → 276.046 ms
Final 20, renderer Thread 250.405 → 237.580 ms 291.160 → 285.958 ms
Final 20, Script 76.283 → 76.526 ms 84.605 → 87.654 ms
Cumulative 40, total Task 237.475 → 232.935 ms 280.076 → 328.653 ms
Cumulative 40, Script 76.140 → 76.482 ms 84.605 → 91.008 ms

The four profiled pairs are attribution-only: native trace samples show paint/prepaint/commit and scheduler work, no large compilation or GC burst. Profiling disables existing owner counters, so those runs are not pooled with unprofiled results and cannot prove the old outliers' cause. The benchmark now records compile, DevTools, other-task and thread CPU, and supports destination-specific profiles that begin after navigation preparation. The added instrumentation is outside shipped UI bundles. Final local Cron readiness is 663.95 → 564.90 ms median and 1,987.21 → 1,282.96 ms p95; wall results remain descriptive on this loaded host.

The 20-pair experiment below is pinned to base 1adbd71472e and measured candidate source 182dc5467b2a, before the final main integration and machine-info reuse change. It is prior-head evidence, not final-head readiness/CPU timing. Final integration has fresh build-size proof, bounded browser verification and exact-head CI; the full timing campaign was not repeated over main’s independent CSS/runtime changes.

Automations removes one sequential chunk and improved median readiness 440.9 → 394.1 ms locally and 1,127.6 → 991.1 ms remotely (remote p95 1,673.9 → 1,181.3 ms). Other wall cells are not uniformly faster. Shared-host A/A controls exceed the wall timing band, so those values are descriptive. All 20-pair Script/Task paired medians remain within the +5% band; the pooled cold-Chat/local Script median is +5.7%, while its paired median is +2.4% against +2.5% in the identical-bundle control. Local Task p95 rises 27.4%/27.6%/43.6% on Sessions/Settings/Cron; those tails remain visible, with near-flat medians, unchanged request counts and noisy controls. This is not a claim that every latency or CPU tail improved.

Two candidate remote samples reconnect after readiness: Chat becomes ready at 2,295.6 ms and reconnects at 4,055.6 ms; New Session becomes ready at 1,201.3 ms and reconnects at 3,026.9 ms. All samples and their duplicate/RPC/idle-tail CPU costs remain included. Similar reconnects occur in the New Session A/A control. The normal retained-pane switch need not release its old subscription; its timing is not credited to the deferred-release fix.

These use production bundles with the existing synthetic Gateway. The remote profile models a 100 ms RPC floor plus separate 10 Mbps HTTP and serialized reply/event pipes; it does not model shared-link contention, outbound request bandwidth or real server/provider processing. “Cold” resets browser origin/cache state, not the browser process, V8 or OS caches. New Session readiness means the enabled composer, not every Start submission gate. CPU includes secondary work through the idle tail.

The target of eliminating every avoidable waterfall is not fully met. Sessions still admits its managed list after mount to retain query intent. Cron still owns initial list/status state in its mounted page; moving these reads before the chunk needs a handoff of that same scoped owner and its receipts. Agents is already usable before identity/model replies, so prefetching them would only move secondary work. Appearance retains a secondary system-info/model admission chain. Hovercard prefetch intentionally overlaps hover dwell and is preserved to avoid adding intentional-hover latency.

Local prior-head request/chunk waterfalls

Remote prior-head request/chunk waterfalls

All readiness/CPU/count tables, calibration and provenance

Request critical-path measurements

COMPLETE. Updated 2026-10-24T08:42:22.984904+00:00. All numeric tables use complete odd/base–even/head pairs only; pending rows are unmeasured, not zero. Final AB target: 20 interleaved pairs per path/profile, combined from two batches of ten pairs. A/A controls use ten identical-base pairs per profile, with separate Chat and New Session boot jobs.

Pinned comparison base: 1adbd71472e; moving origin/main is not used for attribution. Candidate source revision: 182dc5467b2a7b80344fa5a9cd8ca64060186bff. The candidate bundle was built from the merged working tree before commit and embeds 62d2ac5d0e8 with dirty: true (build time 07:22:30Z); the base embeds clean 1adbd71472e (07:22:39Z). Harness summary.head is its starting checkout identity, not necessarily the embedded bundle revision. Host: Apple M3 Ultra, 32 CPUs, macOS 27.0.1, Node 26.12.1. Workload: production Control UI, Headless Chromium, the existing synthetic Team-scale Gateway fixture, fixed fixture clock, first-load documents, and separate fresh boot owners before each first route visit. Local uses --latency-ms 0; remote uses --latency-ms 100 --network-latency-ms 100 --download-kbps 10000 --cold-http-cache. Both profiles use --thread-cpu-time. In remote critical-path mode the selected 10 Mbps rate applies to HTTP and to serialized synthetic WebSocket reply/event bytes after response eligibility; the RPC latency remains 100 ms. HTTP and WebSocket traffic use separate simulated pipes rather than one shared physical link, and outbound WebSocket request bandwidth is not modeled. No live Gateway or provider performance is measured.

Readiness is the first browser animation frame where the named visible controls are enabled: transcript plus composer for Chat/switch, message composer for New Session, first row plus Refresh for Sessions/Cron, Appearance font control plus settings search for Settings, and agent panel plus Refresh for Agents. For New Session this times only the visible enabled message composer, not all Start submission gates; request counts and CPU still include idle-tail metadata. It is not INP or a compositor paint timestamp. Script/Task CPU uses Chromium Performance metrics with --thread-cpu-time (timeDomain: threadTicks), excluding renderer descheduling, through the subsequent idle capture including secondary work; it is not CPU restricted to the readiness instant. Stack/resource instrumentation is enabled equally on both sides; tracing and CPU sampling profiler are disabled.

Readiness (milliseconds)

Path Profile Pairs Median base → head p95 base → head Median Δ p95 Δ
Cold Chat local 20/20 547.1 → 631.6 1021.2 → 1960.0 +15.4% +91.9%
Cold Chat remote 20/20 2165.5 → 2061.9 3286.0 → 2304.5 -4.8% -29.9%
Cold New Session composer local 20/20 427.5 → 407.8 829.6 → 1087.0 -4.6% +31.0%
Cold New Session composer remote 20/20 1176.8 → 1173.7 3394.6 → 1448.4 -0.3% -57.3%
Session switch local 20/20 314.5 → 316.4 337.8 → 348.1 +0.6% +3.0%
Session switch remote 20/20 567.4 → 569.3 628.9 → 603.8 +0.3% -4.0%
Sessions local 20/20 412.5 → 419.7 547.2 → 1254.5 +1.7% +129.3%
Sessions remote 20/20 1059.8 → 1021.3 1786.3 → 1418.2 -3.6% -20.6%
Settings / Appearance local 20/20 704.6 → 787.6 1303.0 → 1771.6 +11.8% +36.0%
Settings / Appearance remote 20/20 1629.0 → 1686.2 2091.9 → 3399.4 +3.5% +62.5%
Cron local 20/20 440.9 → 394.1 1287.8 → 2211.3 -10.6% +71.7%
Cron remote 20/20 1127.6 → 991.1 1673.9 → 1181.3 -12.1% -29.4%
Agents local 20/20 168.1 → 173.4 687.4 → 690.9 +3.1% +0.5%
Agents remote 20/20 434.9 → 470.2 799.7 → 1185.2 +8.1% +48.2%

Renderer CPU changes

Path Profile Pairs Script median Δ Script p95 Δ Task median Δ Task p95 Δ
Cold Chat local 20/20 +5.7% +1.5% +3.0% +4.8%
Cold Chat remote 20/20 +2.5% +2.1% +1.4% -0.2%
Cold New Session composer local 20/20 +1.0% -16.1% -2.6% -4.6%
Cold New Session composer remote 20/20 +2.5% +8.0% +3.0% +2.5%
Session switch local 20/20 +0.9% +6.4% +1.8% +4.9%
Session switch remote 20/20 +3.0% +2.1% +1.3% -1.3%
Sessions local 20/20 +2.2% +15.9% +1.1% +27.4%
Sessions remote 20/20 -1.2% -0.1% -0.1% -5.1%
Settings / Appearance local 20/20 -3.0% -3.8% +1.5% +27.6%
Settings / Appearance remote 20/20 -4.4% -3.5% +2.1% +1.2%
Cron local 20/20 +0.3% +12.2% +1.8% +43.6%
Cron remote 20/20 +3.6% -1.7% -6.4% -12.6%
Agents local 20/20 -1.3% +1.5% -2.6% -5.8%
Agents remote 20/20 -2.1% -4.1% -0.0% +17.0%

Paired CPU medians below compare each candidate run with its immediately preceding base run; the pooled medians and tails above remain unchanged. This also exposes shared-host drift without discarding slow samples.

Path Profile Script paired median Δ Task paired median Δ
Cold Chat local +2.4% +1.9%
Cold Chat remote +2.6% +1.6%
Cold New Session composer local +1.4% -2.5%
Cold New Session composer remote +1.3% +2.4%
Session switch local +3.6% +2.3%
Session switch remote +0.5% +0.8%
Sessions local +1.2% +0.6%
Sessions remote -0.7% -1.2%
Settings / Appearance local -7.5% -1.5%
Settings / Appearance remote -3.1% +1.6%
Cron local +1.0% +0.1%
Cron remote +1.5% -3.9%
Agents local -1.7% -0.2%
Agents remote +1.5% -5.9%

Identical-bundle controls and host load

A/A path Profile Pairs Readiness median / p95 Δ Script median / p95 Δ Task median / p95 Δ
Cold Chat local 10/10 +18.9% / -3.4% +2.6% / -6.8% +6.3% / -10.9%
Cold New Session composer local 10/10 +10.3% / +9.5% +0.9% / -22.3% -1.0% / -11.1%
Session switch local 10/10 -0.2% / -15.3% -1.0% / +3.1% -3.4% / -14.9%
Sessions local 10/10 +16.6% / -56.1% -1.3% / -3.7% -0.4% / -39.8%
Settings / Appearance local 10/10 +14.1% / +29.1% -0.4% / -1.8% -0.0% / +3.2%
Cron local 10/10 +2.3% / -49.9% -0.2% / -6.1% +0.7% / -27.4%
Agents local 10/10 -27.8% / -72.5% -6.9% / -9.2% -2.1% / -45.8%
Cold Chat remote 10/10 -4.0% / -9.2% +0.5% / +25.8% +1.6% / +19.1%
Cold New Session composer remote 10/10 +0.8% / +35.1% +8.5% / +21.3% +6.0% / +18.0%
Session switch remote 10/10 -1.1% / -3.3% -1.5% / -1.3% -2.9% / -3.6%
Sessions remote 10/10 -0.4% / -21.3% +3.8% / +1.1% +0.3% / -9.6%
Settings / Appearance remote 10/10 -5.2% / -22.5% +2.6% / -11.3% -8.0% / -15.0%
Cron remote 10/10 +4.1% / -0.2% -14.1% / -15.0% -11.6% / -9.0%
Agents remote 10/10 +3.2% / +0.8% +2.1% / -3.2% +2.4% / +23.0%

Completed A/A readiness cells outside the timing band: Cold Chat (local), Cold New Session composer (local), Sessions (local), Settings / Appearance (local), Agents (local), Cold New Session composer (remote), Settings / Appearance (remote). These establish wall-time noise; timing differences alone in those cells cannot establish an improvement or regression. Assess the full 20-pair AB CPU distributions and structural request evidence before concluding.

Dedicated New Session A/A controls are included above and must complete before this report is marked COMPLETE; a missing control is pending evidence. In the completed New-remote control, runs 6 and 14 reconnect after the composer is ready: each captures 87 RPCs rather than the usual 59 and 24 identical-request extras. Their idle-tail CPU includes reconnect work. New-local control sessions.describe counts vary from 0 to 30. All samples remain included; these count/tail differences already occur with identical bundles.

Job State Completed samples Host 1-minute load median (min–max)
aa-local complete 20/20 32.06 (23.47–40.73)
aa-new-local complete 20/20 32.74 (30.41–36.60)
aa-new-remote complete 20/20 32.21 (26.24–40.29)
aa-remote complete 20/20 36.22 (27.83–53.68)
ab-chat-local-1 complete 20/20 40.73 (26.60–75.99)
ab-chat-local-2 complete 20/20 30.74 (25.98–35.17)
ab-chat-remote-1 complete 20/20 33.80 (19.19–49.20)
ab-chat-remote-2 complete 20/20 45.29 (35.96–67.64)
ab-new-local-1 complete 20/20 46.85 (41.28–49.17)
ab-new-local-2 complete 20/20 30.55 (28.51–35.39)
ab-new-remote-1 complete 20/20 23.74 (22.28–28.12)
ab-new-remote-2 complete 20/20 37.17 (31.76–40.00)

Request counts

Counts span the action and idle capture. Different methods or parameters are different requests. Duplicate counts below are identical method/parameter extras within one interaction; concurrency is recorded separately in the JSON report.

Path Profile RPC median base → head RPC range base → head Duplicate extras range base → head
Cold Chat local 70.0 → 70.0 70–71 → 70–71 0–0 → 0–0
Cold Chat remote 70.0 → 70.5 70–71 → 70–109 0–0 → 0–33
Cold New Session composer local 31.0 → 31.0 31–60 → 31–60 0–1 → 0–1
Cold New Session composer remote 59.0 → 59.0 28–60 → 59–87 0–0 → 0–24
Session switch local 17.0 → 17.0 16–17 → 16–18 0–0 → 0–0
Session switch remote 17.0 → 17.0 16–17 → 17–17 0–0 → 0–0
Sessions local 2.0 → 2.0 2–2 → 2–2 0–0 → 0–0
Sessions remote 2.0 → 2.0 2–2 → 2–2 0–0 → 0–0
Settings / Appearance local 5.0 → 5.0 5–5 → 5–5 0–0 → 0–0
Settings / Appearance remote 5.0 → 5.0 5–5 → 5–5 0–0 → 0–0
Cron local 5.0 → 5.0 5–5 → 5–5 0–0 → 0–0
Cron remote 5.0 → 5.0 5–6 → 5–6 0–0 → 0–0
Agents local 6.0 → 6.0 6–6 → 6–6 0–0 → 0–0
Agents remote 6.0 → 6.0 6–7 → 6–7 0–0 → 0–0

Method-level count differences observed so far: Cold Chat/remote: agent.identity.get median 1→1, range 1–1→1–2; Cold Chat/remote: agents.list median 1→1, range 1–1→1–2; Cold Chat/remote: artifacts.list median 1→1, range 1–1→1–2; Cold Chat/remote: board.get median 1→1, range 1–1→1–2; Cold Chat/remote: chat.startup median 1→1, range 1–1→1–2; Cold Chat/remote: connect median 1→1, range 1–1→1–2; Cold Chat/remote: cron.list median 2→2, range 2–2→2–4; Cold Chat/remote: cron.status median 1→1, range 1–1→1–2; Cold Chat/remote: exec.approval.list median 1→1, range 1–1→1–2; Cold Chat/remote: models.authStatus median 1→1, range 1–1→1–2; Cold Chat/remote: models.list median 1→1, range 1–1→1–2; Cold Chat/remote: openclaw.approval.list median 1→1, range 1–1→1–2; Cold Chat/remote: plugin.approval.list median 1→1, range 1–1→1–2; Cold Chat/remote: plugins.controlUi.list median 1→1, range 1–1→1–2; Cold Chat/remote: plugins.controlUi.report median 1→1, range 1–1→1–2; Cold Chat/remote: progressCard.get median 1→1, range 1–1→1–2; Cold Chat/remote: question.list median 1→1, range 1–1→1–2; Cold Chat/remote: session.members.listEvidence median 1→1, range 1–1→1–2; Cold Chat/remote: session.reactions.list median 1→1, range 1–1→1–2; Cold Chat/remote: sessions.branches.list median 1→1, range 1–1→1–2; Cold Chat/remote: sessions.catalog.list median 1→1, range 1–1→1–2; Cold Chat/remote: sessions.companion.state median 1→1, range 1–1→1–2; Cold Chat/remote: sessions.describe median 30→30.5, range 30–31→30–34; Cold Chat/remote: sessions.groups.defaults median 1→1, range 1–1→1–2; Cold Chat/remote: sessions.groups.list median 1→1, range 1–1→1–2; Cold Chat/remote: sessions.list median 5→5, range 5–5→5–6; Cold Chat/remote: sessions.messages.subscribe median 1→1, range 1–1→1–2; Cold Chat/remote: sessions.processes.list median 1→1, range 1–1→1–2; Cold Chat/remote: sessions.subscribe median 1→1, range 1–1→1–2; Cold Chat/remote: system.info median 1→1, range 1–1→1–2; Cold Chat/remote: talk.catalog median 1→1, range 1–1→1–2; Cold Chat/remote: talk.config median 1→1, range 1–1→1–2; Cold Chat/remote: update.status median 1→1, range 1–1→1–2; Cold Chat/remote: users.list median 1→1, range 1–1→1–2; Cold Chat/remote: users.prefs.get median 0→0, range 0–0→0–1; Cold New Session composer/local: users.prefs.get median 2→2, range 1–2→2–2; Cold New Session composer/remote: agent.identity.get median 1→1, range 1–1→1–2; Cold New Session composer/remote: agents.list median 1→1, range 1–1→1–2; Cold New Session composer/remote: connect median 1→1, range 1–1→1–2; Cold New Session composer/remote: cron.list median 1→1, range 1–1→1–2; Cold New Session composer/remote: cron.status median 1→1, range 1–1→1–2; Cold New Session composer/remote: environments.list median 1→1, range 1–1→1–3; Cold New Session composer/remote: exec.approval.list median 1→1, range 1–1→1–2; Cold New Session composer/remote: models.authStatus median 1→1, range 1–1→1–2; Cold New Session composer/remote: models.list median 1→1, range 1–1→1–2; Cold New Session composer/remote: openclaw.approval.list median 1→1, range 1–1→1–2; Cold New Session composer/remote: plugin.approval.list median 1→1, range 1–1→1–2; Cold New Session composer/remote: plugins.controlUi.list median 1→1, range 1–1→1–2; Cold New Session composer/remote: plugins.controlUi.report median 1→1, range 0–1→1–1; Cold New Session composer/remote: sessions.catalog.list median 1→1, range 1–1→1–2; Cold New Session composer/remote: sessions.describe median 30→30, range 3–30→30–32; Cold New Session composer/remote: sessions.groups.defaults median 1→1, range 1–1→1–2; Cold New Session composer/remote: sessions.groups.list median 1→1, range 1–1→1–2; Cold New Session composer/remote: sessions.list median 4→4, range 1–4→4–5; Cold New Session composer/remote: sessions.subscribe median 1→1, range 1–1→1–2; Cold New Session composer/remote: system.info median 1→1, range 1–1→1–2; Cold New Session composer/remote: talk.catalog median 1→1, range 1–1→1–2; Cold New Session composer/remote: talk.config median 1→1, range 1–1→1–2; Cold New Session composer/remote: update.status median 1→1, range 1–1→1–2; Cold New Session composer/remote: users.list median 1→1, range 1–1→1–2; Cold New Session composer/remote: users.prefs.get median 1→1, range 1–2→1–3; Cold New Session composer/remote: users.prefs.set median 1→1, range 1–1→1–2; Session switch/local: chat.history median 0→0, range 0–0→0–1; Session switch/remote: progressCard.get median 2→2, range 1–2→2–2.

The intended scheduling changes need not lower RPC totals: config.get and config.schema begin together; Sessions no longer waits for config.get; a previous session’s sessions.messages.unsubscribe acknowledgment no longer delays the next subscription’s readiness; Cron removes a lazy entry-module hop. The current page keeps ownership and receives the same required data.

Scope and remaining work

This PR removes identified scheduling dependencies; it does not demonstrate that every avoidable waterfall is gone. Source-backed before/after diagrams are retained in .artifacts/rpc-source-graphs.md. Sessions still starts its managed sessions.list window after its page chunk mounts. First-entry prefetch could use that existing owner, but must preserve retained page search/status/query intent. Agents preloads agents.list; config, identity, and selected-panel reads still start at mount. The measured Agents panel becomes usable before identity/model responses, so advancing those secondary reads would not shorten this readiness boundary. Selected-model reads also require the correctly resolved settings-agent scope.

Cron still admits its parallel initial cron.list, cron.status, cron.runs, channels.status, and models.list reads after its page chunk. Moving jobs/status earlier requires transferring the same page-owned Cron state and receipts rather than a second cache. Secondary inventories can be deferred or use their existing shared owners. Appearance retains the secondary system.info→models.list dependency for observer-model controls; model parameters do not depend on the returned status, but a follow-up must preserve its access/availability contract.

All per-sample median/p95/min/max distributions, paired changes, method counts, and completed-job status are regenerated by python3 .artifacts/analyze-rpc-campaign.py and python3 .artifacts/render-rpc-measurement.py; source data stays in .artifacts/rpc-campaign-v3/. Superseded v2 A/A output remains in .artifacts/rpc-campaign-v2-analysis/ and is not mixed with this campaign. Failed jobs or incomplete pairs are never presented as completed evidence.

Visual proof

Current integrated-main baseline and candidate Automations screenshots use synthetic data. Layout and controls are preserved.

Before: synthetic Automations page

After: synthetic Automations page

Build provenance: the candidate build started from the reviewed merged working tree before commit 0952cf6b876a, so its embedded launcher label is 182dc5467b2a; the source remained unchanged through the build. The strict comparison ran after successful artifact promotion. No rebuild was done solely to polish the embedded label.

Start independent Settings reads together, let Sessions render while config loads, and keep prior subscription release off the next session's readiness path. Load Cron through its page chunk directly while preserving its lazy route and loading boundary. Extend the cold-load workload with isolated route visits, request timings, and usable-screen markers.
@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 24, 2026
@clawsweeper

clawsweeper Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 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-24T09:20:00.735787Z 42029f8 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.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui scripts Repository scripts size: L labels Oct 24, 2026
@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. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 24, 2026
@clawsweeper

clawsweeper Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR removes unrelated waits from Sessions, Settings, and chat readiness, eliminates an Automations entry chunk, and extends performance instrumentation.

Example: Open /sessions while config.get remains pending.

  • Before: The route waits for configuration before mounting the session roster.
  • After: The roster can load while configuration continues independently.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The implementation is focused and source review found no discrete defect, but supplied behavioral evidence covers settled rendering rather than the performance claims.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Requested screens and conversations can remain waiting on unrelated configuration or observer cleanup.
Reason: The maintainer-authored direction removes identifiable dependencies, preserves existing ownership, and reduces production code.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-authored PR addresses readiness dependencies still present on main, and source review found no discrete correctness or security defect.

Priority: P2
Reviewed head: 62d2ac5d0e81608fc28390ce2e7b8cd11c6714a8

Before merge

  • Complete next step - The PR owner should resolve the GitHub-reported merge conflict and validate the affected resolution on the replacement head.

Findings

None.

Tests

  • Missing end-to-end proof: Supply completed readiness/request evidence through the production owners and real Gateway transport, including delayed configuration and observer release, plus fresh-install and latest-stable upgrade coverage for Settings loading with preferences intact.
Agent review details

How this fits together

Control UI route loaders and chat subscription synchronization connect browser navigation to existing configuration and session owners, which issue Gateway requests and publish scoped results.

flowchart LR
  A[Browser navigation] --> B[Route loaders]
  B --> C[Configuration owner]
  B --> D[Session owner]
  E[Chat synchronization] --> D
  C --> F[Gateway RPC]
  D --> F
  C --> G[Solid views]
  D --> G
Loading

Technical review

Best possible solution:

Remove the unnecessary dependencies within the existing owners while preserving subscription acknowledgement, scoped publication, retry behavior, and lazy route loading.

Do we have a high-confidence way to reproduce the issue?

Current-main source directly shows Sessions awaiting configuration, Settings chaining schema loading, and chat readiness awaiting both subscription operations; no target code or tests were executed during this read-only review.

Is this the best way to solve the issue?

The defect is coupling readiness to unrelated work; the invariant is that each screen waits only for its prerequisites, and the patch makes the focused changes within existing owners.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 5dda1e2c1ae9.

Provenance checked

  • Chat observer release keeps the original intent (4d80fd9: The merged simplification retained failed releases in the shared owner and accepted cleanup at connection retirement rather than page-owned retries.)
  • Settings configuration and schema readiness changes intended behavior with a stated reason (1b1283f: Scoped Settings ownership retained chained reads; fix(ui): retain schema readiness and expose retry #180127 subsequently retained schema completion and explicit Retry. Earlier route serialization is visible in the July source blob, but its original rationale could not be recovered from unavailable commit objects.)
  • Sessions route readiness keeps the original intent (06c7cec: fix(ui): find sessions beyond the loaded search window #138167 removed competing route prefetch so the mounted page alone issues serialized roster queries; this PR preserves that owner.)
  • Automations lazy entry changes intended behavior with a stated reason (60f9f3a: refactor(ui): add Solid async recipes and cron reference #179123 introduced the lazy entry as an async recipe; fix: restore Control UI export validation #179879 made its renderer consumption explicit. This PR explains removing the extra chunk while retaining the deferred route import and Loading boundary.)
  • Cold-load benchmark keeps the original intent (2fb9f04: The existing benchmark distinguishes synthetic renderer measurements from Gateway HTTP serving; the added instrumentation retains that distinction and corrects wrong-session fixture responses.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Introduced changes and current-main behavior: The pinned introduction diff removes the configuration waits, detaches previous-observer release, and replaces the two-stage Automations import; fetched main still contains those dependencies. (ui/src/pages/sessions/route.ts:30, 62d2ac5d0e81)
  • Existing subscription cleanup contract: The capability deletes owned handles only after successful release, while the shared coordinator retains rejected releases and serializes operations targeting the same observer. (ui/src/lib/sessions/session-scoped-operations.ts:149, 62d2ac5d0e81)
  • Recorded cleanup tradeoff: refactor(ui): simplify session row and resource ownership #169044 explicitly accepted retaining a failed read observer until connection cleanup, with warnings and approval checks preserved. (ui/src/pages/chat/chat-history-subscription.ts:259, 4d80fd977174)
  • Supplied browser evidence: Both downloaded Automations screenshots were inspected and preserve the settled layout and controls; the complete current PR body still describes the renderer/RPC campaign as in progress. (62d2ac5d0e81)
  • Current merge and CI state: The live REST response reports mergeable=false and mergeable_state=dirty for the reviewed head; openclaw/ci-gate remains pending, with no diff-caused failing check established. (62d2ac5d0e81)
  • Policy and inspection limits: Root, UI, and scripts AGENTS.md files were read and applied; no deeper ancestor guidance or maintainer-notes directory exists. Some older history objects and the installed Solid cheatsheet are unavailable locally; current owners and relevant merged PR explanations were inspected. (AGENTS.md:1, 62d2ac5d0e81)

PR surface

Source -22, Tests +56, Docs +66, Other +351. Total +451 across 15 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 7 35 57 -22
Tests 5 112 56 +56
Docs 1 66 0 +66
Config 0 0 0 0
Generated 0 0 0 0
Other 2 364 13 +351
Total 15 577 126 +451

Review metrics

Metric Value Why it matters
Production versus tests Production +35/-57; tests and fixtures +112/-56 The runtime becomes smaller; test growth extends existing ordering and recovery cases without adding a production abstraction.
Benchmark options 2 new CLI flags --critical-path and --critical-path-route configure benchmark capture rather than installed OpenClaw behavior.

Labels

Label changes:

  • add P2: This improves bounded Control UI navigation and conversation readiness without evidence of an urgent outage or lost data.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: This improves bounded Control UI navigation and conversation readiness without evidence of an urgent outage or lost data.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 24, 2026, 3:24 AM ET / 07:24 UTC.

Preserve critical-path collection alongside thread-CPU timing. Recheck subscription behavior and refresh both performance comparison builds against the merged base.
Keep the existing system-info owner sample for New Session machine labels,
while retaining reconnect invalidation. Preserve both critical-path probes
and main's thread-CPU/selector instrumentation when merging current main.
@steipete
steipete enabled auto-merge (squash) October 24, 2026 09:27
@steipete
steipete disabled auto-merge October 24, 2026 09:29
@steipete
steipete merged commit b382f0d into main Oct 24, 2026
140 of 147 checks passed
@steipete
steipete deleted the solid2/w-perf-rpc-critical-path branch October 24, 2026 09:35
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 25, 2026
* perf(ui): remove request readiness waterfalls

Start independent Settings reads together, let Sessions render while config loads, and keep prior subscription release off the next session's readiness path. Load Cron through its page chunk directly while preserving its lazy route and loading boundary. Extend the cold-load workload with isolated route visits, request timings, and usable-screen markers.

* refactor(ui): drop unused Cron page export

* test(ui): model RPC bandwidth in critical-path measurements

* test(ui): type the reconnect hello fixture

* perf(ui): attribute route CPU in critical-path benchmarks
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 ci:full Keep ordinary native-locale CI selection on the next PR run. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant