feat(vscode): add searchable session tab switcher - #12462
Conversation
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (3 files, incremental since previous review)
Fix these issues in Kilo Cloud Previous Review Summaries (2 snapshots, latest commit 6bde89f)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 6bde89f)Status: No Issues Found | Recommendation: Merge Notes:
Files Reviewed (4 files, incremental)
Previous review (commit 9b9dc02)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (31 files)
Notes:
Reviewed by claude-sonnet-5 · Input: 42 · Output: 10K · Cached: 984.3K Review guidance: REVIEW.md from base branch |
|
@hdcodedev looks all good can you polish the usability when pressing enter after having searched a session? It seems to not auto select the first selected element. |
marius-kilocode
left a comment
There was a problem hiding this comment.
Reviewed the session tab switcher end to end. The Enter-selects-first gap (noInitialSelection left active() empty, so Enter in the search field selected nothing) is now fixed in the shared List with a guarded fallback to the first filtered result. The fallback is isolated: SidebarSearchMenu always has an active item, so its behavior is unchanged. CSS uses logical properties throughout (RTL test covers it), i18n is consistent across all 20 languages, and unit plus accessibility tests pass. No blockers.
|
Thanks @hdcodedev ! |
| e.preventDefault() | ||
| if (selected) handleSelect(selected, index) | ||
| // kilocode_change start - fall back to first result when no item is active (noInitialSelection) | ||
| const target = selected ?? all[0] |
There was a problem hiding this comment.
WARNING: Enter-selects-first fallback changes behavior for every List consumer, not just the tab switcher
This PR modifies the shared packages/ui (@opencode-ai/ui) List component so that pressing Enter with no highlighted row now selects all[0] instead of doing nothing. This is a global change: ProviderSelectDialog.tsx, SessionList.tsx, and Agent Manager's SidebarSearchMenu.tsx all render <List search={...} onSelect={...}> with no onKeyEvent override, so they inherit this new "select first result on blind Enter" behavior too, even though this PR's tests/story only cover the new session tab switcher.
For a provider picker or session history list, silently activating the top filtered row on Enter (before the user has looked at/confirmed it) is a more consequential UX change than for the tab switcher, and it isn't mentioned in the PR description or exercised by tests for those other surfaces. Consider scoping this to an opt-in prop (e.g. noInitialSelection, which the code comment already references) so existing List consumers keep their current Enter behavior unless they explicitly opt in.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
There was a problem hiding this comment.
@marius-kilocode should we address this with follow up PR?
There was a problem hiding this comment.
'pressing Enter with no highlighted row now selects all[0]'. I guess the bot just worked around it but it does the job. Nicer would have been if the first one was actually selected. So yes we can address that. Do you want to take this?
There was a problem hiding this comment.
yes, I am already working on fix. I will prepare PR soon.
* feat(vscode): add searchable session tab switcher * Add screenshot * fix(vscode): label search popover dialogs * fix(vscode): select first result on Enter in session tab switcher * fix(ui): wrap kilocode_change marker around Enter fallback block --------- Co-authored-by: marius-kilocode <marius@kilocode.ai>
Issue
No linked issue. This is a standalone sidebar navigation enhancement.
Context
When several sessions are open in the sidebar, tab titles become compressed or move outside the visible portion of the tab strip. Add a searchable open-tabs switcher so users can quickly find, activate, or close a session without navigating the strip manually.
Implementation
The tab strip now derives a searchable list from the existing local-tab order and session status state. The switcher distinguishes the current, pending, and working sessions; supports fuzzy title filtering and keyboard navigation; and lets users close a result without clearing the active filter. Selection and close flows explicitly restore focus to the chat prompt when the popover closes or the tab strip unmounts.
The switcher is composed from the shared Kilo UI popover, list, icon-button, spinner, and tooltip primitives. Search-menu presentation previously owned by Agent Manager was extracted into shared webview styles so both search surfaces use the same layout and interaction states. The new labels are localized across the extension's supported languages, with focused unit, Storybook accessibility, and RTL coverage.
Screenshots / Video
Screen.Recording.2026-07-22.at.17.17.52.mov
How to Test
Manual/local verification
bun test ./tests/unit/session-tab-switcher.test.ts: 2 tests passed.bun run typecheck,bun run lint,bun run knip,bun run format:check, andbun run check-kilocode-change: passed.bun run test:a11y: all 13 accessibility and keyboard-flow tests passed, including the new session switcher and the refactored Agent Manager search.Reviewer test steps
Checklist