Move context menu into session header#319938
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR moves the Sessions window “session actions” context menu from the title bar session pill into each session’s header, and formalizes it as a dedicated menu (Menus.SessionHeaderContext) that extensions/providers can contribute to via a new chatSessions/header/context menus contribution point.
Changes:
- Added a new
MenuId.SessionHeaderContextand exposed it to extensions viachatSessions/header/context. - Wired the session header to open the new context menu on right-click and added header menu placements for existing session actions (pin/close/rename/read-state).
- Updated sessions list/view context keys to support
when-clause evaluation for the new header menu contributions (e.g. provider/type, archived/read).
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/services/actions/common/menusExtensionPoint.ts | Registers chatSessions/header/context as a new menus extension point targeting MenuId.SessionHeaderContext. |
| src/vs/sessions/LAYOUT.md | Documents the new header context menu behavior and contribution point. |
| src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts | Adds Menus.SessionHeaderContext menu locations for rename + read/unread actions; updates archived/read context key usage. |
| src/vs/sessions/contrib/sessions/browser/views/sessionsList.ts | Switches list context keys over to SessionIs* and adds chatSessionType to overlays; impacts extension when keys. |
| src/vs/sessions/contrib/sessions/browser/sessionsTitleBarWidget.ts | Removes the title bar pill context menu handling (menu now lives in the session header). |
| src/vs/sessions/contrib/sessions/browser/sessionsActions.ts | Contributes pin/close actions into Menus.SessionHeaderContext. |
| src/vs/sessions/common/contextkeys.ts | Introduces ChatSessionTypeContext, SessionIsReadContext, and SessionIsArchivedContext. |
| src/vs/sessions/browser/parts/sessionView.ts | Sets the new context keys on the session view’s scoped context key service. |
| src/vs/sessions/browser/parts/sessionHeader.ts | Implements right-click handling to show Menus.SessionHeaderContext from the session header. |
| src/vs/sessions/browser/menus.ts | Exposes SessionHeaderContext via the sessions Menus helper. |
| src/vs/platform/actions/common/actions.ts | Adds MenuId.SessionHeaderContext. |
| extensions/copilot/package.json | Adds Copilot provider rename commands to the new chatSessions/header/context menu. |
Copilot's findings
- Files reviewed: 12/12 changed files
- Comments generated: 5
dmitrivMS
previously approved these changes
Jun 4, 2026
connor4312
previously approved these changes
Jun 4, 2026
Yoyokrazy
previously approved these changes
Jun 4, 2026
dmitrivMS
previously approved these changes
Jun 4, 2026
sandy081
previously approved these changes
Jun 4, 2026
roblourens
approved these changes
Jun 4, 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.
Copilot Generated Description:Integrate the context menu into the session header, allowing right-click actions such as pinning, renaming, and marking sessions as read/unread directly from the header. The context menu is accessible via theMenus.SessionHeaderContextidentifier. Extensions can also contribute to this menu through thechatSessions/header/contextpoint.