Skip to content

experiment(control-ui): bound warm sidebar render work [do not merge] - #189786

Closed
steipete wants to merge 1 commit into
mainfrom
steipete/coldload-warm-boot-render-budget
Closed

steipete wants to merge 1 commit into
mainfrom
steipete/coldload-warm-boot-render-budget

Conversation

@steipete

@steipete steipete commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

L271: stop at the measurement gate

Do not merge. The real-Gateway chat first-text-paint gate missed: paired median −92 ms, 8/11 pairs better, versus the predeclared ≤−100 ms and ≥9/11. Native dashboard CLS also increased by 0.000253 with separated IQRs. Close this experiment draft; preserve the branch for the lead. This does not establish the complete cached-page campaign exit criterion.

Head: d5380c837ffe97ea44a3733a93989550541be2dc. Experiment: #189786.

What Problem This Solves

A grouped sidebar mounted overscan rows in every section below the viewport. With the operator-shaped fixture, roughly 140 session rows were mounted although only about 30 fit in the native viewport. Each mounted row also repeatedly scanned the full advertised-method catalog for connection-level facts. These costs consume time after transcript DOM exists and before its first text paint, even with cached JavaScript delivery.

Why This Change Was Made

The existing sidebar window owner computed an end index of two when the section's first row was below the viewport (beyond === 0). It now gives that section an empty window. Selected, focused, dragged and menu-owned rows still use the existing retention path. Headers, logical spacer height, pagination and scroll behavior stay with the existing owner; there is no new staging or reveal gate.

Method membership now uses a weakly held Set per advertised-methods array identity. Hello and capability refreshes replace that array; separate catalogs and replacement catalogs get separate prepared facts. Live phase/scope admission is still evaluated by its existing owner. This removes repeated linear membership scans without adding a second authorization owner. No Gateway protocol, durable shape, config option or product filtering change was made.

User Impact

The experiment substantially reduces mounted sidebar rows and long-frame blocking. It does not clear the lane's first-paint bar, and a tiny consistent native dashboard layout shift remains unexplained. Settled synthetic screenshots show matching visible layout, but they do not prove that every cached region paints completely in the first frame. A full visual audit of all offscreen rows/badges was not completed.

Evidence

All performance comparisons ran on the same quiet AWS c7a.4xlarge, lease cbx_7a051eb464c4, with repo Playwright headless Chromium. Each harness/route used 11 alternating baseline/candidate pairs and an independent 11-pair A/A control. No performance result came from the shared Mac. CPU idle before the final visual run was 93.3%. Real-Gateway comparisons used synthetic 3,000-session data, archived chat/dashboard targets, three acknowledged live viewers, tall Markdown, and 80 ms RTT. Native comparisons used the Team-scale cold-load bench, live-fast, warm reload, archived session, pane-chrome probes, LoAF and RPC probes. Timed comparisons were unprofiled and omitted screenshot capture.

Both fixtures used the operator settings: category grouping with 97 catalog groups / 102 section-order entries, created sort, five collapsed sections, involving-me, preview off and stored empty-groups mode always. In the current projection that stored mode means always hide empty groups; native settled headers therefore number 71, not 97. This is the existing semantics, not a product change.

The measured baseline runtime was 7b29a23da2a6e787eca43c757bbc489f83d5b682. Only diagnostic warm-reload tools were taken from fixture commit 5e2a2b5eaf5109b82e40ef384b4c4928389d8879. Candidate UI differed by the two runtime modules in this commit. Final branch rebase base b891e0d84b7f differed from the measured baseline only in six test/support files, with no production differences. SHA-256 hashes of both measured candidate modules match this head. Both arms used the same Gateway build; this is runtime-patch evidence, not a claim that the server bundle was built at this head.

Values below are median [Q1, Q3], milliseconds except CLS and row counts. Paired delta is candidate minus baseline; medians of pairs need not equal differences of arm medians.

Real Gateway

Route Metric Baseline Candidate Paired median Δ Better / worse
chat First text paint 1120.0 [1070.0, 1174.0] 1040.0 [962.0, 1080.0] -92.0 8/3
chat Transcript DOM 527.0 [495.8, 558.8] 510.7 [490.5, 516.7] -15.8 7/4
chat Hello handled 458.3 [397.3, 492.2] 474.2 [450.2, 510.2] 16.4 5/6
chat FCP 1120.0 [1070.0, 1174.0] 1040.0 [962.0, 1080.0] -92.0 8/3
chat Final transcript rows DOM 1354.8 [1111.2, 1385.2] 972.1 [889.9, 1056.4] -307.8 9/2
chat LoAF blocking 456.9 [451.2, 510.1] 261.0 [250.4, 280.1] -207.3 11/0
chat CLS 0.004 [0.004, 0.004] 0.004 [0.004, 0.004] 0.0 3/3
dashboard First text paint 1044.0 [934.0, 1086.0] 788.0 [756.0, 822.0] -240.0 11/0
dashboard Transcript DOM 739.1 [661.9, 865.3] 534.0 [508.4, 604.6] -183.5 10/1
dashboard Hello handled 687.7 [385.4, 798.1] 547.4 [359.8, 616.5] -51.0 7/4
dashboard FCP 688.0 [630.0, 716.0] 572.0 [486.0, 720.0] -40.0 6/5
dashboard Final transcript rows DOM 1281.7 [1195.1, 1399.3] 1022.7 [909.5, 1063.5] -314.3 11/0
dashboard LoAF blocking 608.4 [558.4, 640.0] 284.1 [268.0, 314.3] -310.0 11/0
dashboard CLS 0.003 [0.002, 0.003] 0.003 [0.002, 0.003] 0.0 2/4

Native operator bench

Route Metric Baseline Candidate Paired median Δ Better / worse
chat First text paint 612.0 [608.0, 618.0] 508.0 [504.0, 512.0] -104.0 11/0
chat Transcript DOM 390.7 [387.9, 396.7] 380.5 [373.1, 383.5] -11.4 11/0
chat Hello received (not handled) 648.5 [641.9, 654.9] 530.7 [527.7, 538.8] -115.6 11/0
chat Hello handled unavailable unavailable unavailable 0/0
chat FCP 92.0 [88.0, 92.0] 92.0 [88.0, 94.0] 0.0 3/4
chat Final transcript rows DOM unavailable unavailable unavailable 0/0
chat LoAF blocking 510.0 [501.0, 513.5] 168.0 [160.5, 173.5] -337.0 11/0
chat CLS 0.022 [0.022, 0.023] 0.023 [0.022, 0.023] 0.000 3/8
chat Settled mounted transcript rows 4.0 [4.0, 4.0] 4.0 [4.0, 4.0] 0.0 0/0
chat Settled mounted sidebar rows 139.0 [139.0, 139.0] 31.0 [31.0, 31.0] -108.0 11/0
chat Settled group headers 71.0 [71.0, 71.0] 71.0 [71.0, 71.0] 0.0 0/0
dashboard First text paint 548.0 [544.0, 558.0] 460.0 [456.0, 466.0] -88.0 11/0
dashboard Transcript DOM 379.6 [376.4, 385.6] 379.5 [376.3, 384.7] 0.1 5/6
dashboard Hello received (not handled) 671.8 [668.7, 679.6] 555.4 [551.7, 563.4] -113.4 11/0
dashboard Hello handled unavailable unavailable unavailable 0/0
dashboard FCP 92.0 [92.0, 92.0] 92.0 [92.0, 92.0] 0.0 1/1
dashboard Final transcript rows DOM unavailable unavailable unavailable 0/0
dashboard LoAF blocking 479.0 [474.0, 502.0] 144.0 [135.0, 152.5] -328.0 11/0
dashboard CLS 0.023 [0.023, 0.023] 0.024 [0.024, 0.024] 0.000 0/10
dashboard Settled mounted transcript rows 3.0 [3.0, 3.0] 3.0 [3.0, 3.0] 0.0 0/0
dashboard Settled mounted sidebar rows 139.0 [139.0, 139.0] 31.0 [31.0, 31.0] -108.0 11/0
dashboard Settled group headers 71.0 [71.0, 71.0] 71.0 [71.0, 71.0] 0.0 0/0

Real chat and dashboard LoAF blocking improved in 11/11 pairs. Real dashboard first text paint improved in 11/11 pairs. Real chat first text paint has overlapping IQRs and only 8/11 wins; its result cannot pass the declared bar. Real chat hello-handled has a +16.4 ms paired median with 6/11 worse and overlapping IQRs; the A/A control is similarly noisy, so this is not a demonstrated regression under the campaign rule. Native dashboard CLS has separated IQRs and 10/11 positive deltas (one tie); record it as an adverse result despite its small absolute magnitude.

Connect was the first RPC in 100% of samples across both harnesses, both arms and controls. Each measured real reload issued one document navigation. Real settled mounted transcript rows remained one in both routes (the tall final virtualized row); native counts remained four chat / three dashboard. Real sidebar mounts fell 142→10; native 139→31. These are mounted DOM counts, not deletion of logical sessions. Native settled header sequences matched in every pair. The native harness does not expose owner hello-handled or final-row DOM completion in this configuration; its received-hello milestone must not be substituted for those missing metrics.

A/A controls

Harness Route Metric First arm Second arm Paired median Δ Better / worse
Real chat First text paint 1116.0 [1072.0, 1192.0] 1104.0 [1058.0, 1162.0] -4.0 6/5
Real chat Transcript DOM 512.4 [483.3, 528.0] 501.7 [474.6, 504.1] -24.0 7/4
Real chat Hello handled 329.6 [245.9, 588.0] 473.9 [244.8, 691.8] 19.8 5/6
Real chat FCP 1116.0 [1072.0, 1192.0] 1104.0 [1058.0, 1162.0] -4.0 6/5
Real chat Final transcript rows DOM 1231.8 [1085.8, 1344.2] 1247.6 [1158.5, 1277.9] -108.1 6/5
Real chat LoAF blocking 504.9 [463.3, 525.0] 506.5 [491.0, 562.3] 15.8 3/8
Real chat CLS 0.004 [0.004, 0.004] 0.004 [0.004, 0.004] 0.000 4/6
Real dashboard First text paint 1044.0 [996.0, 1210.0] 980.0 [916.0, 1208.0] -56.0 6/5
Real dashboard Transcript DOM 730.8 [515.4, 889.0] 511.6 [480.0, 836.9] -70.1 7/4
Real dashboard Hello handled 540.1 [397.4, 717.0] 667.5 [501.1, 728.8] 43.6 5/6
Real dashboard FCP 752.0 [686.0, 918.0] 896.0 [724.0, 930.0] 48.0 3/8
Real dashboard Final transcript rows DOM 1279.6 [1199.6, 1326.9] 1266.4 [1217.6, 1348.9] -72.8 7/4
Real dashboard LoAF blocking 592.4 [557.1, 622.0] 582.9 [548.2, 609.2] -20.1 6/5
Real dashboard CLS 0.002 [0.002, 0.003] 0.003 [0.002, 0.003] 0.0 2/5
Native chat First text paint 604.0 [596.0, 614.0] 600.0 [600.0, 614.0] -4.0 6/4
Native chat Transcript DOM 385.1 [381.9, 392.6] 387.1 [383.8, 391.6] 0.7 5/6
Native chat Hello received (not handled) 643.5 [637.0, 651.1] 642.3 [635.7, 652.5] 3.9 4/7
Native chat FCP 92.0 [88.0, 92.0] 88.0 [88.0, 92.0] -4.0 6/3
Native chat LoAF blocking 514.0 [497.5, 531.0] 514.0 [503.0, 540.0] 0.0 5/5
Native chat CLS 0.022 [0.022, 0.023] 0.023 [0.022, 0.023] 0.0 3/4
Native chat Settled mounted transcript rows 4.0 [4.0, 4.0] 4.0 [4.0, 4.0] 0.0 0/0
Native chat Settled mounted sidebar rows 139.0 [139.0, 139.0] 139.0 [139.0, 139.0] 0.0 0/0
Native chat Settled group headers 71.0 [71.0, 71.0] 71.0 [71.0, 71.0] 0.0 0/0
Native dashboard First text paint 544.0 [542.0, 558.0] 552.0 [544.0, 558.0] 4.0 4/6
Native dashboard Transcript DOM 381.0 [372.2, 389.6] 384.9 [377.5, 389.2] 1.2 5/6
Native dashboard Hello received (not handled) 678.6 [672.8, 688.6] 681.1 [672.4, 698.4] 3.1 4/6
Native dashboard FCP 92.0 [88.0, 92.0] 92.0 [90.0, 92.0] 0.0 2/2
Native dashboard LoAF blocking 501.0 [477.0, 505.0] 508.0 [482.5, 522.5] 3.0 5/6
Native dashboard CLS 0.023 [0.023, 0.023] 0.023 [0.023, 0.023] 0.0 2/0
Native dashboard Settled mounted transcript rows 3.0 [3.0, 3.0] 3.0 [3.0, 3.0] 0.0 0/0
Native dashboard Settled mounted sidebar rows 139.0 [139.0, 139.0] 139.0 [139.0, 139.0] 0.0 0/0
Native dashboard Settled group headers 71.0 [71.0, 71.0] 71.0 [71.0, 71.0] 0.0 0/0

All paired deltas

Pair order is chronological within each route and harness. Units follow the tables above.

Real A/B
Route Metric Deltas, pairs 1–11
chat First text paint 4.0, 52.0, -372.0, -132.0, -212.0, -4.0, 56.0, -144.0, -92.0, -236.0, -48.0
chat Transcript DOM -79.7, 18.2, -113.2, -11.8, -128.9, 22.5, 27.3, -33.0, -15.8, -40.6, 11.8
chat Hello handled 268.6, -486.9, 16.4, -14.2, 294.4, -258.9, 28.6, -259.0, 117.4, -37.1, 224.3
chat FCP 4.0, 52.0, -372.0, -132.0, -212.0, -4.0, 56.0, -144.0, -92.0, -236.0, -48.0
chat Final transcript rows DOM 185.3, -603.4, -141.1, -394.3, 91.1, -307.8, -268.8, -624.3, -336.4, -497.1, -8.9
chat LoAF blocking -258.9, -247.9, -135.9, -224.9, -228.6, -304.2, -182.2, -192.6, -117.5, -207.3, -195.1
chat CLS 0.001, -0.000, 0.0, 0.0, 0.000, 0.000, 0.0, -0.001, -0.000, 0.0, 0.0
dashboard First text paint -152.0, -504.0, -152.0, -324.0, -108.0, -20.0, -240.0, -264.0, -432.0, -240.0, -204.0
dashboard Transcript DOM -31.6, -480.5, -89.7, -433.8, 58.0, -29.9, -183.5, -265.4, -437.1, -13.3, -226.4
dashboard Hello handled -460.9, -46.5, -234.5, 29.7, 40.5, -475.8, -84.0, -302.2, 308.7, -51.0, 307.7
dashboard FCP -52.0, -248.0, -40.0, 88.0, -400.0, 88.0, 52.0, 80.0, 100.0, -472.0, -212.0
dashboard Final transcript rows DOM -469.5, -376.9, -344.4, -279.3, -157.2, -479.0, -306.9, -379.7, -69.0, -314.3, -89.2
dashboard LoAF blocking -392.0, -310.0, -250.4, -335.1, -292.7, -359.8, -199.9, -470.6, -209.8, -373.3, -260.8
dashboard CLS -0.001, 0.0, 0.000, 0.000, 0.0, -0.000, 0.0, 0.0, 0.000, 0.0, 0.000
Real A/A
Route Metric Deltas, pairs 1–11
chat First text paint -224.0, 100.0, -132.0, 72.0, -104.0, -32.0, -116.0, -4.0, 40.0, 68.0, 104.0
chat Transcript DOM 31.0, -29.4, 12.0, 53.3, -41.9, -23.8, -24.0, -29.6, -57.8, 38.9, -49.4
chat Hello handled 19.8, -261.4, 230.9, -438.2, 443.1, -236.9, 454.6, -33.1, 440.4, -452.7, 466.9
chat FCP -224.0, 100.0, -132.0, 72.0, -104.0, -32.0, -116.0, -4.0, 40.0, 68.0, 104.0
chat Final transcript rows DOM -173.9, -108.1, 112.8, -167.1, 128.5, -197.4, 404.7, -167.9, 407.3, -333.0, 195.4
chat LoAF blocking 15.8, 0.7, 60.5, -86.2, 101.2, -71.0, 14.4, 37.3, 79.4, -103.0, 213.9
chat CLS -0.001, 0.001, -0.001, -0.000, 0.000, 0.001, 0.000, 0.0, 0.000, -0.000, 0.000
dashboard First text paint 204.0, 288.0, 276.0, -352.0, 120.0, 48.0, -368.0, -100.0, -100.0, -56.0, -296.0
dashboard Transcript DOM 190.6, 215.4, 396.5, -467.9, 17.5, -70.1, -441.9, -37.4, -233.4, -134.7, -321.5
dashboard Hello handled 170.7, -587.3, -228.7, 127.4, 43.6, -86.5, 442.6, -54.0, 449.2, -214.3, 302.6
dashboard FCP 48.0, 32.0, -268.0, 112.0, 120.0, 48.0, 252.0, -100.0, 144.0, -52.0, 272.0
dashboard Final transcript rows DOM -2.3, -415.0, -83.4, -72.8, 100.8, -76.1, 219.5, -82.5, 234.7, -182.2, 374.6
dashboard LoAF blocking 97.8, -138.3, -20.1, -62.9, 137.9, -54.9, 23.6, -95.6, 119.1, -92.9, 16.1
dashboard CLS 0.0, -0.000, -0.000, 0.000, 0.0, 0.000, 0.000, 0.0, 0.000, 0.0, 0.000
Native A/B
Route Metric Deltas, pairs 1–11
chat First text paint -96.0, -100.0, -112.0, -80.0, -104.0, -108.0, -112.0, -88.0, -100.0, -104.0, -116.0
chat Transcript DOM -8.3, -16.1, -8.7, -9.7, -7.3, -18.5, -11.4, -13.6, -13.6, -24.6, -5.0
chat Hello received (not handled) -115.6, -118.6, -114.2, -92.0, -103.7, -125.5, -131.0, -108.2, -117.5, -123.6, -111.8
chat FCP 4.0, 4.0, 0.0, 8.0, -8.0, 0.0, 0.0, -4.0, 8.0, -4.0, 0.0
chat LoAF blocking -337.0, -354.0, -313.0, -329.0, -322.0, -349.0, -359.0, -328.0, -257.0, -355.0, -337.0
chat CLS -0.001, 0.000, -0.001, 0.000, 0.001, -0.001, 0.000, 0.000, 0.001, 0.001, 0.001
chat Settled mounted transcript rows 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
chat Settled mounted sidebar rows -108.0, -108.0, -108.0, -108.0, -108.0, -108.0, -108.0, -108.0, -108.0, -108.0, -108.0
chat Settled group headers 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
dashboard First text paint -76.0, -108.0, -92.0, -72.0, -80.0, -88.0, -92.0, -76.0, -92.0, -88.0, -116.0
dashboard Transcript DOM 9.6, -2.0, -0.9, 5.3, -3.0, 0.1, 2.1, 1.0, -1.4, 0.6, -24.2
dashboard Hello received (not handled) -114.2, -124.1, -130.5, -108.5, -113.4, -111.8, -94.4, -98.5, -108.8, -119.8, -161.6
dashboard FCP 0.0, 0.0, -4.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0
dashboard LoAF blocking -309.0, -328.0, -379.0, -326.0, -328.0, -313.0, -247.0, -386.0, -335.0, -353.0, -384.0
dashboard CLS 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.0, 0.000, 0.000, 0.000, 0.000
dashboard Settled mounted transcript rows 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
dashboard Settled mounted sidebar rows -108.0, -108.0, -108.0, -108.0, -108.0, -108.0, -108.0, -108.0, -108.0, -108.0, -108.0
dashboard Settled group headers 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
Native A/A
Route Metric Deltas, pairs 1–11
chat First text paint 12.0, -12.0, -16.0, 0.0, -8.0, -4.0, 20.0, -12.0, -4.0, 20.0, 12.0
chat Transcript DOM 4.5, -6.1, -10.8, 4.5, -6.1, 0.7, 2.4, -7.4, -12.8, 7.6, 17.0
chat Hello received (not handled) 12.8, -9.1, -104.8, 4.0, -2.3, 3.9, 4.4, -182.2, 0.3, 15.3, 17.2
chat FCP 0.0, 4.0, -8.0, -4.0, 0.0, -4.0, -4.0, -4.0, -12.0, 4.0, 4.0
chat LoAF blocking -9.0, 1.0, -52.0, -1.0, 15.0, 43.0, -8.0, -177.0, 8.0, 0.0, 16.0
chat CLS -0.001, -0.001, 0.0, -0.001, 0.001, 0.0, 0.0, 0.0, 0.001, 0.001, 0.001
chat Settled mounted transcript rows 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
chat Settled mounted sidebar rows 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
chat Settled group headers 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
dashboard First text paint 8.0, 0.0, -4.0, -24.0, -12.0, 4.0, -20.0, 8.0, 16.0, 4.0, 32.0
dashboard Transcript DOM 4.7, -1.9, 1.7, -17.8, -11.9, -6.3, -9.1, 13.3, 20.6, 1.2, 27.8
dashboard Hello received (not handled) 30.8, 21.9, -20.4, -25.5, -21.9, -9.9, 3.1, 35.7, 6.2, 0.0, 24.2
dashboard FCP 0.0, 0.0, 0.0, 4.0, -4.0, 0.0, -4.0, 4.0, 0.0, 0.0, 0.0
dashboard LoAF blocking 6.0, 15.0, 3.0, -32.0, -8.0, -5.0, -2.0, 67.0, 17.0, -10.0, 53.0
dashboard CLS -0.017, 0.0, 0.0, -0.017, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
dashboard Settled mounted transcript rows 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
dashboard Settled mounted sidebar rows 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
dashboard Settled group headers 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

Attribution: three profiled warm loads per route

CPU profiles and Chrome traces were captured together for attribution only. Profiling inflated absolute times; none of these samples entered the unprofiled gate. Samples were sorted by cumulative timestamp before phase clipping to handle negative/out-of-order V8 sample deltas. Owner self time is exclusive; inclusive maxima overlap and must not be added. Source maps came from the matching baseline assets.

Route / load DOM→paint gap Solid signal runtime self Sidebar-row self / max inclusive Methods self Bridge self (program) self Layout / style / minor GC
chat/warm-01 737.0 101.3 6.4 / 80.3 11.7 5.3 218.0 12.5 / 34.3 / 23.2
chat/warm-02 644.0 181.3 13.7 / 75.1 8.9 2.6 141.9 29.4 / 25.9 / 18.2
chat/warm-03 653.5 162.0 11.2 / 76.1 7.2 4.2 155.3 29.6 / 25.8 / 18.8
dashboard/warm-01 497.2 144.9 6.4 / 38.3 9.1 5.3 96.3 21.8 / 6.6 / 7.0
dashboard/warm-02 679.5 179.4 16.5 / 76.5 9.1 6.1 162.4 38.4 / 28.7 / 20.8
dashboard/warm-03 662.8 179.8 12.7 / 74.4 9.9 5.9 146.2 38.7 / 29.0 / 19.9

The unattributed (program) bucket is not evidence of a half-second parse/GC pause. Correlating each native sample with its innermost covering main-thread trace event places 45.7–142.2 ms per sample in FunctionCall, another 11.7–12.5 ms in v8.callFunction, and smaller amounts in RunTask, paint, prepaint, layerization and optimization finalization. Minor GC across the whole gap is 7.0–23.2 ms; layout 12.5–38.7 ms; style 6.6–34.3 ms. These trace durations overlap other owners. Generic native callback work remains opaque to this JS profile: exact C++ ownership inside FunctionCall was not resolved. No claim is made that every millisecond is assigned to a specific native function. The observed lever was fewer row subtrees, not relocating geometry reads or rewriting the bridge.

Regression proof and code size

The new prepared-facts test fails on the old implementation: catalog element visits are [100,101,2] instead of [1,1,1] across repeated/interleaved reads and replacement. The new browser regression fails on old code with 184 mounted rows versus a budget of 24 for 97 populated groups / 600 px viewport. It passes with the fix and checks header retention, scroll reachability, selected-row retention, collapsed content and invariant scroll height.

Single-file local runner commands used node scripts/run-vitest.mjs <file> --maxWorkers=1:

File Result Runner wall time
ui/src/lib/gateway-methods.test.ts 22 passed 2.72 s
ui/src/components/app-sidebar-session-visibility.browser.test.ts 5 passed 5.98 s
ui/src/lib/session-method-access.test.ts 15 passed 9.68 s

These are measured runner times, not fabricated timings for an unexecuted pnpm test wrapper. Total: 42 tests passed. Changed-file formatting and git diff --check passed. Detached local autoreview completed with no actionable P0–P2 findings; its reviewer did not execute the tests and lacked surrounding repository context, so source inspection and the actual tests provide that evidence.

Runtime production delta is +13 LOC: sidebar window +3/−1 and method facts +12/−1. Growth retains the existing virtualizer and one weak catalog cache; no new render system was added. Existing regression files grow by exactly 80 net lines; the per-change test allocation is exactly 80 with its reason. Five tracked files: those two runtime modules, the two existing test files and config/test-lines-allocations/sidebar-warm-boot-render-budget.txt.

Required stat excluding *.test.ts, test-support and docs: 3 files, 17 insertions, 2 deletions (includes the two-line test allocation; runtime alone is +13). No changelog edit; release-note context if revisited: avoid mounting offscreen grouped sidebar overscan and reuse prepared advertised-method membership on warm reload.

Validation limits and setup recoveries

This failed experiment did not run check-changed, full typecheck, native UI e2e files or the full UI e2e suite. Those remain required before any future ready PR. Exact-head draft CI at closure has 10 successful, 87 skipped, five queued/in-progress and one cancelled auto-response job, with no failed checks. Broad UI proof was skipped on the draft; this is not a claim of a green full validation run. The cancelled advisory automation is not a product-test failure; no rerun was requested.

The first native invocation used a now-rejected mock port. It was corrected to supported HTTP/mock ports 49660/49661. Real isolated Gateways remained on 196xx loopback ports. An early combined real A/A run completed chat but failed dashboard peer preparation; it was excluded. Separate route runs completed after fixing diagnostic peer setup to await the real sessions.viewers.set ACK before pausing each viewer. All candidate warm samples retained three viewers. This was fixture-only synchronization outside the timed region, not a production change or a bypass of the viewer guard. The initial remote command therefore ended unsuccessfully; later complete comparisons used the same retained lease and exact pinned runtime. No retries were used to select favorable pairs.

Settled synthetic screenshots

These full captures were inspected for private data and credentials. They contain only synthetic fixture data. They demonstrate settled visible layout, not first-frame completeness or timing gates. The screenshot pass was separate from all timed pairs.

Chat before:

Synthetic chat before

Chat after:

Synthetic chat after

Dashboard before:

Synthetic dashboard before

Dashboard after:

Synthetic dashboard after

Open questions for the lead

The render-window defect has deterministic red/green proof and broad LoAF gains, but accepting this candidate requires a different explicit gate or further work to meet the existing one. The tiny native dashboard CLS movement needs attribution before a future ready PR. Native owner hello-handled/final-row completion instrumentation and a complete cached first-frame audit remain gaps. No production geometry/bridge rewrite or sidebar product change is proposed from these results.

Keep overscan out of categories below the viewport while retaining selected, focused, dragged, and menu rows. Prepare advertised-method membership once per catalog identity so refreshed capabilities and independent connections remain distinct.
@clawsweeper

clawsweeper Bot commented Oct 31, 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.

@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. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR skips sidebar overscan for sections below the viewport and prepares Gateway method membership once per catalog array.

Example: A warm reload displays 97 sidebar categories, with five collapsed and a 600 px viewport.

  • Before: The reported baseline mounts 184 session rows, including rows in offscreen categories.
  • After: The added browser regression requires at most 24 mounted rows while preserving section headers, selection, and scroll height.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused optimization is useful, but existing consumer fixtures are incompatible with the cache and the declared production performance comparison remains pending.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Warm chat and dashboard reloads construct unnecessary offscreen sidebar rows and repeatedly scan the advertised method catalog.
Reason: The maintainer-authored direction removes concrete repeated work without adding configuration, changing persisted data, or replacing existing feature owners.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open as a maintainer-owned, explicitly paused experiment addressing current-main rendering waste; the catalog cache also requires an existing test-fixture repair.

Priority: P2
Reviewed head: d5380c837ffe97ea44a3733a93989550541be2dc

Before merge

  • Update existing fixtures to replace cached method catalogs (P2) - The identity cache breaks existing New Session consumer tests that mutate their advertised array. createBrowser() calls gateway.synchronize(), which unconditionally reaches synchronizeIdentityPreferences() and caches the initial ["projects.list"] catalog. The name-discovery cases then push "system.info" onto that same array; readSystemInfo() still sees it as unavailable and rejects instead of producing the expected Gateway name. Replace these fixture mutations with new catalog arrays, matching production capability refreshes, and run the affected consumer suite alongside the changed helper tests.

Findings

  • [P2] Update existing fixtures to replace cached method catalogs — ui/src/lib/gateway-methods.ts:26-31

Tests

  • Missing end-to-end proof: Supply candidate real-Gateway warm-reload measurements for both routes under the declared gate, with inspected row/group/badge continuity and native UI E2E results.
Agent review details

How this fits together

The Control UI receives session groups and Gateway method catalogs, then derives mounted sidebar rows and feature availability through existing presentation and access owners.

flowchart TD
  A[Gateway hello and capability refresh] --> B[Method catalog membership]
  B --> C[Existing scope and connection checks]
  D[Session groups and retained rows] --> E[Sidebar window geometry]
  F[Sidebar viewport] --> E
  E --> G[Mounted session rows]
Loading

Technical review

Best possible solution:

Keep both optimizations in their existing owners, update catalog-mutating fixtures to publish replacement arrays, and coordinate the overlapping sidebar change with the campaign lead.

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

Current-main source deterministically admits two rows from each entirely below-viewport expanded section; the body reports a matching red-before/green-after browser regression, which was not rerun during this read-only review.

Is this the best way to solve the issue?

The production changes are small and preserve existing ownership, retention, and access checks, but the new catalog-identity contract must also be applied to existing fixtures.

Full review comments:

  • [P2] Update existing fixtures to replace cached method catalogs — ui/src/lib/gateway-methods.ts:26-31
    The identity cache breaks existing New Session consumer tests that mutate their advertised array. createBrowser() calls gateway.synchronize(), which unconditionally reaches synchronizeIdentityPreferences() and caches the initial ["projects.list"] catalog. The name-discovery cases then push "system.info" onto that same array; readSystemInfo() still sees it as unavailable and rejects instead of producing the expected Gateway name. Replace these fixture mutations with new catalog arrays, matching production capability refreshes, and run the affected consumer suite alongside the changed helper tests.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 15d22ceb7c8f.

Provenance checked

  • Sidebar visible-range overscan keeps the original intent (ff2c841: perf(ui): render only visible content during chat boot #182814 introduced sidebar windowing to reduce chat-boot work while retaining active, selected, focused, dragged, and menu rows.)
  • Gateway advertised-method lookup keeps the original intent (b09b35c: The original helper centralized Gateway hello membership checks; later access-control and reconnect work kept advertisement separate from live connection and scope admission.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +13, Tests +80, Other +2. Total +95 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 15 2 +13
Tests 2 81 1 +80
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 5 98 3 +95

Labels

Label changes:

  • add P2: The patch targets bounded Control UI reload rendering and repeated lookup work, with no demonstrated outage or urgent user regression.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The patch targets bounded Control UI reload rendering and repeated lookup work, with no demonstrated outage or urgent user regression.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • 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 31, 2026, 5:58 PM ET / 21:58 UTC.

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 P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S 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