Skip to content

Sessions - clean-up some of the actions rendering code#306466

Open
lszomoru wants to merge 2 commits intomainfrom
lszomoru/outstanding-hyena
Open

Sessions - clean-up some of the actions rendering code#306466
lszomoru wants to merge 2 commits intomainfrom
lszomoru/outstanding-hyena

Conversation

@lszomoru
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings March 30, 2026 20:31
@lszomoru lszomoru enabled auto-merge (squash) March 30, 2026 20:31
@lszomoru lszomoru self-assigned this Mar 30, 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

Refactors the Sessions “Changes” view toolbar button rendering logic (MenuWorkbenchButtonBar buttonConfigProvider) to simplify per-action configuration for Copilot CLI / PR-related actions.

Changes:

  • Reorganizes and consolidates buttonConfigProvider conditionals for several session toolbar actions.
  • Adds special handling for the “update PR” action label to include outgoing change count.
  • Removes several previously hard-coded action-id cases from the rendering config.

Comment on lines +941 to 946
if (
action.id === 'chatEditing.viewChanges' ||
action.id === 'github.copilot.chat.openPullRequestCopilotCLIAgentSession.openPR'
) {
return { showIcon: true, showLabel: false, isSecondary: true };
}
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

MenuWorkbenchButtonBar only renders an icon when showIcon: true is returned by the buttonConfigProvider. By removing chatEditing.viewAllSessionChanges from the icon-only branch, the “View All Changes” action (contributed to MenuId.ChatEditingSessionChangesToolbar) will now render as label-only (and without its icon), which is a behavior change from the previous code and inconsistent with the similar config in chatInputPart.ts. Consider adding chatEditing.viewAllSessionChanges back to the icon-only set (or otherwise ensuring it returns showIcon: true/showLabel: false here).

Copilot uses AI. Check for mistakes.
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.

3 participants