sessions: consistent secondary-button pills for session header meta actions#322704
Merged
Conversation
…button pills Render contributed session-header meta-row actions (Changes diff-stats and the GitHub pull request) as consistent compact secondary Button pills with an inline "icon title" label via a new shared SessionHeaderMetaActionViewItem, so any feature contributing into Menus.SessionHeaderMeta renders uniformly. Changes and PR view items extend this base. - PR pill shows the themed PR state icon + #<number>; icon color is set inline with !important priority (wins over button.css's forced codicon color), and the combined-glyph advance is clamped so the label sits tight against the icon. - Title now shows the read/unread dot indicator again (no session type or PR icon); the PR is surfaced in the meta row instead. - Removed the workspace separator dot; reversed order so Changes precedes PR. - Tightened the meta-button focus ring: removed the meta row's overflow clip (the workspace label self-truncates) and set outline-offset to 0 so the ring hugs the border without clipping. - The Changes pill always reflects the Branch Changes changeset (branch-vs-base diff), located by the shared BRANCH_CHANGES_CHANGESET_ID, independent of the changeset selected in the Changes view. 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:
@lszomoruMatched files:
|
Contributor
Screenshot ChangesBase: Changed (20) |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines the Agents window session header “meta row” to render contributed actions consistently as compact secondary-button pills, and updates the “Changes” pill to always reflect the branch-vs-base changeset rather than the currently selected changeset in the Changes view.
Changes:
- Introduces a shared
SessionHeaderMetaActionViewItembase renderer soMenus.SessionHeaderMetaactions render uniformly as compact secondaryButtonpills (with GitHub PR and Changes view items extending it). - Adds a shared
BRANCH_CHANGES_CHANGESET_IDconstant and updates the header + Changes contribution to locate and display the branch-diff changeset consistently (fallback toIActiveSession.changes). - Updates header/meta-row layout and styling (ordering, focus ring behavior, separator removal) and adjusts fixtures/docs accordingly.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/test/browser/componentFixtures/sessions/sessionHeader.fixture.ts | Updates session header fixture mocks to include changesets, icon, and revised meta menu ordering. |
| src/vs/sessions/services/sessions/common/session.ts | Adds exported BRANCH_CHANGES_CHANGESET_ID well-known changeset id constant. |
| src/vs/sessions/services/sessions/browser/sessionsListModelService.ts | Renames getStatusIcon’s optional parameter to a more generic “completed state” icon. |
| src/vs/sessions/LAYOUT.md | Updates Agents window documentation for the new meta-row rendering and related UI pitfalls. |
| src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsChangesets.ts | Switches the branch changes changeset id to the shared constant. |
| src/vs/sessions/contrib/github/browser/pullRequestActions.ts | Refactors PR pill to extend the shared meta action view item and render icon + #<number>. |
| src/vs/sessions/contrib/changes/browser/changesActions.ts | Refactors Changes pill to extend the shared meta action view item and read stats from the branch changeset by id. |
| src/vs/sessions/browser/sessionStatusIcon.ts | Renames parameter plumbing to match completedStateIcon naming. |
| src/vs/sessions/browser/parts/sessionView.ts | Gates “has changes” context key from the branch changeset so header visibility matches pill counts. |
| src/vs/sessions/browser/parts/sessionHeaderMetaActionViewItem.ts | Adds the new shared meta action renderer based on Button. |
| src/vs/sessions/browser/parts/sessionHeader.ts | Uses the shared renderer as the default for meta toolbar items; removes PR icon from the title/status flow and adjusts meta row visibility logic. |
| src/vs/sessions/browser/parts/media/chatCompositeBar.css | Updates meta-row layout/styling to match the new pill-based design and focus ring behavior. |
Copilot's findings
- Files reviewed: 12/12 changed files
- Comments generated: 2
- SessionHeaderMetaActionViewItem: fall back to the action label for the tooltip (MenuItemAction.tooltip defaults to ''), and remove the aria-label attribute when there is no tooltip instead of writing an empty string, so the default meta pill is always labelled for screen readers and keeps a managed hover. - sessionHeader.ts: update the stale comment that described meta actions as "clickable menu item" to reflect the secondary-button pill rendering. - viewAllChanges.fixture.ts: provide a Branch Changes changeset on the mock session so the diff-stats pill resolves its counts (the view item now reads the branch changeset). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
benibenj
approved these changes
Jun 24, 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
Reworks the Agents window session header meta row (the row under the title showing the workspace label plus contributed action buttons) so that contributed actions render consistently, and refines the visual design.
SessionHeaderMetaActionViewItem, a generic renderer that draws any action contributed intoMenus.SessionHeaderMetaas a compact secondaryButtonpill with an inlineicon titlelabel. The Changes diff-stats and GitHub pull request view items now extend this base, so everything in the meta row looks uniform. Features can still register their own action view item if needed.#<number>. The icon color is applied inline with!importantpriority so it beatsbutton.css's forced.monaco-text-button .codicon { color: inherit !important }and reflects the live PR state. The combined-glyph horizontal advance is clamped so the label sits tight against the icon.overflow: hiddenclip — the workspace label self-truncates — and setoutline-offset: 0so the ring hugs the border instead of clipping top/bottom).IActiveSession.changesetsby a new sharedBRANCH_CHANGES_CHANGESET_ID, so it is independent of whichever changeset the Changes view currently has selected. Falls back toIActiveSession.changeswhen no branch changeset is present.Why
Previously the meta-row actions rendered inconsistently (plain labels vs. ad-hoc styling) and the diff-stats value tracked the session's raw changes rather than the branch diff. This makes contributed meta actions render as consistent pills and pins the Changes value to the branch diff.
Notes for reviewers
src/vs/sessions/. The one shared addition outside it is the component fixture update (sessionHeader.fixture.ts) which now provides achangesetsobservable for the mock session.BRANCH_CHANGES_CHANGESET_IDis added toservices/sessions/common/session.tsand reused by both the Copilot chat sessions provider and the changes contribution to avoid string coupling.typecheck-client,valid-layers-check, ESLint, and hygiene all pass. Component screenshots regenerated (no errors).Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com