sessions: inline rename for chats in the chat composite bar#321384
Merged
Conversation
Support renaming a chat directly inside its tab in the chat composite bar, mirroring the inline rename of the session title. Double-click a tab (or use the context menu "Rename") to reveal a themed InputBox pre-filled with the chat title; Enter commits via renameChat, Escape or blur cancels. The rename input lives in a stable, empty per-tab container that is toggled via the tab's `editing` CSS class; the InputBox is created lazily only while editing and disposed when done, so no DOM is inserted/removed on demand and unused tabs carry no widget overhead. Also adds a component fixture (chatCompositeBar.fixture.ts) covering the two-tab, mixed-status, long-title and renaming states for screenshot testing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @benibenjMatched files:
|
Contributor
Screenshot ChangesBase: Added (8) |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds inline renaming for chats directly within the Agents window chat composite bar tabs, using a lazily-created themed InputBox hosted in a stable per-tab container (CSS-toggled), and adds a component fixture to validate rendering across states/themes.
Changes:
- Implement inline rename UI/behavior in
ChatCompositeBar(dblclick + context menu; Enter commits, Escape/blur cancels). - Add tab-editing styling and a shared
--chat-tab-max-widthCSS variable (registered for stylelint). - Add a component fixture covering typical/mixed/long-title/renaming states.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/test/browser/componentFixtures/sessions/chatCompositeBar.fixture.ts | Adds component explorer fixture variants to validate tab strip rendering and renaming state. |
| src/vs/sessions/browser/parts/media/chatCompositeBar.css | Adds editing-mode tab styles and a reusable max-width CSS variable for tabs. |
| src/vs/sessions/browser/parts/chatCompositeBar.ts | Implements inline rename input lifecycle, actions, and editing state management for chat tabs. |
| build/lib/stylelint/vscode-known-variables.json | Registers --chat-tab-max-width for stylelint validation. |
| .github/skills/sessions/SKILL.md | Documents the “stable container + lazy widget” pattern for transient inline UI like rename. |
Copilot's findings
- Files reviewed: 5/5 changed files
- Comments generated: 2
Address PR review: the tab click handler bailed out while editing and the input blur handler switched tabs via relatedTarget. Because blur clears the editing state before the trailing click fires, this could switch twice (extra openChat/flicker) and was order-sensitive. Now blur only cancels the rename, and the tab click handler cancels any in-progress edit before switching, so tab switching follows the normal click path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
benvillalobos
approved these changes
Jun 15, 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.
Fixes #321386
What
Adds inline renaming of a chat directly inside its tab in the chat composite bar (Agents window), mirroring how the session title is renamed inline in the session header.
InputBoxpre-filled with the chat title.ISessionsManagementService.renameChat; Escape or blur cancels.relatedTarget).How
editingCSS class. TheInputBoxis created lazily only while editing and disposed when done — so no DOM is inserted/removed on demand, and tabs that are never renamed carry no widget overhead.Tests / screenshots
Adds a component fixture
chatCompositeBar.fixture.tswith variants for the two-tab, mixed-status, long-title and renaming states (Dark + Light). Verified rendering locally via the Component Explorer.Notes for reviewers
src/vs/sessions/plus the new fixture and a stylelint known-variable entry; the sessions skill doc was updated with the relevant pitfalls.vs/sessions/*imports useeslint-disable-next-line local/code-import-patterns, matching the existing sessions fixtures.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com