feat(vscode): load older sessions on demand in history - #14344
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Incremental review of Files Reviewed (3 files)
Previous Review Summaries (2 snapshots, latest commit 6b6c9c9)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 6b6c9c9)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (6 files)
Fix these issues in Kilo Cloud Previous review (commit e850fc6)Status: 7 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (18 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
What Problem This Solves
The session history list stopped at the 100 newest sessions. Older chats were unreachable from the UI, and the only workaround was to raise a fixed limit, which does not remove the cap and multiplies work per worktree directory.
Why This Change Was Made
The history list now pages. The backend already exposes a cursor on the experimental session list endpoint, so no server change is needed. The extension pages per directory, merges the workspace root and every registered worktree, and appends the next page on demand.
fetchSessionPagerequests one page per directory with the existingexperimental.session.listcursor and returns the next cursor.loadSessionsloads the first page and records one cursor per directory;loadMoreSessionscontinues from each cursor and posts an appendedsessionsLoaded.SessionListshows a "Load more" button, reusing the kilo-uiButton, and the session store appends without reconciling away older rows.All changes stay in
packages/kilo-vscode/, so there is no shared upstream diff.User Impact
Older sessions stay reachable in the sidebar history and in the Agent Manager history for the active project. No configuration is required, and no new fixed limit replaces the old one.
Evidence
packages/kilo-vscode:bun run typecheck,bun run lint,bun run knip,bun run bundle, and the full unit suite (6141 pass, 0 fail).Supersedes #14272, which added a config option that raised the fixed limit instead of paging.