fix(vscode/cursor): keep sidebar navigation visible in the secondary side bar - #12894
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Incremental review of commits since Files Reviewed (4 files)
Previous Review Summaries (3 snapshots, latest commit cccbdc3)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit cccbdc3)Status: 1 Issue Found | Recommendation: Address before merge Overview
Incremental review of commits since Fix these issues in Kilo Cloud Issue Details (click to expand)SUGGESTION
Files Reviewed (5 files)
Previous review (commit 013ce5a)Status: No Issues Found | Recommendation: Merge Incremental review of commits since Files Reviewed (10 files)
Previous review (commit 9010494)Status: 2 Issues Found | Recommendation: Address before merge Overview
Solid fix overall. The message wiring was verified end-to-end: all seven actions route to handlers that still exist ( Fix these issues in Kilo Cloud Issue Details (click to expand)SUGGESTION
Files Reviewed (31 files)
Reviewed by kimi-k3 · Input: 57.7K · Output: 10K · Cached: 614.4K Review guidance: REVIEW.md from base branch |
SidebarTopBar rendered unconditionally at the top of App.tsx, but that bundle is also used by the dedicated Settings, Profile, and Sub-Agent Viewer panels (via KiloProvider.resolveWebviewPanel). Those panels now showed the same nav bar, letting users navigate away from a panel whose entire purpose is to show one focused view — e.g. clicking "New Task" inside the Settings panel would replace it with a fresh chat. KiloProvider now injects window.KILO_TOP_BAR / window.KILO_TOP_BAR_SURFACE synchronously into the webview HTML it generates (same pattern as the existing window.ICONS_BASE_URI), so App.tsx can gate the bar with no postMessage race. Settings/Profile and the Sub-Agent Viewer set hideTopBar: true; both "Open in Tab" construction sites set topBarSurface: "tab" so their button clicks report a distinct telemetry surface instead of being folded into "sidebar_title". Agent Manager is unaffected — it renders a separate bundle via attachToWebview, not resolveWebviewView/Panel.
…lo-Org/kilocode into fix/kilo-navigation-secondary-sidebar
…econdary-sidebar fix(vscode/cursor): keep sidebar navigation visible in the secondary side bar
Issue
No tracked issue — reported directly during a support/debugging session.
Context
The Kilo sidebar's navigation bar (New Task, History, Agent Manager, KiloClaw, Marketplace, Profile, Settings) disappeared entirely when the Kilo view was moved from the primary Activity Bar sidebar into the Secondary Side Bar.
This turned out to be Cursor-specific, not a VS Code issue — real VS Code (v1.132.0) renders the native toolbar correctly there. This matches a known category of bug in Cursor's Secondary Sidebar/Auxiliary Bar support for extension-contributed
view/titletoolbars, reported independently for other extensions — not something Kilo'spackage.jsoncontributions were doing wrong.Implementation
The nav bar was never rendered by Kilo's webview — it was the native
view/titletoolbar, contributed declaratively inpackage.jsonand rendered by the host shell outside the webview's DOM. There's no API to detect a host dropping it, so the fix moves navigation into the webview itself, where Kilo fully controls rendering regardless of host or dock location:SidebarTopBar.tsx, an icon-button row wired to the same actions as the old native buttons (New Task/History dispatch locally; Agent Manager/KiloClaw/Marketplace/Settings reuse existingpostMessagetypes). Added one new message type,openProfilePanel, routed throughsidebar-worktree.tsto avoidKiloProvider'shandleWebviewMessageswitch, already at the ESLint complexity cap.SidebarTopBarat the top ofApp.tsx, shared by both the sidebar and the "Open in Tab" panel.view/titlemenu contributions and thesidebarTitle.*command wrappers inextension.ts, which became dead code once the menus were removed.TITLE_BUTTON_CLICKEDtelemetry event the native wrappers used to record, via the existing"telemetry"webview message.@vscode/codicons), matching the icons on the removed native commands exactly, rather than an approximation — so the glyphs look identical to native in both VS Code and Cursor.sidebar.topBar.*strings for all 20 supported locales.Note for reviewers: the bar's chrome changes in VS Code too, even though VS Code's native rendering already worked fine — it moves from native title-bar buttons to a webview-rendered row (with its own hover/ghost styling and a border separating it from the native pane title above). The icon glyphs themselves are unchanged, since they render the same codicon font. Functionality is equivalent everywhere.
Screenshots / Video
VS Code (nav bar already worked natively; shows the new webview-rendered row)
Cursor (primary bug — nav bar missing in Secondary Side Bar before this fix, present after)
How to Test
Manual/local verification
typecheck,lint,knip, andformatinpackages/kilo-vscode— all pass.Reviewer test steps
bun run extensionfrompackages/kilo-vscode; seeAGENTS.mdfor isolated-instance variants).