Skip to content

Move details to hover - #315234

Merged
Christof Marti (chrmarti) merged 1 commit into
mainfrom
chrmarti/stingy-flamingo
May 8, 2026
Merged

Christof Marti (chrmarti) merged 1 commit into
mainfrom
chrmarti/stingy-flamingo

Conversation

@chrmarti

Copy link
Copy Markdown
Collaborator

Copilot AI review requested due to automatic review settings May 8, 2026 10:58
@chrmarti
Christof Marti (chrmarti) enabled auto-merge (rebase) May 8, 2026 10:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 refactors how terminal tool-confirmation risk/disclaimer details are presented by moving the additional details into a dedicated hover on a trailing info icon within the ToolRiskBadgeWidget, keeping the confirmation UI more compact (Issue #315215).

Changes:

  • Extend ToolRiskBadgeWidget with a trailing info icon that shows AI-generated note + optional detail markdown via hover.
  • Update terminal tool confirmation rendering to move disclaimer/unsandboxed-execution details into the risk badge hover when the badge is present, falling back to inline rendering when it’s not.
  • Update component fixtures to add stable screenshot coverage for the hover content via a rendered hover preview panel.
Show a summary per file
File Description
src/vs/workbench/test/browser/componentFixtures/chat/chatToolRiskBadge.fixture.ts Adds hover-preview fixtures and updates risk scenarios for screenshot testing.
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeWidget.ts Adds details hover support (info icon, markdown builder, hide event).
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/media/toolRiskBadge.css Styles the new trailing details/info icon within the badge.
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.ts Routes disclaimer/unsandboxed details into the risk badge hover when available.

Copilot's findings

  • Files reviewed: 5/5 changed files
  • Comments generated: 3

@github-actions

github-actions Bot commented May 8, 2026 •

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: dc64a460 Current: e232df81

Changed (20)

chat/chatToolRiskBadge/Green/Dark
Before After
before after
chat/chatToolRiskBadge/Green/Light
Before After
before after
chat/chatToolRiskBadge/Orange/Dark
Before After
before after
chat/chatToolRiskBadge/Orange/Light
Before After
before after
chat/chatToolRiskBadge/Red/Dark
Before After
before after
chat/chatToolRiskBadge/Red/Light
Before After
before after
chat/chatToolRiskBadge/GreenInContext/Dark
Before After
before after
chat/chatToolRiskBadge/GreenInContext/Light
Before After
before after
chat/chatToolRiskBadge/OrangeInContext/Dark
Before After
before after
chat/chatToolRiskBadge/OrangeInContext/Light
Before After
before after
chat/chatToolRiskBadge/RedInContext/Dark
Before After
before after
chat/chatToolRiskBadge/RedInContext/Light
Before After
before after
chat/chatToolRiskBadge/GreenElicitationInContext/Dark
Before After
before after
chat/chatToolRiskBadge/GreenElicitationInContext/Light
Before After
before after
chat/chatToolRiskBadge/OrangeElicitationInContext/Dark
Before After
before after
chat/chatToolRiskBadge/OrangeElicitationInContext/Light
Before After
before after
chat/chatToolRiskBadge/RedElicitationInContext/Dark
Before After
before after
chat/chatToolRiskBadge/RedElicitationInContext/Light
Before After
before after
chat/widget/chatWidget/PendingToolApproval/Dark
Before After
before after
chat/widget/chatWidget/PendingToolApproval/Light
Before After
before after

Added (8)

chat/chatToolRiskBadge/HoverPreviewNoDetails/Dark

current

chat/chatToolRiskBadge/HoverPreviewNoDetails/Light

current

chat/chatToolRiskBadge/HoverPreviewDisclaimer/Dark

current

chat/chatToolRiskBadge/HoverPreviewDisclaimer/Light

current

chat/chatToolRiskBadge/HoverPreviewUnsandboxed/Dark

current

chat/chatToolRiskBadge/HoverPreviewUnsandboxed/Light

current

chat/chatToolRiskBadge/HoverPreviewUnsandboxedWithDisclaimer/Dark

current

chat/chatToolRiskBadge/HoverPreviewUnsandboxedWithDisclaimer/Light

current

Removed (6)

chat/chatToolRiskBadge/RedWithDisclaimerInContext/Dark

baseline

chat/chatToolRiskBadge/RedWithDisclaimerInContext/Light

baseline

chat/chatToolRiskBadge/RedUnsandboxedInContext/Dark

baseline

chat/chatToolRiskBadge/RedUnsandboxedInContext/Light

baseline

chat/chatToolRiskBadge/RedUnsandboxedWithDisclaimerInContext/Dark

baseline

chat/chatToolRiskBadge/RedUnsandboxedWithDisclaimerInContext/Light

baseline

@chrmarti
Christof Marti (chrmarti) merged commit 5618f96 into main May 8, 2026
25 checks passed
@chrmarti
Christof Marti (chrmarti) deleted the chrmarti/stingy-flamingo branch May 8, 2026 12:41
@vs-code-engineering vs-code-engineering Bot added this to the 1.120.0 milestone May 8, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Jun 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants