Skip to content

perf(control-ui): load older history in 2 MiB pages - #176480

Merged
steipete merged 2 commits into
mainfrom
steipete/coldload-older-page-size-2mib
Oct 18, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/coldload-older-page-size-2mib

Conversation

@steipete

@steipete steipete commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Related: #176385

What Problem This Solves

Reaching the beginning of a long conversation requires too many small older-history requests and transcript prepends.

User Impact

Older history loads in 2 MiB pages instead of 1 MiB. In the measured long histories, traversal takes 9 rather than 17 pages (normal) and 10 rather than 19 (tool-heavy), with total time falling from 6.07 to 3.74 seconds and 6.55 to 4.25 seconds. The accepted tradeoff is a higher median worst arrival frame: 195 → 213 ms and 142 → 171 ms. No migration or user action is needed.

Why This Change Was Made

Double the byte budget at the existing history request owner, shared by direct older-page reads and staged prefetch. Keep the 1000-message limit: it does not bind at 2 MiB. Keep the startup budget and one automatic viewport-fill policy unchanged. The 2 MiB setting remains below the server's 6 MiB cap.

The original approximately 120 ms arrival-frame target was invalid because even the 1 MiB baseline exceeds it. The coordinator accepted the 35–38% traversal improvement and +18.6/+29.3 ms worst-arrival tradeoff. 5 MiB is deliberately excluded: larger pages carry more per-arrival work and the message limit can remove their benefit. No new scheduling, caching, configuration, or transport machinery is added.

Evidence

The campaign began with a signed-in reload of a dashboard deep link showing 14 visual states over about 15 seconds. This change addresses deliberate backscroll after reload, not the already-separated startup path. All fixtures and captures used here are synthetic.

Curve

Times are milliseconds, shown as median [Q1, Q3] across seven runs. Arrival is each run's worst completed arrival frame. Fill is each run's median per-page fill. Byte totals cover history responses only.

History Budget (MiB) Pages Total traversal ms Worst arrival frame ms Fill/page ms Largest raw page MiB Total raw / deflate estimate MiB
normal 1 17 6068.7 [5966.2, 6092.2] 194.7 [184.4, 198.3] 160.3 [157.3, 165.4] 0.999 16.319 / 2.736
normal 2 9 3737.0 [3723.8, 3754.3] 213.3 [205.2, 214.5] 185.7 [180.4, 189.4] 2.001 16.303 / 2.725
normal 3 6 2811.9 [2795.5, 2848.2] 193.2 [188.7, 203.2] 186.0 [182.2, 191.9] 3.002 16.297 / 2.722
normal 5 5 2585.8 [2563.8, 2610.3] 223.9 [217.5, 228.9] 205.4 [193.5, 209.4] 4.057 16.295 / 2.721
tool-heavy 1 19 6550.1 [6490.3, 6585.2] 141.7 [139.3, 142.7] 135.5 [132.8, 140.2] 1.002 18.572 / 3.086
tool-heavy 2 10 4247.7 [4242.6, 4282.6] 171.0 [163.8, 173.9] 160.3 [155.1, 162.5] 2.002 18.555 / 3.074
tool-heavy 3 7 3451.4 [3339.4, 3508.5] 174.4 [168.9, 200.8] 167.7 [165.2, 169.2] 2.981 18.549 / 3.068
tool-heavy 5 7 3507.9 [3422.8, 3551.4] 172.8 [168.1, 178.9] 168.1 [167.0, 171.8] 2.981 18.549 / 3.068

The tool-heavy 3 and 5 MiB requests return the same pages: the 1,000-message cap binds at about 2.981 MiB. Normal 5 MiB requests bind at about 4.057 MiB. Response envelopes can slightly exceed the message-only budget.

Paired deltas against 1 MiB

Candidate minus baseline, in round order. All values are milliseconds. No slow sample was discarded.

History Budget Total traversal deltas Worst arrival-frame deltas Whole-traversal maximum-frame deltas
normal 2 -2185.3, -2328.3, -2196.8, -2390.1, -2362.5, -2367.9, -2227.5 -3.8, +12.3, +31.3, +32.0, +7.1, +30.0, -10.5 -3.8, +12.3, +31.3, +32.0, +7.1, +30.0, -10.5
normal 3 -3116.0, -3224.0, -3172.2, -3181.4, -3279.0, -3293.9, -3186.8 -32.0, -5.1, +10.0, +3.6, +8.5, +23.3, +2.8 -32.0, -5.1, +10.0, +3.6, +8.5, +23.3, +2.8
normal 5 -3354.0, -3415.7, -3344.3, -3510.7, -3573.5, -3519.2, -3367.6 +13.1, +30.2, +27.4, +37.1, +46.7, +31.0, +23.6 +13.1, +30.2, +27.4, +37.1, +46.7, +31.0, +23.6
tool-heavy 2 -2341.0, -2342.2, -2309.1, -2114.6, -2273.7, -2287.2, -2210.5 +3.2, +33.9, +35.4, +26.5, +33.2, +18.7, +14.1 +3.2, +20.1, +13.4, -40.1, +26.1, +13.1, -1.3
tool-heavy 3 -3279.9, -3047.7, -2946.6, -2977.0, -3168.2, -3368.1, -3003.3 +13.2, +36.4, +36.5, +60.9, +22.7, +24.0, +57.2 +13.2, +25.1, +14.5, -16.8, +15.6, +18.4, +44.8
tool-heavy 5 -2949.7, -3262.9, -2985.1, -2921.3, -3013.5, -3194.5, -3002.4 -5.6, +28.6, +37.2, +33.5, +26.9, +22.0, +41.8 +2.0, +22.8, +15.2, -44.2, +34.6, +48.4, +26.4
Measurement method, reload controls, and attribution

Environment and method

AWS Crabbox cbx_4964b2ff9098, fixed c7a.4xlarge, 16 vCPUs (AMD EPYC 9R14), 30 GiB RAM. Node v24.19.0, pnpm v12.11.1, and the repository Playwright Chromium build (Chrome for Testing 156.0.8078.4). One instance and one boot ID served the complete comparison. Pre-run load averages ranged from 0.52 to 2.47. Setup, UI build, and initial attribution succeeded in run_ea1047a451d2147bc40f4b0708f9e31e. The curve continued through the sanctioned SSH transport on that retained lease.

The production-bundle Team-scale benchmark retained its canonical shell, Online roster, plugin inventory, and common 240-message tail. The older prefix contains either 4,000 plain-text messages (1,000-character questions and 7,200-character answers) or 6,200 messages in 100 tool-heavy turns (30 call/result pairs per turn, collapsed activity). Full histories contain 4,240 and 6,440 messages respectively. These are long synthetic stress cases, not copies of a private conversation.

Seven rounds per history shape covered 1/2/3/5 MiB, reversing order on even rounds: 56 unprofiled browser runs. All use the same bundle and source, Chromium, 35 ms synthetic inbound latency, and 4 ms minimum reply spacing. The benchmark changes only outgoing older-history maxBytes after the reload measurement. The server fixture honors that budget and the unchanged 1,000-message limit. Startup requests remain untouched.

Each measured page goes through the native history owner with staging disabled (loadOlderMessages(false)) to isolate one request and one prepend. The driver moves to older content between pages and reaches the beginning. It validates progress, exactly one history response per step, and a visible transcript viewport. This is a controlled page-through experiment; it does not measure continuous-wheel prefetch effectiveness or a real Gateway network.

Page fill is response arrival to the visible-viewport receipt after two paint opportunities. LoAF records are drained after the phase. Arrival-frame statistics include completed frames after response arrival and before that page's filled receipt; the next scroll can begin in the same task as the receipt, so its later-ending frame is attributed to the overall traversal instead. The whole-traversal maximum includes every scroll and the final movement to the beginning. Raw data retains the timestamps and the original overinclusive prototype field; analyze.py reconstructs the completed-arrival metric. Frames below the browser's 50 ms LoAF threshold are conservatively reported as at most 50 ms.

Bytes below are actual history response JSON bytes. Compression is a separate level-1, fresh-context permessage-deflate estimate, excluding WebSocket/TLS overhead; the mock transport does not negotiate compression. Estimates run outside the measured interval. Profiled setup runs and the two superseded boundary-calibration attempts are excluded from the curve.

Reload control

All 56 reloads issue zero boot chat.history calls and one unchanged 38,763-byte chat.startup response. This synthetic response does not model the live retained-receipt fast path. No reload timing metric regresses under the campaign's non-overlapping-IQR or ≥6/7 paired-sign-plus-size rule. The occasional slow paints remain in the data. Because the budget override activates after reload, these are unchanged-code controls, not a shipped-candidate reload proof.

History Budget FCP ms LoAF blocking ms Worst reload frame ms
normal 1 384.0 [380.0, 404.0] 237.0 [226.0, 280.5] 170.0 [166.5, 172.5]
normal 2 380.0 [374.0, 394.0] 230.0 [216.5, 248.5] 169.0 [165.0, 171.0]
normal 3 372.0 [370.0, 490.0] 272.0 [243.5, 300.5] 171.0 [167.5, 247.0]
normal 5 388.0 [378.0, 494.0] 246.0 [226.5, 276.5] 167.0 [164.5, 252.5]
tool-heavy 1 384.0 [376.0, 402.0] 248.0 [239.0, 267.5] 174.0 [169.5, 179.5]
tool-heavy 2 376.0 [354.0, 380.0] 233.0 [222.5, 299.0] 165.0 [164.0, 205.5]
tool-heavy 3 404.0 [390.0, 404.0] 237.0 [228.5, 256.5] 170.0 [167.5, 172.0]
tool-heavy 5 376.0 [374.0, 390.0] 246.0 [224.5, 281.0] 167.0 [165.0, 171.0]
History Budget FCP deltas Blocking deltas Worst-frame deltas
normal 2 -196.0, +0.0, -24.0, -4.0, +28.0, -12.0, +20.0 -92.0, -13.0, -24.0, +1.0, -22.0, -41.0, +38.0 -161.0, -6.0, +4.0, -1.0, +24.0, -8.0, +1.0
normal 3 -204.0, -8.0, -36.0, +192.0, +212.0, +20.0, -28.0 -29.0, -13.0, +18.0, +85.0, +104.0, -52.0, +11.0 -160.0, +4.0, +5.0, +153.0, +178.0, -6.0, -4.0
normal 5 -184.0, +232.0, -36.0, +24.0, +204.0, -16.0, -16.0 -79.0, +73.0, -30.0, -41.0, +94.0, -61.0, +29.0 -160.0, +171.0, -2.0, -2.0, +175.0, -12.0, -4.0
tool-heavy 2 -48.0, -52.0, -24.0, -8.0, +4.0, +44.0, -32.0 +103.0, +95.0, -28.0, -17.0, -21.0, -99.0, -24.0 +69.0, +80.0, -10.0, -3.0, -13.0, -80.0, -10.0
tool-heavy 3 +20.0, -8.0, -4.0, +192.0, +32.0, +72.0, -28.0 -18.0, +26.0, -46.0, +107.0, -3.0, -108.0, -17.0 -15.0, +3.0, -1.0, +171.0, -7.0, -76.0, -3.0
tool-heavy 5 -48.0, +16.0, -32.0, -16.0, +32.0, +44.0, -32.0 +115.0, +54.0, -55.0, +33.0, -21.0, -86.0, -51.0 +62.0, +8.0, -10.0, +2.0, -11.0, -80.0, -14.0

Attribution and limits

Source-mapped --cpu-profile captures execute requestOlderChatHistoryPage, performOlderMessagesLoad, the pane projection, and the real transcript render path. On the 1 MiB diagnostic runs, Solid flush contains 65.4% of sampled normal-history work and 62.1% of tool-heavy work. maxTranscriptScrollOffset accounts for 19.4% and 15.5% self time; its principal chain is syncHistoryObserver → isMaintenanceScroll → transcript geometry. The supplied live source-mapped frame places the same geometry function at 12.3% of sampled busy time. This demonstrates the relevant hot path at a comparable share, while the synthetic long histories and controlled scroll pattern limit extrapolation to a particular live conversation.

The immediate history-apply function accounts for only 0.9–1.5% inclusive time in those diagnostic runs. The evidence points to render/layout work, not a large synchronous history-apply loop. It does not prove that a slicing change at the request owner would remove that cost, and no scheduling, caching, or transport workaround was added. Remaining rendering cost is not claimed to be inherent.

The separate 2 MiB --cpu-profile-compare captures preserve that attribution: Solid flush contains 58.1% (normal) and 54.8% (tool-heavy), direct history application 1.0% and 1.4%, and transcript geometry 15.4% and 12.8%. Median synchronous message dispatch is approximately 11.0 and 10.2 ms. These profiles are diagnostic, not samples in the timing table.

Implementation validation

Final head: e7b1e7e8d8bea1dfe40c71dace29f3b39a726e2d. Autoreview is clean through P2, including the follow-up correction to the real-Gateway request-budget assertion.

The native-owner budget regression failed with the original 1 MiB value (expected 2097152, received 1048576), then passed with 2 MiB. All 74 focused unit tests pass on the final head. Five files cover the owner, one automatic viewport fill, startup/history, reply navigation, and scroll-maintenance intent.

Final-head AWS proof on cbx_887ccab15d09, c7a.4xlarge:

File Result Wall time
chat-pane-history.test.ts 30 passed 11 s
chat-pane-history-autofill.test.ts 13 passed 10 s
chat-history.test.ts 21 passed 6 s
chat-pane-history-reply.test.ts 7 passed 6 s
chat-pane-history-maintenance.test.tsx 3 passed 5 s
chat-history-loading.e2e.test.ts passed 28 s
chat-history-prepend-anchor.e2e.test.ts passed 42 s
chat-history-activity-anchor.e2e.test.ts passed 27 s
chat-loading-performance.real-gateway.e2e.test.ts passed 202 s including builds; browser scenario 28 s

Unit commands use node scripts/run-vitest.mjs <file> --maxWorkers=1; native E2E adds run --config test/vitest/vitest.ui-e2e.config.ts. The native tests preserve every-frame anchoring, reach the first message, exhaust paging, and protect cold/warm reload behavior. The real-Gateway test checks actual response budgets and no older-page reads during its long-session reload. Browser layout and real-Gateway setup require the longer E2E wall times; no new fixture boots were added.

The full UI E2E suite completed on the final head in AWS cbx_794664ca5450, fixed c7a.4xlarge: full-suite run. Original result: 824 files passed, 6 failed, 3 skipped (833); 3,583 tests passed, 4 failed, 7 skipped (3,594), 6,182 seconds wall time. The native history performance file also passed inside this full run. The complete per-file results and original diagnostics are retained with the run evidence.

Two files failed before execution because the payload installed Chromium but omitted WebKit. After installing WebKit on the same lease, tooltip-first-activation.e2e.test.ts and workboard-native-bundle.e2e.test.ts both passed in Chromium and WebKit: 4 tests, 40 seconds, with no source changes. The original setup failures remain recorded.

The four actual test failures were compared with current main 5a0fb5a7f5791d9a02c3a3c7b322710840af814d on a fresh AWS c7a.4xlarge lease, cbx_04be84b97255: main comparison. The comparison ran the same four files with one worker: 3 files passed, 1 failed; 5 tests passed, 1 failed; 405 seconds wall time.

Full-suite failure Current-main result Classification
control-ui-automation-management.real-gateway.e2e.test.ts Same POSIX private-mutation-boundary error Inherited fixture/environment failure in the transport readiness setup
control-ui-media-transcript.real-gateway.e2e.test.ts Passed Upstream media persistence defect repaired by #176426 while this full suite ran
chat-managed-media-order.real-gateway.e2e.test.ts Passed Same repaired upstream defect: persisted history omitted both image entries
chat-tts-supplement.real-gateway.e2e.test.ts Passed Same repaired upstream defect: delayed speech had no audio element

#176426 merged at 22:01:55 UTC during this run. Its evidence reproduces the same media failures on earlier main and proves all three repaired. The fix retains the Gateway dispatch source through media finalization and persistence. The image-order failure here is a direct CLI chat.history read with limit: 20, independent of the changed UI older-page budget. No duplicate Gateway fix, test relaxation, or unrelated rebase was added to this lane.

The three suite-declared skipped files are desktop-resize.real-gateway.e2e.test.ts, chat-steer-deferred-custody.real-gateway.e2e.test.ts, and deepseek-search.real-gateway.e2e.test.ts; no skip was introduced by this PR. Thus the full run is not claimed green: both setup gaps were repaired, one failure reproduces on current main, and the other three are documented upstream defects already repaired on main.

The optional standalone check-changed run reported max-lines baseline omissions in three untouched files (chat-message.test.tsx, config-page-state.ts, sessions-page-state.ts) and the existing 723/720 core test-root guard, then expanded into all 31 core type graphs. It was stopped after four passing graphs once CI had passed the selected lint/type/test gates, so it is not reported as a clean standalone run. Those subjects and the test inventory are unchanged from branch base bf9843cf955019f65fe7e5855394b659228e063f.

CI classification

All final-head checks are terminal: 37 success, 38 skipped, 3 failures. The failures are the inherited absolute chat-boot bundle ceiling and its two propagated CI-gate entries. Selected UI, UI E2E, baseline-ratchet, lint, and test-type jobs passed.

The same-job comparison builds main a7d517618a103d898baf9e7d4649a8e0d14a01dd at 1,494,544 bytes of chat-boot gzip, already over the 1,490,000-byte ceiling. The candidate merge build is 1,494,586 bytes (+42 bytes), with requests unchanged at 26. The informational classifier calls this new against an older scheduled main run; the actual main-base build in this job demonstrates the inherited ceiling breach. No threshold or baseline was changed.

Production LOC: +1 / −1, net 0. The old budget is replaced at its existing owner; no machinery is introduced. Test LOC: +22 / −7, net +15. The requested production-stat filter also includes .test.tsx; excluding both test suffixes gives the runtime delta above.

@clawsweeper

clawsweeper Bot commented Oct 18, 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 18, 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-18T21:23:29.354204Z e7b1e7e 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.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8f87e3c864

ℹ️ About Codex in GitHub

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

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

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

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

// larger pages. The Gateway owns the response byte and single-message limits.
const CHAT_HISTORY_OLDER_PAGE_LIMIT = 1000;
const CHAT_HISTORY_OLDER_PAGE_MAX_BYTES = 1024 * 1024;
const CHAT_HISTORY_OLDER_PAGE_MAX_BYTES = 2 * 1024 * 1024;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Badge Update the real-Gateway pagination budget assertion

When the real-Gateway performance suite backscrolls, this constant now sends a 2 MiB budget, but ui/src/e2e/chat-loading-performance.real-gateway.e2e.test.ts:765-774 still documents and asserts the previous 1 MiB value. I checked .github/workflows/ci.yml:2654, where that exact test is included, so the suite will deterministically fail before validating the performance behavior. Update that assertion and its adjacent comment together with this owner constant.

AGENTS.md reference: AGENTS.md:L80-L80

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 18, 2026
@clawsweeper

clawsweeper Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR doubles older-history page budgets from 1 MiB to 2 MiB through the existing shared request owner.

Example: Page backward through the synthetic 4,240-message conversation.

  • Before: The reported benchmark takes 17 pages with a 1 MiB budget.
  • After: The reported benchmark takes 9 pages with a 2 MiB budget.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A minimal, useful performance change supported by controlled browser measurements, with one definite affected-test defect.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; its retained Chromium campaign exercises the native history and rendering owners with synthetic transport, while exact-head validation remains distinct.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Reaching the beginning of a long conversation requires repeated requests and expensive transcript prepends.
Reason: The maintainer-authored direction explicitly accepts the measured traversal-versus-arrival tradeoff, and the implementation reuses the existing owner.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this PR: the measured performance improvement has maintainer backing, but one real-Gateway test still asserts the replaced budget.

Priority: P2
Reviewed head: 8f87e3c8644abda5c1e4ab1713d476d9b7faa13f

Before merge

  • Update the real-Gateway test to expect the new budget (P2) - The real-Gateway backscroll test records requests from this owner but still requires metric.maxBytes to equal 1024 * 1024 at ui/src/e2e/chat-loading-performance.real-gateway.e2e.test.ts:774. Requests now carry 2097152, so that assertion deterministically fails when reached. The CI workflow includes this test. Update the assertion and its adjacent 1 MiB comment together with the constant.

Findings

  • [P2] Update the real-Gateway test to expect the new budget — ui/src/pages/chat/chat-history-request.ts:53

Tests

  • Missing end-to-end proof: The supplied curve exercises a production browser bundle with an outgoing-budget override and mocked Gateway; final-head real-Gateway completion is not supplied.
Agent review details

How this fits together

The Control UI history owner sends bounded chat.history requests to the Gateway, then supplies returned pages to transcript projection and rendering.

flowchart LR
  A[Reader scrolls backward] --> B[History pane]
  B --> C[Shared older page request]
  C --> D[Gateway history handler]
  D --> E[Bounded message page]
  E --> F[Transcript projection and render]
Loading

Technical review

Best possible solution:

Retain the single-owner budget change and update the real-Gateway assertion and adjacent comment to 2 MiB.

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

Source establishes the deterministic 2 MiB request versus 1 MiB assertion mismatch; no target code was executed during this read-only review.

Is this the best way to solve the issue?

Changing the existing request constant is the smallest complete implementation of the accepted tradeoff, with no additional state, transport, or scheduling machinery.

Full review comments:

  • [P2] Update the real-Gateway test to expect the new budget — ui/src/pages/chat/chat-history-request.ts:53
    The real-Gateway backscroll test records requests from this owner but still requires metric.maxBytes to equal 1024 * 1024 at ui/src/e2e/chat-loading-performance.real-gateway.e2e.test.ts:774. Requests now carry 2097152, so that assertion deterministically fails when reached. The CI workflow includes this test. Update the assertion and its adjacent 1 MiB comment together with the constant.
    Confidence: 1

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Older-history request budget changes intended behavior with a stated reason (30c36f4: The previous change selected explicit 1 MiB pages to amortize requests while retaining Gateway bounds and smaller startup reads.)
  • Automatic viewport filling keeps the original intent (f4888e6: Permit one automatic viewport-fill page while reserving further paging for reader intent.)
  • Prepend anchoring test keeps the original intent (d70f835: Preserve the visible message across history prepends, including grouped messages and touch interactions.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-loading-performance.real-gateway.e2e.test.ts
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 68df653 adds ui/src/pages/chat/chat-history-request.ts:38 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 68df653df9fd; files: ui/src/pages/chat/chat-history-request.ts)
  • Josh Lehman: Raw commit d70f835 adds ui/src/e2e/chat-history-prepend-anchor.e2e.test.ts:231 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: d70f83517220; files: ui/src/e2e/chat-history-prepend-anchor.e2e.test.ts)

PR surface

Source 0, Tests +15. Total +15 across 6 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 5 20 5 +15
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 21 6 +15

Labels

Label changes:

  • add P2: A useful, bounded history-loading improvement needs a focused correction to an affected integration test.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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: A useful, bounded history-loading improvement needs a focused correction to an affected integration test.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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 18, 2026, 5:19 PM ET / 21:19 UTC.

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The real-Gateway request-budget assertion and adjacent comment are corrected on e7b1e7e8d8bea1dfe40c71dace29f3b39a726e2d. That test passes both individually and in the completed full UI suite; autoreview is clean through P2.

The PR evidence now records the full 833-file run, repaired WebKit setup, and exact-main comparison of all four test failures. Main reproduces the automation setup failure; #176426, merged during validation, repairs the three media failures. Exact-head CI's remaining red is the inherited absolute bundle ceiling and its aggregate gates. All validation leases are released. No thresholds, assertions, or skips were weakened.

@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete
steipete merged commit a70b7c2 into main Oct 18, 2026
111 of 114 checks passed
@steipete
steipete deleted the steipete/coldload-older-page-size-2mib branch October 18, 2026 23:48
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 19, 2026
…law#176480)

Reading back through a long session loaded older history in 1 MiB pages, so reaching the beginning of a long agent session took 17-19 page loads. WebSocket permessage-deflate is now live, so larger JSON pages are cheap on the wire, and the Gateway already allows 6 MB per history response.

Older-history pages for reader backscroll now request up to 2 MiB. The 1000-message limit and the boot paging policy are unchanged (no automatic boot paging beyond one viewport fill).

Seven interleaved AWS c7a.4xlarge pairs per history shape, backscroll to the beginning: normal 17 -> 9 pages, 6.07 -> 3.74 s; tool-heavy 19 -> 10 pages, 6.55 -> 4.25 s; both better in every pair. Tradeoff: worst single page-arrival frame 195 -> 213 ms (normal) and 142 -> 171 ms (tool-heavy); 5 MiB was excluded because frame cost grows with page size. Runtime net 0 LOC. 74 focused tests and native history e2e pass. The only CI red is control-ui-performance's chat boot JS ceiling, which the merge-base build already exceeds (1459.6 KiB > 1455.1 KiB); this change adds 25 B.
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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS 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