Skip to content

perf(ui): avoid unchanged sidebar projections on session switches - #194171

Merged
steipete merged 7 commits into
mainfrom
solid2/w-perf-sidebar-selection-1106
Nov 6, 2026
Merged

steipete merged 7 commits into
mainfrom
solid2/w-perf-sidebar-selection-1106

Conversation

@steipete

@steipete steipete commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Switching between retained conversations rebuilds the sidebar row projection when its navigation closure changes, even when the resolved selection and list facts are unchanged. This repeats work after Gateway selection acknowledgement or arrival of a descriptor already covered by the held list.

Key the existing row memo by its resolved selection and source facts. Preserve list-owner identity; include the first and last visible rows so an off-window selected descriptor remains tracked in ordinary and roster modes. Membership, lineage, Home promotion, archive/involving-me exceptions, draft suppression, and descendant highlighting remain with their existing owners. There is no new cache, state owner, listener, effect, runtime dependency, or lazy boundary.

The row key compares 42 values at 200 rows. The trade is more key formation to avoid whole-tree work. Production is 334→339 lines; regression tests stay 652 lines after consolidating shared fixtures, clock settlement, and duplicate selection setup. Final diff: two files, net +5 lines (986→991 across those files); no test-line allocation remains. All audited Solid lifecycle/imperative counts remain 0→0.

Work census and correctness

Instrumented frozen-production diagnostics use 200 synthetic sessions, 15 visible, two selections per viewport. They are separate from acceptance timings. Full row recomputations fall 10→6, tree visits 2,002→1,202, and visible-section projections 8→4. Row materializations stay four. Eight of the base's ten full-row outputs are semantically identical; head has four identical outputs and the same two actual old/new-row selection updates. Navigation still changes identity ten times. This saves repeated projection, not navigation correctness or DOM changes.

Whole-document mutation census Base Head
Desktop attribute writes / unchanged writes 100 / 48 100 / 48
Desktop child-list records 2 2
Mobile attribute writes / unchanged writes 246 / 110 246 / 110
Mobile child-list records 22 22
Text records, either viewport 0 0

Instrumented baseline full-row calls spend 55.9 of 69.0 ms desktop and 62.4 of 77.2 ms mobile returning identical row payloads. These callback timings include instrumentation; they cannot be multiplied into, or treated as an exact fraction saved from, the earlier 231 ms sampled sidebar attribution.

The earlier exclusive sampled sidebar attribution breaks down approximately as follows; it is not the instrumented callback measurement above.

Historical sampled work Desktop ms Mobile ms
Projection, membership and tree 76.5 69.8
Presentation, effects and DOM 44.7 47.1
Snapshot and storage 5.6 9.3
Shared or unresolved 104.7 106.4

The existing mounted Home/route-selection test now also covers held descriptor reuse and updating an off-window selected descriptor, preserving its DOM identity and old/new aria-current checks. Existing owner tests cover late lineage/root visibility, collapsed ancestors, Home refresh, archive selection order, involving-me filtering, and viewing-dependent draft suppression. The held-descriptor regression failed on the original base and passes on head. Limits: no new mounted cross-combination test for excluded off-window + involving-me, Home descriptor replacement + promotion, or the roster appended endpoint; their input dependencies are retained and were independently reviewed.

Performance verdict and provenance

The completed current-base refresh is 360/360 passed observations, six cells with 20 rotated base/head/base-A/A triplets each. It compares 31a65d5 and frozen production e83d404, whose production inputs are unchanged in final test-only head 091ac2b.

Verdict: a clear Chromium script-CPU/work-count win, plus a 5.12% paired application-time and 5.71% task-CPU improvement on 6× desktop. WebKit desktop is modest and mobile is flat; the preliminary 5.5% WebKit result did not survive the larger sample. This is not a universal 5% latency win.

Current-base session switch Paired application change Paired script CPU change Application p95, base → head
Chromium 1× desktop −0.26% −6.54% 215.1 → 226.7 ms
Chromium 1× mobile −0.78% −7.63% 948.9 → 943.6 ms
Chromium 6× desktop −5.12% −6.25% 954.0 → 912.7 ms
Chromium 6× mobile −0.96% −3.89% 1,906.6 → 1,898.6 ms
WebKit desktop −1.80% — 278 → 270 ms
WebKit mobile −0.05% — 1,095 → 1,096 ms

The Chromium 1× desktop application tail is +5.39%, matched by A/A +5.63% (227.2 ms). WebKit mobile's +0.09% tail is also smaller than A/A +0.18% (1,097 ms). Every Chromium CPU p95 improves. Chromium 6× mobile's script ratio of aggregate medians is −5.11%, but its median paired change is −3.89%; the latter is the claim above. The large 1× mobile ratio-of-medians application movement is likewise not treated as a clean latency win. There is no attributable fresh target regression.

One-minute host-load ranges (min/median/max) were Chromium 1× 6.696/8.599/10.557, Chromium 6× 7.596/11.237/25.304, and WebKit 6.559/11.421/21.669. Every cell used identical benchmark sources. Jobs were serial; a pause between Chromium 6× and WebKit allowed the final local test/type/budget checks only after all browser children exited, and no observation spans that pause.

Earlier complete control matrix

The complete primary matrix has 24 cells ×20 rotated base/head/base-A/A triplets (1,440 observations), plus six exact-cell confirmations of ten triplets (180 observations). All 1,620 observations passed their behavior assertions. Chromium covers desktop/mobile at 1× and 6×; native WebKit covers both viewports because WebKit has no CPU-throttling API. All browsers are headless. Synthetic fixtures isolate renderer cost, not real Gateway/provider latency.

The original paired matrix compares base ed3c5dadbdbb8f51c70d8503dbb647112d78ad44 with frozen production a94a8cfed9709c1ee18e4f6598a1273ecaffbfbb (production-identical to a1f8008c307). A subsequent conflict merge takes main's catalog test verbatim and removes this branch's superseded catalog repair; production projection remains byte-identical. Main also changed transcript/layout work, so a fresh six-cell session-switch comparison is reported separately below rather than presenting the old absolute timings as merged-head measurements.

Original session-switch script CPU decreases by ratio-of-medians: Chromium desktop 1× −5.89%, 6× −8.68%; mobile 1× −6.62%, 6× −5.39%. Median paired changes are −7.28%, −4.16%, −6.68%, −6.51% respectively. Chromium desktop 6× application median is 920.45→880.10 ms (−4.38% ratio, −2.94% paired); task CPU 976.52→933.64 ms (−4.39% ratio). WebKit is modest/flat: pooled desktop application paired −1.42%; mobile paired −0.27%. Mobile 6× Chromium application is flat despite lower script CPU.

Acceptance uses ≤5% median regression with no worse p95, or ten additional pairs confirming the band. On a noisy host, CPU and actual changed-work counters govern attribution. Ratio of aggregate medians and median paired changes are different estimands; both are disclosed. Sub-1% tails are noise unless confirmed.

Control-flow flags, retained rather than hidden

Three Chromium 6× control cells received ten additional triplets. Pooled desktop typing paired application/task/script changes are +3.13/+4.88/+5.07%, versus A/A +0.94/+0.82/+4.47%. Pooled mobile typing is +0.78/+5.81/+8.92%, versus A/A +0.74/+0.27/+5.45%; its application p95 is +18.70% and script p95 +14.69%. Direct paired head/A-A mobile typing script is +0.96%, task −0.74%. Pooled mobile Settings has application/task/script p95 +7.00/+6.80/+8.17%; direct paired head/A-A task −0.91%, script +0.10%.

Separate unprimed base/head diagnostic action windows record zero calls to the changed sidebar owner, key-builder, memo, or row projection during typing (27 trusted inputs) and Settings open. Positive controls prove interception; Settings controls run after measurement. The original unprimed typing pair also records zero calls. The verified typing pair prewarms rows, so it is corroboration rather than a claim that prewarming is neutral. Settings removes the connected sidebar owner without replacing it. These bounded diagnostics explain why the noisy controls do not block this change under the campaign rule; they do not prove zero CPU difference or a control-flow speedup.

WebKit confirmations retain small tails: desktop Settings p95 53→55 ms (+3.77%); mobile typing 71→73 ms (+2.82%); pooled desktop switch 252→253 ms (+0.40%). WebKit mobile switch remains flat. The original Chromium 1× desktop toggle application p95 +8.42% is covered by A/A +9.88%, with task/script paired changes −1.80/−1.18%.

Mobile drawer: what users actually wait for

The earlier 878 of 1,095 ms is two pre-selection drawer-opening/driver waits, including the 441 ms opening animation twice. It is not a phone user waiting 878 ms after tapping a session.

A separate six-selection WebKit diagnostic measures closed DOM/inert state at median 37 ms; last DOM mutation 71 ms (p95 73); first-frame input-state sample 67 ms (p95 69), with the drawer inert, main active, and drawer/backdrop pointer-events disabled. That sample is an upper bound on observed state, not a paint or exact input-readiness timestamp. Panel opacity ends at 124 ms; transform/backdrop motion at 473 ms (p95 475); final hidden/offscreen geometry at 490.5 ms. Users still see about 0.47 s of closing/backdrop motion while input has already been released. If that veil feels slow, shorten the exit/backdrop duration in a separate UX change. This PR preserves the animation.

CI and review

The original exact-head ci:full run 42242196174 passed all UI units, all seven UI E2E shards, both real-Gateway shards, performance, types, lint and security. The earlier run 42235528314 failed Cached composer display reconciliation > keeps cached composer controls visually settled without accepting input before live settings (snapshot receipt timeout) and Control UI catalog publication with a real Gateway > opens Settings pickers from publication and acquires only on Refresh or Retry (discarded connection pending request). Both complete files passed once on original base and head; the composer timeout is not claimed fixed by replay. Neither was classified inherited: both passed scheduled main run 42233981965.

Main #194135 independently landed the catalog lifetime/publication fix, so conflict resolution uses main's file verbatim and this PR no longer changes it. The e83d404 merged head ran fresh ci:full in 42252035352: every UI unit/E2E/real-Gateway job passed; the only underlying failure was the test-line ratchet (34 lines beyond the tree ceiling despite matching allocation for this PR). This was not treated as inherited. The 091ac2b follow-up consolidates equivalent fixture setup and the two descriptor regressions into the existing Home/selection case, keeps every distinct observation, removes the allocation, and passes the gate with zero test-line growth. Its focused suite passes 18/18 and pnpm tsgo:ui passes. Exact-head full CI is 42256323765, pinned to 091ac2ba8d62fa7f96ea675267b63ec9f33d5738. Independent full-scope autoreview had no actionable P0–P2 findings; independent conflict-resolution review confirmed the production module is unchanged. The follow-up consolidation also has an independent, complete P0–P2 autoreview with no actionable findings; the reviewer explicitly checked descriptor, identity/ARIA, pagination, attention, approval, reparenting and fake-clock semantics. No changelog edit: release-note context is the redundant sidebar work removed by session switching.

Current-main byte proof

Same-machine production builds compare merge base 31a65d5def1a5209c0d0c69ce368c597592ef8ae and head e83d404bbf3bae97842d50149079fe7748431b81. Generated asset names are normalized before compression. Final head 091ac2ba8d62fa7f96ea675267b63ec9f33d5738 changes only tests/allocation from that measured head; production build inputs are unchanged.

Surface Base Head Delta
Startup JS gzip 89,622 89,622 +0
Startup CSS requests 1 1 +0
Chat boot JS gzip 1,288,399 1,288,208 -191
New Session boot JS gzip 797,452 797,261 -191
Chat boot JS Brotli 1,092,525 1,092,715 +190
New Session boot JS Brotli 677,568 677,758 +190

The coordinator accepted the original +197 B Chat / +113 B New Session gzip trade and allowed narrowly measured cap changes if needed. That allowance is unused: no cap or baseline changes. Gzip now falls 191 B on both routes; Brotli grows 190 B. The standalone base exceeds existing largest-JS, total-CSS-raw, Chat and New gzip caps; the strict head/base comparison passes with zero violations and zero warnings, reducing route/large-chunk gzip and leaving CSS unchanged.

Evidence

Proof Result
Current-base session switch 6 cells × 20 rotated triplets: 360/360 observations passed
Full flow matrix: switch, sidebar toggle, typing, Settings 24 cells × 20 triplets plus 6 confirmations × 10 triplets: 1,620/1,620 observations passed; source pins and noise limits below
Focused mounted suite 18/18 passed after consolidation
UI types / format / test-line gate Pass; test-line delta 0, allocation removed
Production Knip Pass on measured e83d404 production, unchanged by final test-only commit
Paired builds / strict assets Pass for head/base comparison; no ceiling raised
Visuals Desktop 1440×1000 and mobile open drawer 390×844: inspected synthetic-only, both before/after pairs byte-identical
Independent review Complete P0–P2 autoreview, no actionable findings; test consolidation independently reviewed
Exact-head full CI Passed: 42256323765, final head 091ac2b

Before / after

Both pairs are captured from the current paired production bundles. Mobile is explicitly opened and all drawer/backdrop animations are finished before capture; media-only observations do not enter timing statistics. The desktop SHA-256 is identical in both images, as is the mobile pair. Every image was inspected in full for incidental private data.

Viewport Before After
Desktop Desktop before Desktop after
Mobile, open drawer Mobile before Mobile after
Original full 24-cell matrix and host-load ranges (frozen pre-merge bundles)

Complete primary timing matrix

All 1,440 observations passed: 24 cells, 20 rotated base/head/A-A triplets per cell.

Medians and p95 are base / head / A/A, in milliseconds. Ratio compares aggregate medians; paired columns are medians of per-triplet percentage changes. These estimands are not interchangeable.

Application time

Cell Median B / H / AA p95 B / H / AA Ratio H/B Paired H/B Paired AA/B H p95 delta
Chromium 1x/desktop/chat-typing 56.750 / 55.750 / 67.600 78.700 / 82.300 / 84.800 -1.76% +0.93% +2.03% +4.57%
Chromium 1x/desktop/session-switch 213.200 / 211.800 / 213.750 241.500 / 213.600 / 240.200 -0.66% -7.52% +0.23% -11.55%
Chromium 1x/desktop/settings-open 47.500 / 47.250 / 46.600 49.000 / 48.100 / 48.200 -0.53% -0.54% -1.78% -1.84%
Chromium 1x/desktop/sidebar-toggle 147.050 / 146.100 / 145.700 150.800 / 163.500 / 165.700 -0.65% -0.21% -0.44% +8.42%
Chromium 1x/mobile/chat-typing 63.300 / 65.800 / 67.350 68.300 / 70.000 / 69.100 +3.95% -0.29% +2.69% +2.49%
Chromium 1x/mobile/session-switch 866.650 / 821.800 / 864.500 950.200 / 931.900 / 933.700 -5.18% -2.21% +0.01% -1.93%
Chromium 1x/mobile/settings-open 47.450 / 46.350 / 46.750 50.400 / 49.800 / 49.800 -2.32% +1.19% -0.73% -1.19%
Chromium 1x/mobile/sidebar-toggle 503.750 / 504.000 / 503.900 505.700 / 508.600 / 507.500 +0.05% +0.12% -0.07% +0.57%
Chromium 6x/desktop/chat-typing 352.150 / 347.000 / 349.850 384.600 / 406.900 / 396.800 -1.46% +1.65% -0.21% +5.80%
Chromium 6x/desktop/session-switch 920.450 / 880.100 / 926.750 1030.900 / 979.700 / 1007.800 -4.38% -2.94% +2.30% -4.97%
Chromium 6x/desktop/settings-open 351.250 / 345.150 / 328.850 379.100 / 369.400 / 384.800 -1.74% -2.23% -5.22% -2.56%
Chromium 6x/desktop/sidebar-toggle 1091.150 / 1108.400 / 1077.900 1469.900 / 1212.000 / 1130.800 +1.58% +0.64% -2.73% -17.55%
Chromium 6x/mobile/chat-typing 376.350 / 375.650 / 372.050 459.900 / 499.200 / 471.700 -0.19% -0.52% -1.22% +8.55%
Chromium 6x/mobile/session-switch 1809.000 / 1807.000 / 1812.200 1940.500 / 1940.800 / 1919.800 -0.11% +0.04% +0.31% +0.02%
Chromium 6x/mobile/settings-open 342.200 / 339.100 / 342.350 408.300 / 429.200 / 389.200 -0.91% -1.45% -4.20% +5.12%
Chromium 6x/mobile/sidebar-toggle 693.900 / 690.050 / 689.800 725.900 / 709.700 / 708.200 -0.55% -0.89% -1.62% -2.23%
WebKit/desktop/chat-typing 59.000 / 58.000 / 58.000 64.000 / 63.000 / 66.000 -1.69% -2.40% +0.82% -1.56%
WebKit/desktop/session-switch 226.500 / 223.000 / 229.500 249.000 / 253.000 / 251.000 -1.55% -3.47% +1.73% +1.61%
WebKit/desktop/settings-open 48.000 / 47.000 / 48.000 53.000 / 55.000 / 52.000 -2.08% -2.00% +2.22% +3.77%
WebKit/desktop/sidebar-toggle 236.000 / 234.000 / 233.000 267.000 / 266.000 / 267.000 -0.85% -3.11% -1.29% -0.37%
WebKit/mobile/chat-typing 65.500 / 66.000 / 65.000 69.000 / 73.000 / 69.000 +0.76% +0.00% -0.01% +5.80%
WebKit/mobile/session-switch 1099.000 / 1095.000 / 1097.500 1144.000 / 1103.000 / 1117.000 -0.36% -0.27% -0.64% -3.58%
WebKit/mobile/settings-open 44.000 / 44.500 / 43.500 48.000 / 49.000 / 49.000 +1.14% +1.14% +1.14% +2.08%
WebKit/mobile/sidebar-toggle 544.500 / 536.500 / 545.000 551.000 / 548.000 / 549.000 -1.47% -0.73% -0.09% -0.54%

Chromium CPU

Cell / metric Median B / H / AA p95 B / H / AA Ratio H/B Paired H/B Paired AA/B H p95 delta
Chromium 1x/desktop/chat-typing / task 40.738 / 40.371 / 41.587 46.143 / 46.827 / 46.635 -0.90% -0.52% +1.99% +1.48%
Chromium 1x/desktop/chat-typing / script 17.491 / 17.592 / 17.833 19.947 / 19.836 / 19.467 +0.58% -0.07% +1.95% -0.56%
Chromium 1x/desktop/session-switch / task 122.422 / 118.321 / 124.600 140.039 / 126.991 / 132.888 -3.35% -3.85% +1.37% -9.32%
Chromium 1x/desktop/session-switch / script 73.374 / 69.050 / 74.548 84.535 / 74.093 / 80.046 -5.89% -7.28% +1.83% -12.35%
Chromium 1x/desktop/settings-open / task 50.242 / 49.755 / 49.526 52.176 / 51.978 / 50.629 -0.97% -1.23% -1.83% -0.38%
Chromium 1x/desktop/settings-open / script 20.962 / 20.648 / 20.450 21.792 / 22.009 / 21.223 -1.50% -2.47% -1.51% +1.00%
Chromium 1x/desktop/sidebar-toggle / task 132.251 / 129.005 / 130.940 136.136 / 137.395 / 137.112 -2.45% -1.80% +0.27% +0.92%
Chromium 1x/desktop/sidebar-toggle / script 54.656 / 53.653 / 54.343 56.894 / 57.224 / 56.345 -1.84% -1.18% +0.35% +0.58%
Chromium 1x/mobile/chat-typing / task 47.680 / 46.846 / 47.288 50.660 / 50.230 / 51.228 -1.75% +1.32% -1.20% -0.85%
Chromium 1x/mobile/chat-typing / script 21.758 / 21.424 / 21.662 23.325 / 23.023 / 23.451 -1.54% +1.98% -0.85% -1.29%
Chromium 1x/mobile/session-switch / task 157.245 / 150.832 / 154.951 164.532 / 160.178 / 162.266 -4.08% -3.89% -1.28% -2.65%
Chromium 1x/mobile/session-switch / script 88.136 / 82.300 / 87.314 93.597 / 88.832 / 91.361 -6.62% -6.68% -1.16% -5.09%
Chromium 1x/mobile/settings-open / task 52.248 / 51.326 / 51.745 53.631 / 53.378 / 53.676 -1.76% -0.02% -0.79% -0.47%
Chromium 1x/mobile/settings-open / script 22.320 / 22.222 / 22.221 23.431 / 22.987 / 23.776 -0.44% +0.45% -0.83% -1.89%
Chromium 1x/mobile/sidebar-toggle / task 49.343 / 49.090 / 49.011 53.926 / 53.282 / 51.640 -0.51% +0.35% -1.48% -1.19%
Chromium 1x/mobile/sidebar-toggle / script 19.170 / 19.057 / 19.175 20.819 / 20.961 / 20.060 -0.59% +0.78% +0.43% +0.68%
Chromium 6x/desktop/chat-typing / task 396.214 / 389.892 / 380.143 433.174 / 438.717 / 444.967 -1.60% +2.22% -4.06% +1.28%
Chromium 6x/desktop/chat-typing / script 142.377 / 145.541 / 143.888 167.075 / 164.998 / 169.163 +2.22% +3.57% +1.22% -1.24%
Chromium 6x/desktop/session-switch / task 976.517 / 933.641 / 982.248 1105.032 / 1047.545 / 1068.463 -4.39% -2.54% +1.55% -5.20%
Chromium 6x/desktop/session-switch / script 675.500 / 616.896 / 671.809 760.275 / 711.969 / 739.125 -8.68% -4.16% +0.57% -6.35%
Chromium 6x/desktop/settings-open / task 440.192 / 435.341 / 416.630 476.425 / 463.919 / 489.717 -1.10% -3.57% -4.36% -2.62%
Chromium 6x/desktop/settings-open / script 187.859 / 184.098 / 180.185 208.387 / 204.156 / 208.702 -2.00% -5.64% -6.88% -2.03%
Chromium 6x/desktop/sidebar-toggle / task 1144.151 / 1165.410 / 1123.697 1362.618 / 1267.000 / 1192.299 +1.86% +0.88% -1.44% -7.02%
Chromium 6x/desktop/sidebar-toggle / script 476.130 / 482.178 / 470.447 551.084 / 537.096 / 510.288 +1.27% +0.59% -2.60% -2.54%
Chromium 6x/mobile/chat-typing / task 442.043 / 458.690 / 450.447 525.433 / 586.007 / 560.716 +3.77% +5.33% -0.90% +11.53%
Chromium 6x/mobile/chat-typing / script 189.448 / 198.514 / 194.887 234.086 / 268.469 / 247.843 +4.79% +5.89% +3.67% +14.69%
Chromium 6x/mobile/session-switch / task 1193.090 / 1177.646 / 1192.419 1350.567 / 1339.276 / 1356.397 -1.29% -4.78% +0.25% -0.84%
Chromium 6x/mobile/session-switch / script 741.045 / 701.084 / 735.010 841.601 / 803.691 / 816.934 -5.39% -6.51% +1.54% -4.50%
Chromium 6x/mobile/settings-open / task 412.763 / 410.467 / 421.239 495.386 / 526.031 / 461.131 -0.56% -0.12% -0.99% +6.19%
Chromium 6x/mobile/settings-open / script 182.690 / 179.296 / 186.034 221.683 / 231.612 / 201.733 -1.86% -3.26% -2.46% +4.48%
Chromium 6x/mobile/sidebar-toggle / task 337.675 / 329.588 / 335.805 378.410 / 357.818 / 359.788 -2.39% -3.56% -2.20% -5.44%
Chromium 6x/mobile/sidebar-toggle / script 153.059 / 150.541 / 147.582 171.274 / 160.793 / 163.441 -1.65% -1.18% -3.99% -6.12%

Host load and provenance

All jobs used the same benchmark source hashes. Each job's raw manifest retains the checked-out revision, browser version, bundle identities and hashes, machine CPU count, and command options. The frozen production content is unchanged across the matrix, even where test-only commits changed the checked-out revision.

Job Observations 1-min load min / median / max 5-min load min / median / max 15-min load min / median / max
gate-mobile-toggle-1 60 6.751 / 7.943 / 12.160 9.191 / 9.473 / 10.193 10.293 / 10.477 / 10.718
gate-mobile-toggle-6 60 7.097 / 9.151 / 14.228 8.954 / 10.089 / 11.265 9.958 / 10.497 / 10.971
gate-desktop-switch-6 60 10.629 / 12.548 / 16.250 10.353 / 11.807 / 12.050 10.417 / 11.114 / 11.231
chromium-1-desktop 240 7.519 / 17.931 / 22.668 13.752 / 18.106 / 19.495 13.058 / 14.172 / 14.958
chromium-1-mobile 180 7.317 / 9.406 / 18.004 10.749 / 12.147 / 13.420 12.285 / 12.794 / 13.455
chromium-6-desktop 180 8.460 / 14.918 / 27.326 10.464 / 14.915 / 19.062 11.806 / 13.385 / 15.938
chromium-6-mobile 180 10.205 / 15.500 / 25.707 14.128 / 15.853 / 18.513 15.079 / 15.641 / 16.487
webkit-1 480 4.570 / 6.842 / 12.954 6.263 / 8.145 / 9.681 7.643 / 9.220 / 10.474

This is the full primary matrix. The final verdict must also incorporate the separate/pooled confirmation results and the diagnostic source census; this table alone does not retire its primary tail flags.

Original confirmation cells and direct head/A-A diagnostics

Every flagged confirmation ran ten additional rotated triplets exactly once. Standalone and pooled30 results are both shown. Medians/p95 are B/H/A-A in milliseconds. Ratio of aggregate medians and median paired changes are distinct.

Set / cell / metric Median B / H / AA p95 B / H / AA Ratio H/B Paired H/B Paired AA/B
webkit-desktop-confirm / webkit/desktop/session-switch / app 227.500 / 222.500 / 223.000 252.000 / 248.000 / 253.000 -2.20% -0.49% +0.71%
webkit-desktop-confirm / webkit/desktop/settings-open / app 45.000 / 45.500 / 45.500 50.000 / 51.000 / 52.000 +1.11% +3.08% +1.19%
webkit-desktop-pooled / webkit/desktop/session-switch / app 226.500 / 223.000 / 228.000 252.000 / 253.000 / 253.000 -1.55% -1.42% +1.37%
webkit-desktop-pooled / webkit/desktop/settings-open / app 47.000 / 47.000 / 47.000 53.000 / 55.000 / 52.000 +0.00% +1.00% +2.22%
webkit-mobile-typing-confirm / webkit/mobile/chat-typing / app 65.000 / 65.500 / 65.000 76.000 / 69.000 / 70.000 +0.77% +2.31% +2.31%
webkit-mobile-typing-pooled / webkit/mobile/chat-typing / app 65.000 / 66.000 / 65.000 71.000 / 73.000 / 70.000 +1.54% +0.00% +0.74%
chromium-6-typing-confirm / chromium/desktop/chat-typing / app 419.700 / 425.150 / 422.750 501.500 / 526.400 / 539.600 +1.30% +5.87% +11.59%
chromium-6-typing-confirm / chromium/desktop/chat-typing / task 385.570 / 422.351 / 463.412 535.761 / 587.720 / 605.281 +9.54% +9.98% +6.34%
chromium-6-typing-confirm / chromium/desktop/chat-typing / script 147.865 / 166.184 / 181.419 218.258 / 216.671 / 241.147 +12.39% +13.96% +10.71%
chromium-6-typing-confirm / chromium/mobile/chat-typing / app 339.950 / 384.900 / 384.250 419.200 / 581.400 / 487.300 +13.22% +20.26% +4.35%
chromium-6-typing-confirm / chromium/mobile/chat-typing / task 378.013 / 407.227 / 473.462 512.217 / 522.160 / 581.184 +7.73% +13.80% +3.90%
chromium-6-typing-confirm / chromium/mobile/chat-typing / script 160.324 / 171.759 / 207.306 218.485 / 218.693 / 255.596 +7.13% +15.49% +8.65%
chromium-6-typing-pooled / chromium/desktop/chat-typing / app 357.100 / 359.800 / 355.450 480.800 / 469.900 / 539.600 +0.76% +3.13% +0.94%
chromium-6-typing-pooled / chromium/desktop/chat-typing / task 396.214 / 398.054 / 391.305 498.134 / 505.499 / 538.685 +0.46% +4.88% +0.82%
chromium-6-typing-pooled / chromium/desktop/chat-typing / script 142.377 / 151.612 / 151.721 216.189 / 212.545 / 208.736 +6.49% +5.07% +4.47%
chromium-6-typing-pooled / chromium/mobile/chat-typing / app 369.500 / 375.650 / 372.150 459.900 / 545.900 / 487.300 +1.66% +0.78% +0.74%
chromium-6-typing-pooled / chromium/mobile/chat-typing / task 425.630 / 443.466 / 450.447 525.433 / 586.007 / 580.952 +4.19% +5.81% +0.27%
chromium-6-typing-pooled / chromium/mobile/chat-typing / script 184.363 / 194.519 / 196.844 234.086 / 268.469 / 255.596 +5.51% +8.92% +5.45%
chromium-6-mobile-settings-confirm / chromium/mobile/settings-open / app 334.150 / 340.200 / 350.800 389.500 / 461.500 / 405.800 +1.81% +1.07% +3.98%
chromium-6-mobile-settings-confirm / chromium/mobile/settings-open / task 413.518 / 409.863 / 433.133 486.384 / 548.473 / 502.789 -0.88% +3.35% +1.94%
chromium-6-mobile-settings-confirm / chromium/mobile/settings-open / script 177.108 / 184.346 / 193.330 219.713 / 239.953 / 230.197 +4.09% +3.72% +2.32%
chromium-6-mobile-settings-pooled / chromium/mobile/settings-open / app 338.800 / 339.100 / 344.050 408.300 / 436.900 / 393.900 +0.09% -0.77% -2.24%
chromium-6-mobile-settings-pooled / chromium/mobile/settings-open / task 413.518 / 410.467 / 421.239 495.386 / 529.069 / 502.789 -0.74% +1.22% -0.41%
chromium-6-mobile-settings-pooled / chromium/mobile/settings-open / script 180.293 / 180.286 / 188.856 221.683 / 239.784 / 205.714 -0.00% +0.91% -0.01%

The pooled WebKit desktop switch tail is +1ms/+0.40%, matched by A/A. Desktop settings retains +2ms/+3.77%; mobile typing retains +2ms/+2.82%. They are small confirmed tails inside5%, not unchanged tails.

Secondary direct head/A-A diagnostics

This secondary comparison tests shared-host drift. It does not replace the preregistered head/base comparison or subtract two percentage medians. Values below are calculated directly per matched triplet.

Cell / metric Paired H/B Paired AA/B Direct paired H/AA p95 B / H / AA H p95 vs B
chromium/desktop/chat-typing / app +3.13% +0.94% +2.77% 480.800 / 469.900 / 539.600 -2.27%
chromium/desktop/chat-typing / task +4.88% +0.82% +3.70% 498.134 / 505.499 / 538.685 +1.48%
chromium/desktop/chat-typing / script +5.07% +4.47% +0.51% 216.189 / 212.545 / 208.736 -1.69%
chromium/mobile/chat-typing / app +0.78% +0.74% +2.76% 459.900 / 545.900 / 487.300 +18.70%
chromium/mobile/chat-typing / task +5.81% +0.27% -0.74% 525.433 / 586.007 / 580.952 +11.53%
chromium/mobile/chat-typing / script +8.92% +5.45% +0.96% 234.086 / 268.469 / 255.596 +14.69%
chromium/mobile/settings-open / app -0.77% -2.24% +0.73% 408.300 / 436.900 / 393.900 +7.00%
chromium/mobile/settings-open / task +1.22% -0.41% -0.91% 495.386 / 529.069 / 502.789 +6.80%
chromium/mobile/settings-open / script +0.91% -0.01% +0.10% 221.683 / 239.784 / 205.714 +8.17%

The mobile typing standalone confirmation was noisy: paired H/B script +15.49% and A-A/B +8.65%, while direct H/A-A script −15.85% and task −18.33%. The matched control is informative but is not proof that the primary H/B tail improved.

Key the row projection by resolved selection, source facts, and ordered
visible rows so descriptor replacements and Gateway acknowledgements do
not rebuild equivalent sidebar rows. Preserve membership, lineage, Home,
archive, involving-me, and draft rules.

The campaign coordinator accepts the measured Chat/New boot trade for the
session-switch gain; raise only those two caps to the measured head plus
64 B. Add a 20-line DOM and work-count regression allocation.
@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Nov 6, 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: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 6, 2026
@steipete
steipete marked this pull request as ready for review November 6, 2026 14:37
@clawsweeper

clawsweeper Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR keys the existing sidebar row memo by resolved selection and source facts instead of navigation-object identity.

Example: The selected conversation is agent:main:first and its row is already held in the sidebar list.

  • Before: A replacement detail descriptor rebuilds the row projection even though the list and resolved selection are unchanged.
  • After: The existing projection is reused, while switching to agent:main:second still updates the selected row.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused implementation has no identified correctness defect, but its required performance result remains unestablished.
Proof confidence 🧂 unranked krab (1/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: Switching retained conversations can repeat sidebar projection work despite unchanged displayed list facts.
Reason: The feature owner proposes a narrow reduction of redundant work while preserving the existing presentation and membership contracts.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored draft open: it addresses redundant sidebar work still present on main, and source review found no concrete introduced defect.

Priority: P2
Reviewed head: a94a8cfed9709c1ee18e4f6598a1273ecaffbfbb

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Supply the pending production-browser session-switch measurements and selection/descriptor observations; base-failing execution of the added regressions is also not shown.
Agent review details

How this fits together

The Control UI sidebar combines Gateway session lists, lineage descriptors, selection, filters, and attention facts into memoized row trees consumed by its renderer.

flowchart LR
  A[Gateway session lists] --> C[Navigation projection]
  B[Route and lineage facts] --> C
  C --> D[Existing row memo]
  A --> D
  E[Filters and attention] --> D
  D --> F[Sidebar renderer]
Loading

Technical review

Best possible solution:

Retain the focused change in the existing memo owner and establish its session-switch benefit before landing.

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

Source shows that replacing a held selection descriptor creates a new navigation projection, which current main uses to invalidate the row memo; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The patch is a small owner-local optimization: it preserves source invalidation, resolved selection, and supplemental descriptors without introducing another cache or projection path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 59b8a114bf6d.

Provenance checked

  • Row memo invalidation changes intended behavior with a stated reason (6f24d83: Stage identity conservatively propagated all upstream changes, including lineage changes that can alter row structure; the PR explicitly substitutes resolved selection and source identities for equivalent replacements.)
  • Pending creation and Gateway selection keeps the original intent (e8633bd: Unadmitted session creation must not become an authoritative actionable session; creation and admission remain explicit invalidation inputs.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 6f24d83 adds ui/src/components/sidebar-projection-memo.ts:265 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6f24d835b4a5; files: ui/src/components/sidebar-projection-memo.ts)
  • RoboClaw: Raw commit e8633bd adds ui/src/components/sidebar-projection-memo.ts:211 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: e8633bd89304; files: ui/src/components/sidebar-projection-memo.ts)

PR surface

Source +5, Tests +39, Other +2. Total +46 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 11 6 +5
Tests 1 39 0 +39
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 3 52 6 +46

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a focused improvement to session-switch rendering work, with no established urgent user-facing regression.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Publish the pending base/head browser measurements and runtime observations for the changed sidebar path.

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 November 6, 2026, 9:36 AM ET / 14:36 UTC.

@clawsweeper

clawsweeper Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 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-11-06T16:54:09.505411Z 091ac2b 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 merged commit 349fc96 into main Nov 6, 2026
112 of 117 checks passed
@steipete
steipete deleted the solid2/w-perf-sidebar-selection-1106 branch November 6, 2026 17:12
@steipete

steipete commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 7, 2026
…enclaw#194171)

* perf(ui): skip equivalent sidebar selection projections

Key the row projection by resolved selection, source facts, and ordered
visible rows so descriptor replacements and Gateway acknowledgements do
not rebuild equivalent sidebar rows. Preserve membership, lineage, Home,
archive, involving-me, and draft rules.

The campaign coordinator accepts the measured Chat/New boot trade for the
session-switch gain; raise only those two caps to the measured head plus
64 B. Add a 20-line DOM and work-count regression allocation.

* perf(ui): keep sidebar memo comparison constant size

* chore(ui): retain current route byte limits

* test(ui): scope catalog idle checks to the live connection

* test(ui): consolidate sidebar selection regression setup
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: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant