Skip to content

fix(transcript): automatically continue restored reading ranges - #1850

Merged
vastsa merged 2 commits into
vastsa:mainfrom
new-Beginner:fix/restored-reading-continuation
Oct 24, 2026
Merged

vastsa merged 2 commits into
vastsa:mainfrom
new-Beginner:fix/restored-reading-continuation

Conversation

@new-Beginner

Copy link
Copy Markdown
Contributor

Summary

Follow up on my reading-position restoration change in #1665 without reverting bookmark restoration.

Restoring an evicted session loads a bounded range around its bookmark. That range was treated as a permanently frozen historical snapshot, while automatic paging only handled older messages. This left ordinary restored reading behind a Load later messages button and prevented it from naturally rejoining live output.

  • Automatically request bounded newer pages near the visible lower boundary, including short viewports, without moving the reading position.
  • Keep restoration isolated until the unread gap closes, then resume canonical updates and new live rows without prepending older cached rows.
  • Preserve explicit search's manual paging, canonical model input, and existing cancellation/coalescing ownership.
  • Gate retries by the physical paging cursor to prevent failed or non-advancing pages from looping; clean up listeners and observers for hidden/unmounted panes.
  • Add regression and isolated Electron user-path coverage, and synchronize the UX/E2E specifications.

Verification

Task candidate: a3306d456e36d6f0bd8d2d0eb48e1488bbbd6f2c
Base main: cdad68e61e504adbfd1af10492a338daec09bdfa
Environment: Windows; isolated Electron fixture, no running user instance or real model provider.

Passed on the final candidate:

  • pnpm --filter @pi-desktop/desktop build (chunk-size warnings only)
  • pnpm --filter @pi-desktop/desktop typecheck
  • pnpm lint
  • node --test apps/desktop/test/transcript-*.test.mjs apps/desktop/test/session-search*.test.mjs — 163 passed, 0 failed
  • node scripts/e2e-transcript-reading-position.mjs — scrolling, real SessionPane restoration/continuation, and continuation lifecycle probes all passed
  • git diff --check and pnpm check:pr-base

Full-suite limitation

A broader Windows desktop test run during implementation was not green: 4,281 passed, 64 failed, 8 skipped. Failures included path/permission, SSH/askpass/host fixtures, and longer user-path tests. Two updater path failures were independently reproduced against unchanged main; the remaining failures have not all been baseline-verified and are not claimed to be pre-existing. The focused transcript/search suite is green, but upstream integration CI is still required before merge.

new-Beginner and others added 2 commits October 24, 2026 00:05
Restored reading ranges should preserve their bookmark without leaving
readers behind a manual history paging control. Continue bounded pages
near the viewport boundary and rejoin live output only after the gap closes.

Keep explicit search paging isolated, preserve the viewport and model
input, and cover continuation, retries, and hidden-pane cleanup.
@vastsa
vastsa merged commit 67ce4fa into vastsa:main Oct 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants