Skip to content

perf(terminal): differentiated scrollback for grid cards - #60

Merged
JeanBaptisteRenard merged 2 commits into
mainfrom
perf/scrollback-differentiation
Jun 11, 2026
Merged

perf(terminal): differentiated scrollback for grid cards#60
JeanBaptisteRenard merged 2 commits into
mainfrom
perf/scrollback-differentiation

Conversation

@JeanBaptisteRenard

Copy link
Copy Markdown
Collaborator

Supersedes #56 (auto-closed by GitHub when #55's base branch was deleted — could not be reopened). Same content, rebased onto main, including the review fix from pr56-review.md: hideGridView now restores the full scrollback budget for ALL open sessions (background sessions kept producing output silently capped at 1000 rows).

Original description: see #56. Review verdict after fix: MERGE. task check green — 201/201 at this commit.

…cards

A 10k-row scrollback costs ~3 MB per terminal; with every open session
keeping a live xterm, 20 sessions in grid hold ~64 MB of scrollback
alone. Grid cards are thumbnails and only need recent context.

createTerminalEntry now defaults scrollback by view mode (explicit
opts.scrollback wins); showGridView drops live cards to the thumbnail
budget (xterm trims immediately — documented trade-off); showSession
restores the full budget when a session returns to single view.
… just the focused one

Review finding (MAJOR, pr56-review): background sessions kept producing
output after the grid closed but stayed silently capped at the thumbnail
budget until individually shown. Harness now loads grid-view.js (+ its
shortcuts.js dependency) so hideGridView is testable.
@JeanBaptisteRenard
JeanBaptisteRenard merged commit 6ad6058 into main Jun 11, 2026
6 checks passed
@JeanBaptisteRenard
JeanBaptisteRenard deleted the perf/scrollback-differentiation branch June 11, 2026 08:41
abasiri pushed a commit that referenced this pull request Aug 1, 2026
…g missing (#60)

The only full disk scan (populateCacheViaWorker) runs solely when the cache is completely empty, so a project folder that changed while the app was closed — or that predates the build which first indexed it — was never picked up, and its sessions silently vanished from the sidebar.

Replaces the unused populateCacheFromFilesystem with reconcileCacheFromFilesystem, which re-indexes only folders that are new or whose newest .jsonl is newer than the recorded indexMtimeMs, and calls it from the get-projects handler. The gate is stat-only, so it is cheap when nothing changed.

Co-authored-by: ymajoros <yannick@valuya.be>
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.

1 participant