Repository navigation
feat(agent-manager): pin worktrees in the sidebar - #14891
Conversation
Allow pinning worktrees with Shift+click or the context menu. Pinned worktrees lead the sidebar above ungrouped worktrees and sections, and keep their section so unpinning returns them to it.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The incremental commit Files Reviewed (1 file)
Previous Review Summaries (2 snapshots, latest commit c48bfc1)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit c48bfc1)Status: 2 Issues Found | Recommendation: Address before merge The incremental commit Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
No memory leaks were introduced in this increment (no new listeners, timers, or subscriptions). Fix these issues in Kilo Cloud Previous review (commit ce9a04b)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (37 files)
The core ordering/persistence logic is sound: Reviewed by deepseek-v4.1-flash · Input: 52.1K · Output: 7.9K · Cached: 427.6K Review guidance: REVIEW.md from base branch |
WebReflection
left a comment
There was a problem hiding this comment.
Everything is sound but prettier is failing and there are 2 kilobot suggestions.
I let you decide what/how to address both, meanwhile you have my approval
Moving a pinned worktree to its current section, or to Ungrouped when it is already ungrouped, no longer unpins it. The section count keeps pinned members, because pinning does not remove a worktree from a section.
What Problem This Solves
The Agent Manager sidebar lists every worktree and section. With many worktrees, the few that matter at a given moment are hard to keep in view. Their jump shortcuts also shift as worktrees are added or reordered.
Why This Change Was Made
Session tabs already support pinning with Shift+click. Worktrees had no equivalent. This adds a
pinnedflag to the worktree state and treats pinned worktrees as top-level sidebar items, above ungrouped worktrees and sections.User Impact
.kilo/agent-manager.json.Evidence
From an isolated VS Code run against a fixture repo with 4 git worktrees and a "Backend" section.
Before, no pinned block:
After, two pinned worktrees above the section:
Pin in the context menu:
Hover card on a pinned worktree showing its section:
Manual checks: Shift+click on a section worktree pinned it without selecting it; the pin, order, and collapsed state survived two VS Code restarts; a collapsed section kept its pinned worktree visible; the hover unpin button returned the worktree to its section; the right-click move to a section unpinned it; a normal click still selected the worktree. Typecheck, lint, knip, and the focused unit tests pass.
Limitation: drag-and-drop ordering of pinned rows was not exercised in the UI, because the test harness cannot drag.