Skip to content

Move context menu into session header#319938

Merged
benibenj merged 6 commits into
mainfrom
benibenj/fortunate-ocelot
Jun 4, 2026
Merged

Move context menu into session header#319938
benibenj merged 6 commits into
mainfrom
benibenj/fortunate-ocelot

Conversation

@benibenj
Copy link
Copy Markdown
Contributor

@benibenj benibenj commented Jun 4, 2026

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 the Menus.SessionHeaderContext identifier. Extensions can also contribute to this menu through the chatSessions/header/context point.

Copilot AI review requested due to automatic review settings June 4, 2026 14:52
@benibenj benibenj enabled auto-merge June 4, 2026 14:52
@benibenj benibenj self-assigned this Jun 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.SessionHeaderContext and exposed it to extensions via chatSessions/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

Comment thread src/vs/sessions/browser/parts/sessionHeader.ts
Comment thread src/vs/sessions/browser/parts/sessionHeader.ts
Comment thread src/vs/sessions/contrib/sessions/browser/views/sessionsList.ts
Comment thread src/vs/sessions/contrib/sessions/browser/views/sessionsList.ts
Comment thread src/vs/sessions/contrib/sessions/browser/views/sessionsList.ts
dmitrivMS
dmitrivMS previously approved these changes Jun 4, 2026
connor4312
connor4312 previously approved these changes Jun 4, 2026
Yoyokrazy
Yoyokrazy previously approved these changes Jun 4, 2026
dmitrivMS
dmitrivMS previously approved these changes Jun 4, 2026
@benibenj benibenj dismissed stale reviews from dmitrivMS and Yoyokrazy via 7772168 June 4, 2026 21:15
sandy081
sandy081 previously approved these changes Jun 4, 2026
@benibenj benibenj merged commit 30e5bee into main Jun 4, 2026
25 checks passed
@benibenj benibenj deleted the benibenj/fortunate-ocelot branch June 4, 2026 22:12
@vs-code-engineering vs-code-engineering Bot added this to the 1.124.0 milestone Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants