Repository navigation
improve: load older chat history in larger pages - #170481
Conversation
Request a 1 MiB budget for older Control UI history and honor explicit response budgets while preserving the 512 KiB server default and 6 MiB ceiling. Keep startup and prefetch timing unchanged. Co-authored-by: steipete <[email protected]>
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 75248cfe-4ae7-46bd-a24c-54b98733ec85
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
Codex review: needs maintainer review before merge. What this changesThis PR requests 1 MiB older-history pages and lets the Gateway honor explicit byte budgets while preserving its 512 KiB default. Example: Scroll backward through 320 messages containing approximately 7,000 characters each.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it delivers a focused, maintainer-directed backscroll improvement absent from current main, with no actionable defect found in the introduced diff. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI requests transcript pages through chat.history; Gateway storage workers prepare history, and the response owner returns bounded messages, activity, and continuation offsets. flowchart LR
A[Control UI backscroll] --> B[Shared older page request]
B --> C[Gateway history handler]
C --> D[Transcript worker]
D --> E[Response budget owner]
E --> F[Messages and continuation]
F --> A
Technical reviewBest possible solution: Honor explicit page budgets through the existing response owner while retaining small startup pages, bounded defaults, and lossless pagination. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically clamps an explicit 1 MiB request to 512 KiB, and the supplied handler regression targets that exact path; no target code was run during this review. Is this the best way to solve the issue? The focused client-and-handler change removes the limiting clamp through the existing budget and pagination owners without adding configuration, storage, or a competing implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 959426b776b7. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +3, Tests +15, Docs 0. Total +18 across 8 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 12, 2026, 9:33 PM ET / October 13, 2026, 01:33 UTC (Revision 2). |
Update reply navigation, scroll maintenance, and browser underfill assertions to require the explicit 1 MiB budget. Co-authored-by: steipete <[email protected]>
|
Merged via squash.
|
Align the browser contracts after #170481 explicitly requests 1 MiB history pages and #170490 includes three warning steps in the successful update headline. Preserve Gateway default bounds, message ordering, update recovery, and all remaining assertions. Exact-candidate complete browser files pass; PR CI, changed types, lint, contracts, Madge, and database ratchets pass. No product or timeout change.
* improve: load older chat history in larger pages Request a 1 MiB budget for older Control UI history and honor explicit response budgets while preserving the 512 KiB server default and 6 MiB ceiling. Keep startup and prefetch timing unchanged. Co-authored-by: steipete <[email protected]> * improve: load older chat history in larger pages Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 75248cfe-4ae7-46bd-a24c-54b98733ec85 * test: expect larger older-history request budgets Update reply navigation, scroll maintenance, and browser underfill assertions to require the explicit 1 MiB budget. Co-authored-by: steipete <[email protected]> --------- Co-authored-by: steipete <[email protected]>
…70535) Align the browser contracts after openclaw#170481 explicitly requests 1 MiB history pages and openclaw#170490 includes three warning steps in the successful update headline. Preserve Gateway default bounds, message ordering, update recovery, and all remaining assertions. Exact-candidate complete browser files pass; PR CI, changed types, lint, contracts, Madge, and database ratchets pass. No product or timeout change.
What Problem This Solves
Scrolling back through long chats requires unnecessary page requests because larger history byte budgets were still capped at 512 KiB.
User Impact
Older Control UI history loads in pages of up to 1 MiB, while opening a chat stays at 80 messages / 256 KiB. Older pages can use more bandwidth and memory per request, but require fewer requests for byte-limited histories. No configuration or migration is required.
Why This Change Was Made
The UI now sends an explicit 1 MiB budget for older pages, and the Gateway honors explicit budgets within its existing 6 MiB hard ceiling. The server default remains 512 KiB. Single-message bounds, returned pagination offsets, and prefetch timing are unchanged.
Evidence
maxBytesfield. Those assertions and the matching browser underfill assertion now explicitly require 1 MiB; production code did not change.Worked on by
Work sessions
View the OpenClaw team session