Skip to content

feat(vscode): improve Agent Manager terminal navigation - #12945

Merged
marius-kilocode merged 6 commits into
mainfrom
design-agent-manager-terminal-ux
Aug 6, 2026
Merged

feat(vscode): improve Agent Manager terminal navigation#12945
marius-kilocode merged 6 commits into
mainfrom
design-agent-manager-terminal-ux

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Agent Manager currently makes embedded terminal focus and terminal-tab ownership ambiguous. A visible side panel can receive keyboard actions without clearly owning focus, switching back to the prompt can require repeated input, and closing terminals can hide the wrong surface or stop the last shell.

This change establishes a focus-aware terminal model:

  • Cmd+/ shows and focuses a hidden terminal, focuses a visible unfocused terminal, or hides a focused terminal.
  • Cmd+Shift+M focuses the Agent Manager prompt and takes precedence over VS Code's Problems shortcut.
  • Cmd+Shift+T creates a main terminal tab from prompt or main-terminal focus, and a side terminal tab only when a side terminal is focused.
  • Cmd+Shift+[ / ] navigate terminals within the focused terminal strip.
  • Cmd+W preserves the session when closing the last terminal and selects a surviving terminal after closing another.
  • Terminal focus is visible, and tooltips and documentation explain the two terminal tab strips and their shortcut ownership.

The behavior keeps agent-session shortcuts stable while making terminal actions predictable by focus.

Comment thread packages/kilo-vscode/webview-ui/agent-manager/terminal/state.ts Outdated
Comment thread packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx
Comment thread packages/kilo-vscode/webview-ui/agent-manager/shortcuts.ts Outdated
Comment thread packages/kilo-vscode/webview-ui/agent-manager/terminal/SideTerminalPanel.tsx Outdated
Comment thread packages/kilo-vscode/webview-ui/agent-manager/terminal/SideTerminalPanel.tsx Outdated
Comment thread packages/kilo-vscode/webview-ui/agent-manager/terminal/side.ts Outdated
@kilo-code-bot

kilo-code-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The incremental range merges main (already-reviewed #12943 model search and #12948 resize performance) and adds one housekeeping commit. The merge conflict resolutions are coherent: the side-panel resize throttle (SIDE_RESIZE_INTERVAL_MS) keeps its trailing flush so the final width is never lost, and TerminalTab's active-gated ResizeObserver is compensated by the activation effect, which refits and re-syncs cols/rows when a hidden terminal becomes visible again. Cleanup (ro.disconnect(), timer/rAF cancels, subscription disposal) remains intact — no new leaks. The previously active WARNING on focusPrompt (Cmd+Shift+M from a focused side terminal) is verified fixed on current HEAD: focusPrompt now blurs document.activeElement and clears terms.setFocusedId(undefined), exactly the suggested remedy. The 3 blank-line deletions for the app line cap are inert.

Files Reviewed (4 files)
  • packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/TerminalTab.tsx
  • .changeset/bright-model-search.md
  • .changeset/sync-inspector-width.md
Previous Review Summaries (2 snapshots, latest commit e6b4313)

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

Previous review (commit e6b4313)

Status: No Issues Found | Recommendation: Merge

The new commit e6b43139 resolves all 3 suggestions from the previous review: the active side tab now suppresses the "next terminal" keybind hint (matching the top tab bar), the redundant closeLabel prop is removed so the close button keeps its "Close tab" aria-label, and the always-true was variable in side.ts is dropped in favor of handoff(true). No new issues in the incremental diff.

Files Reviewed (3 files)
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/SideTerminalPanel.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/SortableTerminalTab.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/side.ts

Previous review (commit e9d7690)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 3

The focus-aware terminal model is well-structured: state/handler logic is unit-tested against the real implementation, the three findings from the previous review round are all fixed in HEAD (cycle boundary seeding, Cmd+Shift+M DOM blur, shortcut-modal dedupe), and docs/changeset/keybinding manifests are consistent. The remaining items are minor polish on changed lines.

Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/kilo-vscode/webview-ui/agent-manager/terminal/SideTerminalPanel.tsx 176 Active side tab shows the "next terminal" keybind, unlike the top tab bar which suppresses it on the active tab
packages/kilo-vscode/webview-ui/agent-manager/terminal/SideTerminalPanel.tsx 178 closeLabel duplicates the chrome default and downgrades the close button aria-label from "Close tab" to "Close"
packages/kilo-vscode/webview-ui/agent-manager/terminal/side.ts 118 was is always true after the new focusedId guard — leftover variable
Files Reviewed (25 files)
  • .changeset/agent-manager-terminal-focus.md
  • packages/kilo-docs/pages/automate/agent-manager.md
  • packages/kilo-vscode/package.json
  • packages/kilo-vscode/src/agent-manager/AgentManagerProvider.ts
  • packages/kilo-vscode/src/agent-manager/focus-panel.ts
  • packages/kilo-vscode/src/agent-manager/format-keybinding.ts
  • packages/kilo-vscode/src/extension.ts
  • packages/kilo-vscode/tests/unit/agent-manager-arch.test.ts
  • packages/kilo-vscode/tests/unit/agent-manager-terminal-side.test.ts
  • packages/kilo-vscode/tests/unit/agent-manager-terminal-state.test.ts
  • packages/kilo-vscode/tests/unit/format-keybinding.test.ts
  • packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/TabBar.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/agent-manager.css
  • packages/kilo-vscode/webview-ui/agent-manager/focus.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/en.ts
  • packages/kilo-vscode/webview-ui/agent-manager/shortcuts.ts
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/SideTerminalPanel.tsx - 2 issues
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/SortableTerminalTab.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/TerminalDestinationButton.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/TerminalTab.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/render.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/side.ts - 1 issue
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/state.ts
  • packages/kilo-vscode/webview-ui/src/stories/agent-manager.stories.tsx

Fix these issues in Kilo Cloud


Reviewed by kimi-k3 · Input: 57.7K · Output: 12.7K · Cached: 754.7K

Review guidance: REVIEW.md from base branch main

"agentManager.shortcuts.newTab": "New tab",
"agentManager.shortcuts.closeTab": "Close tab",
"agentManager.shortcuts.toggleTerminal": "Toggle terminal",
"agentManager.shortcuts.toggleTerminal": "Focus / hide terminal",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we create translations for this change?

@marius-kilocode
marius-kilocode merged commit 69d6da4 into main Aug 6, 2026
26 checks passed
@marius-kilocode
marius-kilocode deleted the design-agent-manager-terminal-ux branch August 6, 2026 14:49
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…terminal-ux

feat(vscode): improve Agent Manager terminal navigation
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