feat(agent-manager): add quick search for worktrees and sessions - #11294
Merged
Conversation
Contributor
Code Review SummaryStatus: 1 Issue Found | Recommendation: Suggest addressing Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (18 files)
Fix these issues in Kilo Cloud Previous Review Summaries (2 snapshots, latest commit 5120e15)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 5120e15)Status: 1 Issue Found | Recommendation: Suggest addressing Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (18 files)
Fix these issues in Kilo Cloud Previous review (commit ed3eff8)Status: 1 Issue Found | Recommendation: Suggest addressing Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (17 files)
Reviewed by deepseek-v4-pro-20260423 · 197,629 tokens Review guidance: REVIEW.md from base branch |
marius-kilocode
force-pushed
the
mica-potassium
branch
from
June 16, 2026 15:41
ed3eff8 to
5120e15
Compare
chrarnoldus
approved these changes
Jun 17, 2026
t7tran
pushed a commit
to t7tran/kilocode
that referenced
this pull request
Aug 14, 2026
feat(agent-manager): add quick search for worktrees and sessions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agent Manager is intended to be a single place for moving between parallel tasks, but navigation currently depends on what is already visible in the sidebar or open in the current context. Returning to an older session, a collapsed section, or a previously selected worktree therefore requires manual browsing, and the existing tab switcher only covers tabs in the active context.
This adds a quick switcher beside the Worktrees heading that searches the complete set of useful Agent Manager destinations: the local workspace, persistent local sessions, managed worktrees, and persistent sessions assigned to those worktrees. Because managed worktrees are indexed independently of their currently open tabs, the switcher also makes it easy to return to worktrees used earlier. Pending New Session tabs, terminals, review tabs, and unassigned history sessions stay out of the index so results represent durable navigation targets rather than temporary UI state.
The interaction is optimized for keyboard navigation. A configurable Agent Manager command uses Cmd+F on macOS and Ctrl+F elsewhere, scoped to the active Agent Manager webview and excluded while the VS Code terminal has focus. Embedded Agent Manager terminals pass this chord back to the webview. Repeating the shortcut clears the current query and focuses the input, Enter opens the selected destination, and Escape or outside dismissal returns focus to the prompt. This keeps the primary flow to shortcut, type, Enter, then continue prompting, without leaving focus on the search button.
The result model deliberately separates browsing from searching. With an empty query, results are grouped into Sessions and Local & Worktrees, with sessions first because opening a specific conversation is the common quick-switch action. Once text is entered, group boundaries disappear and all destinations compete in one fuzzy-ranked list, preventing a lower-quality result from winning merely because it belongs to an earlier section. Titles are matched directly while searchable metadata includes worktree labels, branches, section names, and stable IDs.
Default ordering prioritizes destinations that need attention or are currently running, then destinations structurally visible in the expanded sidebar hierarchy, then recent activity. Structural visibility is used only as a stable tie-breaker. It is based on section expansion rather than viewport intersection or scroll position, so scrolling cannot reshuffle results while someone is choosing. During an active query, fuzzy relevance remains primary and these signals only resolve otherwise equivalent matches. Keyboard highlight movement does not mutate sidebar state.
Each row preserves enough context to distinguish similarly named tasks without making the list noisy: session rows show their local or worktree hierarchy, worktree rows show section and branch metadata, section colors remain visible, and rows expose relative activity time, session counts, running state, retry state, or waiting state as appropriate. Duplicate hierarchy labels are suppressed when a session title already matches its worktree label. The local workspace is presented as a first-class context with its branch, activity state, and persistent-session count rather than being implied by local session results.
Selection follows existing Agent Manager navigation semantics instead of creating a parallel state model. Choosing local restores its remembered session, terminal, or review state. Choosing a worktree restores that worktree context. Choosing a session first selects its owning context and then the exact session. If the destination belongs to a collapsed section, the section expands only after selection so hidden destinations remain searchable without changing the layout while arrows move through the list. The prompt receives focus after navigation.
The narrower top-bar tab search is removed to avoid two overlapping switchers with different scopes. Existing tab-cycle behavior remains available through its keyboard commands, while the sidebar switcher becomes the single discoverable search surface for cross-context navigation. Search indexing and ranking live in a pure helper for deterministic coverage, and the worktree header actions remain isolated from the main Agent Manager component so the integration does not deepen an already large view.
Fixes #10597