Skip to content

fix(vscode): restore past session references - #13530

Merged
marius-kilocode merged 2 commits into
mainfrom
fix-past-session-referencing
Aug 28, 2026
Merged

fix(vscode): restore past session references#13530
marius-kilocode merged 2 commits into
mainfrom
fix-past-session-referencing

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Past-chat references could disappear because the extension requested only 50 sessions before filtering. Rendering thousands of matches also caused typing delays. Inaccessible saved project or sandbox paths could fail the entire family lookup.

Why This Change Was Made

Request up to 5,000 recently updated, non-archived root chats through the existing family-scoped session API. Search those candidates by title and worktree name, then render only the best 50 matches. This replaces the unbounded numeric sentinel with a practical candidate-count limit without adding an endpoint or pagination. Inaccessible saved directories are skipped while other filesystem errors still propagate.

User Impact

The sidebar and Agent Manager can find older chats beyond the previous 50-session cutoff without rendering the full candidate list. The history cap applies across the worktree family, not separately to each worktree. Chats outside the latest 5,000 are intentionally unavailable in this picker. This bounds returned candidates and client-side history, not all backend query allocations.

Evidence

  • 133 focused extension tests and 15 backend tests passed after changing the cap; extension and CLI typechecks and relevant lint checks passed.
  • The full extension unit suite previously passed all 4,243 tests.
  • Prior typing profile on 2,067 candidates: 593 ms median with all matches rendered, 20 ms median with the best 50 rendered.
  • Real sidebar and Agent Manager flows selected an older chat and delivered its transcript to a deterministic provider.
  • No new endpoint, generated SDK changes, or shared upstream UI changes.

@kilo-code-bot

kilo-code-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (4 files)
  • .changeset/restore-past-session-mentions.md
  • packages/kilo-vscode/src/kilo-provider/session-search.ts
  • packages/kilo-vscode/tests/unit/session-search.test.ts
  • packages/opencode/test/kilocode/server/session-mentions.test.ts
Previous Review Summary (commit 5d1313f)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 5d1313f)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (8 files)
  • .changeset/restore-past-session-mentions.md
  • packages/kilo-vscode/src/kilo-provider/session-search.ts
  • packages/kilo-vscode/tests/unit/file-mention-utils.test.ts
  • packages/kilo-vscode/tests/unit/session-search.test.ts
  • packages/kilo-vscode/webview-ui/src/components/chat/SessionMentionPicker.tsx
  • packages/kilo-vscode/webview-ui/src/hooks/file-mention-utils.ts
  • packages/opencode/src/kilocode/session/index.ts
  • packages/opencode/test/kilocode/server/session-mentions.test.ts

Reviewed by grok-4.6 · Input: 67.5K · Output: 7.9K · Cached: 514.6K

Review guidance: REVIEW.md from base branch main

Comment thread packages/kilo-vscode/src/kilo-provider/session-search.ts Outdated
@marius-kilocode
marius-kilocode merged commit 0661a1f into main Aug 28, 2026
33 checks passed
@marius-kilocode
marius-kilocode deleted the fix-past-session-referencing branch August 28, 2026 08:17
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