Skip to content

perf(control-ui): bound cached transcript snapshots - #174593

Merged
steipete merged 12 commits into
mainfrom
steipete/coldload-snapshot-cache-size
Oct 17, 2026
Merged

steipete merged 12 commits into
mainfrom
steipete/coldload-snapshot-cache-size

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Problem and behavior

A signed-in reload of a dashboard deep link originally crossed 14 visual states over roughly 15 seconds. Later cache evidence found a roughly 3.2 MB record containing 1,096 messages and a 337–556 ms restore task: the browser persisted the entire loaded transcript and serialized it again on every save.

This change persists the latest 80 transcript rows, extending the boundary to keep complete native sequence groups. Warm reload retains the title and first-screen rows; older history still loads on upward scroll. Live in-memory history remains complete.

The existing snapshot owner drops only top-level provider replay payloads, retaining identities, idempotency keys, tool IDs, activity, usage, rendering metadata, widget sizes, title, and the delta cursor. A truncated snapshot starts its authoritative refill at offset zero; the existing history/projection owners reconcile that window and use Gateway-returned offsets for subsequent pages, including imported histories. IndexedDB v8 retires old unbounded transcripts without deserializing them, preserves valid current sidebar records, and admits projection v3. The superseded read-time pairing-QR repair is removed; writer sanitization remains. No second store, Gateway schema, protocol, or product configuration change.

Current head and coordinator-requested classification

Head: 890a1a73a4e9e2afbf23ca541221ce05f2044be0.
Pinned main baseline: d6a0b103aadb070692d880d28f0dc1fe0079bed2.

The rebase completed without conflicts. All 12 reviewed patches are unchanged in range-diff; main contains b652f39, 99f34f7, and 9285ef2. No new implementation fix was needed.

Each original failing file ran three times on each revision using the native runner on one AWS Crabbox c7a.4xlarge, lease cbx_147d070608d7, run receipt. Runs were serial and baseline/head order alternated by round. The two test files have identical source hashes between these revisions; no instrumentation or changes to assertions, timeouts, focus, or scheduling were introduced.

node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts <file> --maxWorkers=1
Test file Main runs 1 / 2 / 3 Head runs 1 / 2 / 3 Classification
chat-skill-library.e2e.test.ts PASS / FAIL / FAIL FAIL / FAIL / PASS Inherited focus flake. Both main failures and both head failures have the identical focus assertion and recorded stack location :195:104.
guest-session-controls.e2e.test.ts PASS / PASS / PASS PASS / PASS / PASS Earlier test synchronization race fixed on main. Each run passes both cases, including the originally failing started-first-turn case.

The guest test previously waited only for receipt of sessions.patch before opening the thinking control; the model selection is asynchronous, so receipt did not establish settled UI state. Main 86a8249c7213 added waits for the model control to display the selected value and become enabled before continuing. Both compared revisions include this fix. The original skill-menu failure is now reproduced directly on main, resolving the earlier attribution gap without changing the cache patch or weakening the test.

Wall times for the native single-file runs (seconds; test timing, not performance results):

Test file Main 1 / 2 / 3 Head 1 / 2 / 3
Skill menu 27.19 / 33.83 / 33.98 33.60 / 32.46 / 18.93
Guest slider 24.47 / 24.21 / 24.50 22.86 / 22.95 / 22.88

All 12 outcomes, full logs, source hashes, machine details, and failure captures are retained. Proof archive SHA256: ab82b4abc8107eac2f2d15f3bf542e95c33261b17e217cd12ec26e5dd549e58b.

CI on this exact head is green: 39 jobs succeeded, 23 skipped, zero failed. The prior head's inherited mock-export guard failure does not recur. The aggregate gate is also green; superseded checks from the preceding head are excluded.

Measured improvement

The accepted performance comparison was on preceding head 848fa5e999e528f981fa1763bb2ca3d646a23656 against base 24e58b3e7271c48ef02e8716e0d30ac72526bb84; these timings were not rerun after the current rebase. Seven interleaved pairs ran on one quiet AWS c7a.4xlarge (16 CPUs, 32.9 GB RAM, 89% idle, 0% steal/I/O wait), using repository Chromium, production bundles, the Team-scale fixture extended to 1,100 messages, the supplied probes, and a fixed synthetic 250 ms inbound delay. Parentheses show IQR.

Metric Before After
Snapshot bytes 2,951,644 (0) 190,988 (0)
Persisted rows 1,100 (0) 80 (0)
Synchronous save work 10.2 ms (0.30) 0.7 ms (0.10)
Save flush 25.7 ms (1.05) 2.4 ms (0.15)
First cached row 686.5 ms (8.4) 641.5 ms (6.3)
Cache read to cached row 469.4 ms (3.6) 434.0 ms (4.1)
Largest task containing cache completion/projection 340 ms (5) 295 ms (4)
Observed visual states 4 (0) 4 (0)

All four observed cached row elements survive live catch-up in every run. Persisted bytes fall 93.5%, save latency 90.7%, and the completion task 13.2%. The remaining roughly 295 ms task includes sidebar completion and render microtasks; it is not pure IndexedDB deserialization.

Retained implementation proof

On preceding head 848fa5e, nine focused files passed 139 tests, changed-file lint and the four affected type graphs passed, and the full UI suite completed with 813 passed / 3 failed / 1 skipped files (3,532 passed / 3 failed / 1 skipped tests; 5,433.16 s wall). Warm boot and all seven history suites passed. The automation POSIX failure reproduced on that pinned baseline. The two previously unclassified failures are explained by the new comparison above. The sole skip was the opt-in desktop fixture. This full-suite result remains preceding-head evidence; the current follow-up ran the coordinator-requested 12 targeted executions plus exact-head CI.

A separate released-v4 browser scenario passed 1/1 in 23.75 s on 848fa5e: actual v2026.10.4 IndexedDB owner, valid synthetic 1,100-row envelope, current production UI, and synthetic Gateway. It verifies retirement before hello, preserved 42rem/computed 672px browser preference, canonical IDs/content, bounded cache repopulation, cached paint on the next reload, and all 1,100 rows restored through offsets 0/50/1050 without mutation RPCs. The runnable compatibility scenario is retained; this is cache-boundary proof, not a complete old-app installation or durable Gateway migration.

The cache-size, replay-identity, stale-metadata, and byte-limited refill regressions fail on the old implementation. Independent autoreview and the final preceding-head review found no actionable P0–P2 defect; the current rebase preserved all reviewed patches unchanged.

Size and release context

Runtime delta: +69 lines across five existing cache/history owners. Requested production stat: 220 insertions, 78 deletions (+142) across nine files, including benchmark/fixture support. Growth implements bounded projection, disposable-cache migration, and authoritative refill while reusing existing owners and deleting the old read-time repair.

Release-note context: warm reloads keep a small first-screen transcript cache and load older history on scroll; a one-time transcript-cache reset preserves the current sidebar cache.

AWS lease cbx_147d070608d7 is released with cleanup complete; no owned Gateway, browser, or test process remains.

This PR remains open for coordinator review and manual landing. No merge is requested.

Before: synthetic warm reload with the full transcript cached

After: synthetic warm reload with the bounded cache

@clawsweeper

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui scripts Repository scripts size: M labels Oct 16, 2026
@steipete
steipete force-pushed the steipete/coldload-snapshot-cache-size branch 2 times, most recently from f90c2d3 to 721591c Compare October 16, 2026 19:44
@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. labels Oct 16, 2026
@steipete
steipete force-pushed the steipete/coldload-snapshot-cache-size branch from 721591c to 8077cb8 Compare October 16, 2026 19:55
@steipete steipete changed the title experiment(control-ui): bound cached transcript tails [do not merge] perf(control-ui): bound cached transcript snapshots Oct 16, 2026
@steipete
steipete marked this pull request as ready for review October 16, 2026 20:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 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-17T04:23:32.206047Z 890a1a7 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 16, 2026
@steipete
steipete force-pushed the steipete/coldload-snapshot-cache-size branch from 8077cb8 to c28ef19 Compare October 16, 2026 20:23

@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: c28ef1914f

ℹ️ 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".

Comment on lines +175 to +177
pagination: {
hasMore: true,
nextOffset: 0,

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.

P2 Badge Replace stale cached rows during the zero-offset refill

When a warm snapshot is truncated, the first upward scroll deliberately fetches offset 0, overlapping all 80 cached rows. prependUniqueNativeMessages only removes rows whose full projection identity is byte-equivalent, so a legitimate Gateway reprojection—such as createCurrentUserProfileMessageProjector refreshing senderProfileAvatarUrl after an avatar change—keeps both the fresh row and its stale cached counterpart, displaying the same transcript message twice. The refill path should treat the returned Gateway source groups as authoritative over overlapping cached groups while still preserving projected siblings.

AGENTS.md reference: ui/AGENTS.md:L19-L21

Useful? React with 👍 / 👎.

@steipete
steipete force-pushed the steipete/coldload-snapshot-cache-size branch from c28ef19 to 28b260e Compare October 16, 2026 20:36
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR caches an 80-row transcript tail and refills older history through the existing Gateway pagination and projection owners.

Example: Reload a conversation containing 1,100 messages.

  • Before: The browser persists all 1,100 rows in a 2,951,644-byte snapshot.
  • After: The measured snapshot contains 80 rows in 190,988 bytes, with older messages available through upward scrolling.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused owner changes have production-browser and released-cache boundary proof, with prior refill findings addressed and no new actionable defect found.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The production Control UI was exercised in Chromium with native IndexedDB and a synthetic Gateway on the reviewed head, covering large-tail warm reload, retained rows, imported-history refill, and native backscroll; inspected captures support the visible result and recorded measurements support the performance claim.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Reloading a long conversation restores and repeatedly saves far more transcript data than the first screen needs.
Reason: The maintainer-authored direction has measured value, preserves visible content and backscroll, and explicitly accepts a one-time disposable transcript-cache reset.

Merge readiness

✅ Ready for maintainer review

This PR provides a useful, owner-approved performance improvement with no actionable correctness findings; keep it open for the requested manual landing.

Priority: P2
Reviewed head: 848fa5e999e528f981fa1763bb2ca3d646a23656

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI snapshot store persists account-scoped display projections in IndexedDB; reload hydration consumes those projections, and authenticated Gateway history supplies authoritative reconciliation and older pages.

flowchart LR
  A[Gateway history] --> B[Session projection owner]
  B --> C[Transcript view]
  B --> D[Bounded snapshot writer]
  D --> E[IndexedDB]
  E --> F[Reload hydration]
  F --> B
  C --> A
Loading

Technical review

Best possible solution:

Land the bounded disposable projection and authoritative refill through the existing owners using the repository’s native landing gates.

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

Current-main source serializes the retained transcript without this row bound, and the supplied paired production-browser measurements demonstrate the large-snapshot cost; no target code was executed during this review.

Is this the best way to solve the issue?

The change addresses persistence volume at its existing owner and reuses authoritative history reconciliation, avoiding a second cache or pagination policy.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Transcript persistence changes intended behavior with a stated reason (e1b459e: The prior optimization preserved stored data and weights while eliminating redundant serialization; this PR explains why retaining the full loaded transcript remains costly.)
  • Pairing QR read repair changes intended behavior with a stated reason (f0f2363: The repair in fix: keep /pair qr images visible in Control UI #172806 sanitized older projection-v2 records before hydration; database retirement and projection-v3 admission now supersede that path while writer sanitization remains.)
  • Older-history reconciliation keeps the original intent (68df653: Older-page deduplication preserves projected siblings and limits comparison work; the new zero-offset branch needs authoritative replacement because its window intentionally overlaps cached history.)
  • Sidebar cache retirement keeps the original intent (86647d4: Pre-version-7 sidebar projections used retired rail identities; the upgrade continues clearing those versions and preserves the current sidebar projection.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 0e7f8c9 adds ui/src/pages/chat/session-snapshot-store.ts:216 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0e7f8c9ce963; files: ui/src/pages/chat/session-snapshot-store.ts)
  • Vyctor H. Brzezowski: Raw commit df74a17 adds ui/src/pages/chat/session-snapshot-store.ts:227 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: df74a17b944c; files: ui/src/pages/chat/session-snapshot-store.ts)

PR surface

Source +69, Tests +281, Docs +11, Other +21. Total +382 across 18 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 5 87 18 +69
Tests 10 365 84 +281
Docs 2 12 1 +11
Config 0 0 0 0
Generated 0 0 0 0
Other 1 51 30 +21
Total 18 515 133 +382

Review metrics

Metric Value Why it matters
Disposable cache version IndexedDB 7 → 8; transcript projection 2 → 3 Old transcript records retire without deserialization while current sidebar records remain intact.
Benchmark option 1 new flag: --large-snapshot Expands the synthetic benchmark to 1,100 messages without adding a product configuration setting.

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Reduces browser persistence and warm-reload work for long conversations while retaining older-history access.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-10-16T20:53:20.442Z sha 28b260e :: blocked before merge. :: [P2] Replace stale cached source groups during the zero-offset refill
  • reviewed 2026-10-16T23:27:10.096Z sha 58342dc :: blocked before merge. :: none
  • reviewed 2026-10-17T01:58:11.810Z sha 58342dc :: needs changes before merge. :: none

Reviewed October 17, 2026, 12:16 AM ET / 04:16 UTC (Revision 4).

@steipete
steipete force-pushed the steipete/coldload-snapshot-cache-size branch from 28b260e to f706206 Compare October 16, 2026 21:53

@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: f706206484

ℹ️ 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".

Comment on lines +130 to +133
const retained = replaceOverlapping
? current.filter(
(message) => !incomingSources.has(nativeHistoryMessageSourceIdentity(message) ?? ""),
)

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.

P2 Badge Drop cached rows outside the authoritative refill

When the zero-offset chat.history response is byte-limited to fewer rows than the 80-row snapshot, cached rows absent from incomingSources are older rows beyond the returned window, but this filter retains and appends them after the fresh page. For example, a refill containing rows 51–100 followed by cached rows 21–50 remains misordered even after the next page supplies rows 1–50, because normal deduplication removes the incoming copies of 21–50 without relocating the retained copies. Replace the cached window wholesale while preserving only rows proven newer than the refill, rather than every nonoverlapping cached source.

AGENTS.md reference: ui/AGENTS.md:L19-L21

Useful? React with 👍 / 👎.

@steipete
steipete force-pushed the steipete/coldload-snapshot-cache-size branch 2 times, most recently from 6acdff2 to 8ad5a0c Compare October 16, 2026 22:29
@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. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 17, 2026
@steipete
steipete force-pushed the steipete/coldload-snapshot-cache-size branch from 848fa5e to 890a1a7 Compare October 17, 2026 04:20
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Coordinator-requested verification is complete on 890a1a73a4e9e2afbf23ca541221ce05f2044be0, rebased without conflicts onto main d6a0b103aadb070692d880d28f0dc1fe0079bed2. All 12 previously reviewed patches are unchanged.

The original skill-menu file ran three times on each revision: main PASS/FAIL/FAIL, head FAIL/FAIL/PASS. All four failures have the identical focus assertion and recorded stack location, so it is an inherited flake. The guest-slider file passed all three runs on both revisions (2/2 cases each); main commit 86a8249 supplies the missing wait for model selection to settle before opening the next control. No lane code or assertion changes were needed.

Exact-head CI run 39002185119 is green (39 successful jobs, 23 skipped, zero failed), including the aggregate gate. The PR body records the comparison, all run times, and the distinction between current verification and previously accepted performance/full-suite evidence. AWS lease cbx_147d070608d7 is released with cleanup complete.

Review only. The coordinator explicitly requires stopping before merge.

@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete
steipete merged commit c9b110b into main Oct 17, 2026
112 of 114 checks passed
@steipete
steipete deleted the steipete/coldload-snapshot-cache-size branch October 17, 2026 04:34
steipete added a commit that referenced this pull request Oct 17, 2026
…5171)

#174593 bounded cached chat snapshots and marked trimmed windows with an offset-0 refill for the first upward scroll. The pane's viewport-fill autoload also treats that marker as older history, so every warm reload of a session whose cached tail fits the viewport (tool-heavy agent sessions collapse 80 raw messages into one visible row) paged through the whole history at boot. On Team r149 one 820-message session downloaded 1.05 MB + 1.05 MB + 498 KB in three sequential chat.history requests and grew the transcript in five visible steps; chat.history is already ~50% of Gateway response bytes.

The offset-0 refill is now reserved for reader intent: automatic viewport fill no longer consumes it, while ordinary older pages and backscroll through all messages are unchanged.

Eleven interleaved AWS c7a.4xlarge pairs, warm reload of a trimmed cache: boot chat.history 1 -> 0; LoAF blocking 880 -> 350 ms (-60%, every pair, non-overlapping IQR); message-delivery work 781 -> 225 ms; delivery forced layout 184 -> 2 ms. Runtime +2 LOC. New autofill regression test and warm-boot e2e assert no boot chat.history on a warm trimmed cache and a single offset-0 refill on reader intent. 73 unit + 20 native e2e tests pass; all 55 exact-head CI jobs green.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
…penclaw#174593)

Cached chat snapshots held whole transcripts: on Team the board reload restored 20 records totalling 11.2 MB (largest 3.19 MB, 1,096 messages), and that restore was the longest single task of the reload (IDB oncomplete 337-556 ms).

Persisted snapshots now keep the newest 80 display rows (whole sequence groups) without provider replay payloads, and mark the window for an authoritative refill from offset 0 on the first upward scroll, so full backscroll still works. Snapshot DB version 8 clears the old unbounded records during upgrade without reading them onto the main thread; the read-time QR repair for pre-v8 writers is removed with them, and writes still strip pairing QR content. Display identity ignores provider replay data so cached and live rows still dedupe.

Seven interleaved AWS c7a.4xlarge pairs: snapshot 2,951,644 -> 190,988 bytes; synchronous save 10.2 -> 0.7 ms; save flush 25.7 -> 2.4 ms; first cached row 686.5 -> 641.5 ms; restore/projection task 340 -> 295 ms (all non-overlapping IQR). Released-cache upgrade test: old record retired, preferences preserved, 80-row cache repopulated, all 1,100 rows reachable through native backscroll. Runtime +69 LOC. Exact-head CI green (39 passed, 0 failed); a skill-menu focus failure is an inherited flake (fails 2/3 on baseline main too).
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
…nclaw#175171)

openclaw#174593 bounded cached chat snapshots and marked trimmed windows with an offset-0 refill for the first upward scroll. The pane's viewport-fill autoload also treats that marker as older history, so every warm reload of a session whose cached tail fits the viewport (tool-heavy agent sessions collapse 80 raw messages into one visible row) paged through the whole history at boot. On Team r149 one 820-message session downloaded 1.05 MB + 1.05 MB + 498 KB in three sequential chat.history requests and grew the transcript in five visible steps; chat.history is already ~50% of Gateway response bytes.

The offset-0 refill is now reserved for reader intent: automatic viewport fill no longer consumes it, while ordinary older pages and backscroll through all messages are unchanged.

Eleven interleaved AWS c7a.4xlarge pairs, warm reload of a trimmed cache: boot chat.history 1 -> 0; LoAF blocking 880 -> 350 ms (-60%, every pair, non-overlapping IQR); message-delivery work 781 -> 225 ms; delivery forced layout 184 -> 2 ms. Runtime +2 LOC. New autofill regression test and warm-boot e2e assert no boot chat.history on a warm trimmed cache and a single offset-0 refill on reader intent. 73 unit + 20 native e2e tests pass; all 55 exact-head CI jobs green.
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 docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: L 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