fix: webChat scrollback history is too limited — older assistant replies and tool outputs disappear when scrolling…#104250
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 11, 2026, 1:52 PM ET / 17:52 UTC. Summary PR surface: Source -4, Tests +65. Total +61 across 4 files. Reproducibility: yes. at source level. Current main's index selects only active branch nodes while the full reader also retains the nearest preceding compaction row, deterministically producing count and sequence divergence for the supplied branched JSONL scenario. Review metrics: none identified. Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Use the shared selector so full, bounded, count, and paginated filesystem readers derive visible rows and sequence metadata from one active-branch-plus-compaction invariant. Do we have a high-confidence way to reproduce the issue? Yes at source level. Current main's index selects only active branch nodes while the full reader also retains the nearest preceding compaction row, deterministically producing count and sequence divergence for the supplied branched JSONL scenario. Is this the best way to solve the issue? Yes. Centralizing the established full-reader invariant removes competing traversal logic and fixes pagination at the shared source without changing protocol, persistence, configuration, or fallback behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 04037e35c03e. Label changesLabel justifications:
Evidence reviewedPR surface: Source -4, Tests +65. Total +61 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (5 earlier review cycles)
|
803ba9b to
5f8e58f
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
6d0dafa to
95b3d3c
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix: webChat scrollback history is too limited — older assistant replies and tool outputs disappear when scrolling… This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Merged via squash.
|
* origin/main: (24 commits) fix(agents): keep compaction on live session model (#95713) fix(plugin-sdk): guard provider catalog live URL parsing against malformed responses (#109986) chore(cli): drop dead classifiers and single-use wrappers left by fallback removal (#112191) feat(ui): expand the lobster pet's random universe (#112073) chore(ci): audit dependency fingerprint exports (#112190) fix(ui): preserve graphemes in provider icons (#109509) fix(ui): align settings search with navigation rows (#112172) fix(agents): allow configless gateway rebind to activate standalone owner (#111841) fix(secrets): register secret targets for installed-origin plugins (#104347) improve(ui): show real machine identity in the place picker (#112162) fix: webChat scrollback history is too limited — older assistant replies and tool outputs disappear when scrolling… (#104250) test(ui): run DOM-free suites in Node (#112031) feat(nodes): make computer.act eligibility capability-based for desktop nodes (#112107) fix(apps): harden mobile gateway and watch state fix(ci): restore Z.AI API Platform validation (#112171) fix(ui): prevent Logs controls from overlapping (#112170) fix #95291: message tool fails to deliver files/images on Feishu (400 volc-dcdn / write ECONNRESET) while same Lark SDK upload succeeds standalone (#95514) refactor(cli)!: remove automatic gateway→embedded fallback from openclaw agent (#112074) refactor: move provider transports into packages/ai behind a typed host port (#111669) fix(anthropic): complete transcript reverse-scan windows across short reads (#109431) ...
…ies and tool outputs disappear when scrolling… (openclaw#104250) * fix(gateway): keep compaction marker in paginated history * refactor(gateway): share active transcript selection * fix(gateway): remove stale selector import * refactor(gateway): remove duplicate transcript ancestry state --------- Co-authored-by: Peter Steinberger <[email protected]>
Related to #92317.
What Problem This Solves
Full filesystem history retained the nearest compaction marker before the selected active transcript branch, but the byte-offset pagination index selected branch nodes only. On affected branched transcripts, full history exposed three visible rows while pagination omitted the compaction row, reported a lower
totalMessages, shifted sequence IDs, and could never retrieve the boundary at any offset.Why This Change Was Made
One canonical transcript-history selector now owns the invariant: when explicit branch selection is active, return the selected path plus the nearest preceding compaction marker. Both bounded/full readers and the byte-offset index use that selector before projecting messages or assigning sequence numbers.
The selector accepts one entries array plus a
recordOfprojection, so wrapper entries and parsed records cannot drift out of alignment. The index's old duplicateparentIdnormalization map and traversal were removed.This is intentionally narrower than #87111: it changes no WebChat UI, public protocol, cursor, config, persistence format, or page-size policy. The broader pagination PR must retain this shared selector when integrated.
User Impact
Paginated history can reach the same compaction boundary as full history, and
totalMessages/sequence metadata now describe the same visible active transcript.Evidence
node scripts/run-vitest.mjs src/gateway/session-utils.fs.test.ts— 70 passed.node scripts/run-vitest.mjs src/config/sessions/transcript-tree.test.ts— 18 passed.node scripts/check-changed.mjs -- src/config/sessions/transcript-tree.ts src/gateway/session-transcript-index.fs.ts src/gateway/session-utils.fs.ts src/gateway/session-utils.fs.test.ts— passed on Blacksmith Testboxtbx_01ky1ny21d3x4y9jdvwbhgw0a7, run 29807268988.git diff --check— passed.Contributor credit is preserved in mikasa's original commits.