Skip to content

fix(vscode): fix multi-project navigation shortcuts - #12843

Merged
marius-kilocode merged 8 commits into
mainfrom
fix-multi-project-navigation-and-shortcuts
Aug 4, 2026
Merged

fix(vscode): fix multi-project navigation shortcuts#12843
marius-kilocode merged 8 commits into
mainfrom
fix-multi-project-navigation-and-shortcuts

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Multi-project Agent Manager navigation currently derives its order differently from the rendered project bodies. Once a worktree belongs to a section, Up/Down navigation and number jumps can target the wrong item, while multi-project cards do not consistently show the corresponding Cmd/Ctrl shortcuts.\n\nThe navigation order now follows persisted worktree and section ordering, keeps ungrouped worktrees and section members aligned with the rendered sidebar, skips collapsed sections, and uses one global order for both badges and number jumps. Project-qualified DOM IDs keep activation aligned across repositories. Regression coverage and a patch changeset are included.

Comment thread packages/kilo-vscode/webview-ui/agent-manager/navigate.ts Outdated
Comment thread packages/kilo-vscode/webview-ui/agent-manager/navigate.ts Outdated
@kilo-code-bot

kilo-code-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files, incremental)
  • packages/kilo-vscode/webview-ui/agent-manager/navigate.ts
  • packages/kilo-vscode/tests/unit/navigate.test.ts

The one remaining finding from the previous review is resolved in c8f86d8: when a project has sections, buildProjectNavOrder now re-sorts ungrouped worktrees by raw worktreeOrder rank, exactly mirroring buildTopLevelItems (same comparator, same stable-sort input, same sections.length > 0 condition), so the nav order and rendered body agree in the split-group scenario. The new test is discriminating — it fails without the re-sort (group adjacency would yield aw1, aw3, aw2). No memory leaks introduced (pure function change; no new listeners, timers, or subscriptions).

Previous Review Summaries (3 snapshots, latest commit d9d3568)

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

Previous review (commit d9d3568)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/kilo-vscode/webview-ui/agent-manager/navigate.ts 192 Ungrouped multi-version group adjacency still diverges from the rendered body when the project has sections — buildTopLevelItems re-sorts ungrouped worktrees by raw worktreeOrder rank, undoing the sortWorktrees adjacency now applied here
Files Reviewed (2 files, incremental)
  • packages/kilo-vscode/webview-ui/agent-manager/navigate.ts - 1 issue (sections-present ungrouped group adjacency)
  • packages/kilo-vscode/tests/unit/navigate.test.ts - adjacency test is now discriminating — no issues

All three previous findings are resolved in d9d3568: buildProjectNavOrder now applies sortWorktrees, the worktreeOrder docstring documents section IDs, and the adjacency test now fails without the fix. The one remaining item is a narrow edge case introduced by that fix. No memory leaks introduced (no new listeners, timers, or subscriptions).

Fix these issues in Kilo Cloud

Previous review (commit d3dca39)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 3
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/kilo-vscode/webview-ui/agent-manager/navigate.ts 192 Nav order still doesn't apply sortWorktrees group adjacency — the new commit imports it and threads groupId through project-nav.ts, but buildProjectNavOrder never calls it, so separated multi-version groups can still diverge from the rendered body
packages/kilo-vscode/tests/unit/navigate.test.ts 446 New "keeps multi-version worktrees adjacent" test passes with or without the fix — expected output equals the raw persisted order, so it can't catch an adjacency regression
packages/kilo-vscode/webview-ui/agent-manager/navigate.ts 166 worktreeOrder docstring says "Worktree IDs" but the persisted order also contains section IDs, which section ranking relies on
Files Reviewed (8 files)
  • .changeset/fix-multi-project-navigation.md - changeset present, user-facing, patch — OK
  • packages/kilo-vscode/tests/unit/navigate.test.ts - 1 issue (vacuous adjacency test); other cases exercise the real implementation — OK
  • packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx - projectShortcutMap shares buildProjectNavEntries order with jump/step, badges match shortcuts — OK
  • packages/kilo-vscode/webview-ui/agent-manager/ProjectList.tsx - prop pass-through — OK
  • packages/kilo-vscode/webview-ui/agent-manager/ProjectSidebarBody.tsx - Local badge + worktree shortcut lookup consistent with existing patterns — OK
  • packages/kilo-vscode/webview-ui/agent-manager/navigate.ts - 2 issues (group-adjacency call site still missing, docstring)
  • packages/kilo-vscode/webview-ui/agent-manager/project-nav.ts - threads groupId into nav inputs; currently unused until buildProjectNavOrder consumes it — OK
  • packages/kilo-vscode/webview-ui/agent-manager/section-helpers.ts - sortWorktrees generic widening is behavior-preserving and backward compatible — OK

No memory leaks introduced (no new listeners, timers, or subscriptions; memos are root-owned). All three findings are low-severity polish on an otherwise solid fix.

Fix these issues in Kilo Cloud

Previous review (commit 24f463c)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 2
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/kilo-vscode/webview-ui/agent-manager/navigate.ts 190 Nav order doesn't apply sortWorktrees group adjacency, so separated multi-version groups can still diverge from the rendered body
packages/kilo-vscode/webview-ui/agent-manager/navigate.ts 164 worktreeOrder docstring says "Worktree IDs" but the persisted order also contains section IDs, which section ranking relies on
Files Reviewed (8 files)
  • .changeset/fix-multi-project-navigation.md - changeset present, user-facing, patch — OK
  • packages/kilo-vscode/tests/unit/navigate.test.ts - real-implementation regression coverage for persisted order — OK
  • packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx - projectShortcutMap shares buildProjectNavEntries order with jump/step, badges match shortcuts — OK
  • packages/kilo-vscode/webview-ui/agent-manager/ProjectList.tsx - prop pass-through — OK
  • packages/kilo-vscode/webview-ui/agent-manager/ProjectSidebarBody.tsx - Local badge + worktree shortcut lookup consistent with existing isMac/am-shortcut-badge patterns — OK
  • packages/kilo-vscode/webview-ui/agent-manager/navigate.ts - 2 issues (group adjacency gap, docstring)
  • packages/kilo-vscode/webview-ui/agent-manager/project-nav.ts - clean extraction of buildProjectNavEntries — OK
  • packages/kilo-vscode/webview-ui/agent-manager/section-helpers.ts - buildShortcutMap type widening is backward compatible — OK

No memory leaks introduced (no new listeners, timers, or subscriptions; memos are root-owned). Both findings are low-severity polish on an otherwise solid fix.

Fix these issues in Kilo Cloud


Reviewed by kimi-k3 · Input: 40.2K · Output: 10.4K · Cached: 817.2K

Review guidance: REVIEW.md from base branch main

Comment thread packages/kilo-vscode/tests/unit/navigate.test.ts Outdated
Comment thread packages/kilo-vscode/webview-ui/agent-manager/navigate.ts
@marius-kilocode
marius-kilocode merged commit 0b8f749 into main Aug 4, 2026
23 checks passed
@marius-kilocode
marius-kilocode deleted the fix-multi-project-navigation-and-shortcuts branch August 4, 2026 10:36
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…igation-and-shortcuts

fix(vscode): fix multi-project navigation shortcuts
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