feat(sidebar): add pinning and close to the right to chat tabs - #14446
Merged
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The two prior suggestions are resolved at
Files Reviewed (4 files)
Previous Review Summaries (2 snapshots, latest commit 06fad00)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 06fad00)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (6 files)
Fix these issues in Kilo Cloud Previous review (commit f1e0744)Status: 2 Issues Found | Recommendation: Address before merge Overview
Pinning and Close to the Right reuse the Agent Manager helpers cleanly, and the ordering/close semantics check out against the tests. Both findings are state-hygiene nits, not blockers. Issue Details (click to expand)SUGGESTION
Files Reviewed (13 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
marius-kilocode
enabled auto-merge
September 22, 2026 08:45
WebReflection
approved these changes
Sep 22, 2026
This was referenced Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
The Agent Manager tab bar has Pin and Close to the Right, but the sidebar chat tab strip still only offers Close and Close Others. With several sidebar sessions open there is no way to keep a reference tab in place or clear the trailing tabs in one action.
Why This Change Was Made
Port both actions to the sidebar by reusing the existing Agent Manager logic instead of duplicating the tab components:
applyPinnedTabs,togglePinnedTab) and a new group-aware reorder helper (reorderPinnedTabs) into the sharedwebview-ui/src/utils/tab-order.ts, and re-export them from the Agent Manager module so existing callers and tests are unchanged.webview-ui/src/utils/session-close.ts, a small adapter that maps the shared Agent Managerclose-to-righthelpers onto a session-only tab bar (the sidebar has no terminal or review tabs).LocalTabsProvider, persisted next to the existing tab order assidebarPinnedSessionTabIDs.SessionTabStripto the existing sharedSessionTabandSessionTabMenu, so the sidebar reuses the same components and the existingagentManager.tab.pin/unpin/pinned/closeToRighttranslations. No new strings were added.This follows #14444, which added Close to the Right to the Agent Manager tab bar. That PR has merged into
main, so this branch is based onmainand reuses its helpers directly.User Impact
Evidence
Automated, from
packages/kilo-vscode/:bun run lint,bun run typecheck,bun run knip, andbun run test:unit(6363 pass, 2 skip, 0 fail). New focused coverage for the sidebar lives intests/unit/session-close.test.ts, plus pin cases intests/unit/tab-order.test.ts,tests/unit/local-tabs.test.ts, andtests/unit/sidebar-tab-dnd.test.ts.Manual self-test in an isolated VS Code instance (dev build, real sidebar UI, real sessions created through the backend API so no model requests were sent):
Pinnedaria label and no close button.Pinned tabs at the front, with the trailing unpinned tab still open:
Context menu on a sidebar tab, Close to the Right after Close Others:
After Close to the Right: the trailing tab is gone and both pinned tabs remain:
Close to the Right is absent on the last tab: