From 1ec62684fcd82402b7e1628ce233117ccdee1092 Mon Sep 17 00:00:00 2001 From: marius-kilocode Date: Tue, 8 Sep 2026 12:04:56 +0200 Subject: [PATCH 1/2] feat(agent-manager): regroup toolbar actions --- .changeset/agent-manager-toolbar-groups.md | 5 + packages/kilo-ui/src/components/icon.tsx | 3 +- .../agent-manager/AgentManagerApp.tsx | 26 +- .../webview-ui/agent-manager/TabBar.tsx | 231 +++++++++--------- .../agent-manager/agent-manager.css | 56 ++++- .../src/stories/agent-manager.stories.tsx | 52 ++-- 6 files changed, 211 insertions(+), 162 deletions(-) create mode 100644 .changeset/agent-manager-toolbar-groups.md diff --git a/.changeset/agent-manager-toolbar-groups.md b/.changeset/agent-manager-toolbar-groups.md new file mode 100644 index 000000000000..81ff2067e385 --- /dev/null +++ b/.changeset/agent-manager-toolbar-groups.md @@ -0,0 +1,5 @@ +--- +"kilo-code": patch +--- + +Regroup the Agent Manager toolbar: optional session panels (documents, subagents) sit left of a separator, and the fixed workbench (changes, PR, apply, open in VS Code, browser, run, terminal) keeps stable positions on the right. Toolbar icons render at a uniform 1px stroke and dim when disabled. Open the full-screen review from the changes panel header instead of a toolbar button. diff --git a/packages/kilo-ui/src/components/icon.tsx b/packages/kilo-ui/src/components/icon.tsx index e9324a60c883..7aaf10110296 100644 --- a/packages/kilo-ui/src/components/icon.tsx +++ b/packages/kilo-ui/src/components/icon.tsx @@ -8,7 +8,8 @@ const icons: Record = { }, "pull-request": { viewBox: "0 0 20 20", - path: ``, + // Stroked at 1.25 on the 20-unit grid (1px at 16px) to match the other outline icons. + path: ``, }, refresh: { viewBox: "0 0 20 20", diff --git a/packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx b/packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx index 373e5e962e62..701f7fe06332 100644 --- a/packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx +++ b/packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx @@ -1716,14 +1716,6 @@ const AgentManagerContent: Component = () => { setReviewActive(true) } - const toggleReviewTab = () => { - if (reviewActive()) { - closeReviewTab() - return - } - openReviewTab() - } - // Deferred close: flip signal immediately for instant UI feedback, // the unmount triggers heavy FileDiff cleanup but the tab bar // and chat view are already visible before that work runs. @@ -2365,8 +2357,8 @@ const AgentManagerContent: Component = () => { worktreeStats={worktreeStats} applyState={apply.applyStateForSelection} reviewScope={review.scope} + onApply={metrics.click("apply_to_local", "tab_toolbar", openApplyDialog)} onOpen={openWindow} - onApply={openApplyDialog} runStatuses={runStatuses} runConfigured={runScriptConfigured} onRun={(id) => runWorktree(id, sideCtl.destination())} @@ -2375,16 +2367,24 @@ const AgentManagerContent: Component = () => { reviewActive={reviewActive} onToggleDiff={toggleDiffPanel} {...browser.tabs} - onToggleReview={metrics.click("fullscreen_review", "tab_toolbar", toggleReviewTab)} + onToggleBrowser={metrics.click("browser", "tab_toolbar", browser.tabs.onToggleBrowser, () => ({ + action: browser.tabs.browserOpen() ? "close" : "open", + }))} prStatus={() => activePR()?.pr} prOpen={prOpen} - onTogglePR={togglePRPanel} + onTogglePR={metrics.click("pull_request", "tab_toolbar", togglePRPanel, () => ({ + action: prOpen() ? "close" : "open", + }))} documentsOpen={documentInspector.isOpen} documentsAvailable={documentInspector.available} - onToggleDocuments={documentInspector.toggle} + onToggleDocuments={metrics.click("documents", "tab_toolbar", documentInspector.toggle, () => ({ + action: documentInspector.isOpen() ? "close" : "open", + }))} subagentsAvailable={() => subagentCtl.tabs.tabs().length > 0 || subagentCtl.toolbar.available().length > 0} subagentsOpen={() => sidePanel() === SidePanel.Subagents} - onToggleSubagents={subagentCtl.toolbar.toggle} + onToggleSubagents={metrics.click("subagents", "tab_toolbar", subagentCtl.toolbar.toggle, () => ({ + action: sidePanel() === SidePanel.Subagents ? "close" : "open", + }))} terminalDestination={sideCtl.destination} terminalDestinationActive={() => sidePanel() === SidePanel.Terminal} terminalKeybind={() => kb().showTerminal ?? ""} diff --git a/packages/kilo-vscode/webview-ui/agent-manager/TabBar.tsx b/packages/kilo-vscode/webview-ui/agent-manager/TabBar.tsx index 56a8755f95f1..76754f0a29ba 100644 --- a/packages/kilo-vscode/webview-ui/agent-manager/TabBar.tsx +++ b/packages/kilo-vscode/webview-ui/agent-manager/TabBar.tsx @@ -44,8 +44,8 @@ export interface TabBarProps { applyState: () => { status: string } | undefined /** Active diff scope; applying to local is only possible from the branch scope. */ reviewScope: () => DiffScope - onOpen: () => void onApply: () => void + onOpen: () => void runStatuses: () => Record runConfigured: () => boolean onRun: (id: string) => void @@ -56,7 +56,6 @@ export interface TabBarProps { onToggleBrowser: () => void reviewActive: () => boolean onToggleDiff: () => void - onToggleReview: () => void prStatus: () => PRStatus | undefined prOpen: () => boolean onTogglePR: () => void @@ -138,45 +137,128 @@ export const TabBar: Component = (props) => ( if (!state) return false return state.status === "checking" || state.status === "applying" } + const panels = () => props.documentsAvailable() || props.subagentsAvailable() return ( <> - - <> - - - - - + {/* Session panels: re-open handles for panels this session produced. + They grow outward to the left so the workbench never shifts. */} + + + + - - + + + + + + + + + + + {/* Workbench: fixed slots anchored to the right edge. + Changes first so its stats can grow without moving a pillar. */} + + + + + {(pr) => ( + + - + )} + + + + + + + + + + + + + + + + + + + {/* Run and Terminal form the fixed tail: a run sends its output + to the terminal destination, so cause and effect stay adjacent. */} {(() => { const rid = () => (sel() === LOCAL ? LOCAL : (sel() as string)) @@ -185,7 +267,7 @@ export const TabBar: Component = (props) => ( const configured = props.runConfigured const title = () => (configured() ? (active() ? "Stop" : "Run") : "Configure run script") return ( - + = (props) => ( ) })()} - - {(pr) => ( - - - - )} - - - - - - - - - - - - - - - - - - - ) })()} - - - - - {/* Terminal destination split button: the primary action follows the user's setting (VS Code integrated terminal or the embedded side panel), the dropdown picks which. diff --git a/packages/kilo-vscode/webview-ui/agent-manager/agent-manager.css b/packages/kilo-vscode/webview-ui/agent-manager/agent-manager.css index e2d568adfb66..f04d3c314431 100644 --- a/packages/kilo-vscode/webview-ui/agent-manager/agent-manager.css +++ b/packages/kilo-vscode/webview-ui/agent-manager/agent-manager.css @@ -1021,12 +1021,6 @@ html[data-theme="kilo-vscode"] } } -/* Green accent when running — uses VS Code's standard green token */ -.am-run-active, -.am-run-active [data-component="icon"] { - color: var(--vscode-testing-iconPassed, #34d399) !important; -} - .am-stat-files { color: var(--text-muted); } @@ -1745,6 +1739,54 @@ body.am-wt-dragging-active * { border-left: 1px solid var(--border-weak-base); } +/* Optional session panel handles sit left of the fixed workbench buttons, + separated by a hairline so they read as a different class of control. */ +.am-tab-session-panels { + display: flex; + align-items: center; + align-self: stretch; + gap: 4px; +} + +.am-tab-actions-separator { + width: 1px; + align-self: stretch; + margin: 6px 4px; + background: var(--border-weak-base); + flex-shrink: 0; +} + +/* Ghost icon buttons do not dim their icon when disabled (the ghost variant + sets color on the svg itself), so a disabled Apply looked identical to an + enabled toggle and kept the pointer cursor. */ +.am-tab-actions [data-component="icon-button"]:disabled { + cursor: default; +} + +.am-tab-actions [data-component="icon-button"]:disabled [data-slot="icon-svg"] { + color: var(--icon-disabled); +} + +/* Normalize stroke weight to 1px at 16px (codicon weight). Upstream icons + draw at stroke 1 on a 20-unit grid, which renders as a 0.8px hairline; + Kilo icons draw at 2, which renders bolder. Filled icons are unaffected. + Upstream icons render via an SVG sprite, so the value is set on the svg + and inherited by the sprite paths, which carry no explicit stroke-width. + Scoped to the tab bar until the same value rolls out in kilo-ui. */ +.am-tab-actions [data-slot="icon-svg"] { + stroke-width: 1.25; +} + +/* Kilo icons render inline with an explicit stroke-width attribute, which + beats the inherited value, so override per grid. */ +.am-tab-actions [data-slot="icon-svg"][viewBox="0 0 20 20"] [stroke] { + stroke-width: 1.25; +} + +.am-tab-actions [data-slot="icon-svg"][viewBox="0 0 24 24"] [stroke] { + stroke-width: 1.5; +} + .am-tab-apply { display: flex; position: relative; @@ -1920,6 +1962,8 @@ body.am-wt-dragging-active * { display: inline-flex; align-items: center; gap: 4px; + /* Digits keep one width so count changes do not shift the buttons to the left. */ + font-variant-numeric: tabular-nums; } .am-diff-toggle-btn.am-tab-diff-btn-active .am-stat-files { diff --git a/packages/kilo-vscode/webview-ui/src/stories/agent-manager.stories.tsx b/packages/kilo-vscode/webview-ui/src/stories/agent-manager.stories.tsx index ef8d0c8635e3..0f3646ed680b 100644 --- a/packages/kilo-vscode/webview-ui/src/stories/agent-manager.stories.tsx +++ b/packages/kilo-vscode/webview-ui/src/stories/agent-manager.stories.tsx @@ -1343,7 +1343,6 @@ export const TabBarWithReviewTab: Story = {
-
@@ -1383,8 +1382,27 @@ export const TabBarSingleTab: Story = { const MockFullContextActions = () => (
- - + + + + + + + + + + + + + + ( aria-label="Apply selected worktree changes to local branch" /> + + + + + + @@ -1404,28 +1428,6 @@ const MockFullContextActions = () => ( - - - - - - - - - - - - - - -
From cb744c74fc891ebd1db597f3df7cda3d86996efe Mon Sep 17 00:00:00 2001 From: "kilo-maintainer[bot]" Date: Tue, 8 Sep 2026 10:09:25 +0000 Subject: [PATCH 2/2] chore: update kilo-vscode visual regression baselines --- .../agentmanager/tab-bar-full-context-chromium-linux.png | 4 ++-- .../agentmanager/tab-bar-with-review-tab-chromium-linux.png | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/agentmanager/tab-bar-full-context-chromium-linux.png b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/agentmanager/tab-bar-full-context-chromium-linux.png index ee0e2b2a9c1b..c0c5814d389f 100644 --- a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/agentmanager/tab-bar-full-context-chromium-linux.png +++ b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/agentmanager/tab-bar-full-context-chromium-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b571c4468c869325ae8b3c9d6848f2dd80f9c7efe35a92f6dda4698f79891e90 -size 2985 +oid sha256:baa2065b2a4a1489bae16b76e4df8e49ff586324600ca2792cd1eb4309140b55 +size 3035 diff --git a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/agentmanager/tab-bar-with-review-tab-chromium-linux.png b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/agentmanager/tab-bar-with-review-tab-chromium-linux.png index 3eb073991f9a..fa0a54c719c4 100644 --- a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/agentmanager/tab-bar-with-review-tab-chromium-linux.png +++ b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/agentmanager/tab-bar-with-review-tab-chromium-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:16fdb6361199c58a8e99ad2661dc47791b0f4737ada16760151a26e7ebdd8bd1 -size 3044 +oid sha256:2694489c7ca4b3764c5cf93cfd9ef543dabd16225b4447feaa3b1e259aa05e34 +size 2714