Skip to content

chat: use pullRequestState for agent session PR icons#304879

Merged
osortega merged 1 commit intomainfrom
copilot/thin-wombat
Mar 25, 2026
Merged

chat: use pullRequestState for agent session PR icons#304879
osortega merged 1 commit intomainfrom
copilot/thin-wombat

Conversation

@osortega
Copy link
Contributor

Summary

This updates the shared agent sessions renderer to use metadata.pullRequestState instead of pullRequestMerged when rendering PR status icons.

It also maps each PR state to the requested codicon and applies the themed icon color directly to the DOM element so merged and closed PRs render with the correct colors in the dedicated sessions view.

Changes

  • switch PR icon selection from pullRequestMerged to pullRequestState
  • use state-specific codicons for draft, closed, merged, and open
  • apply themed icon colors inline so non-default PR colors render correctly

Validation

  • npm run compile-check-ts-native
  • node --experimental-strip-types build/hygiene.ts src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.ts

Notes for Reviewers

The PR state icon path is only used when useStatusOnlyIcons is enabled, which currently affects the dedicated sessions view. The regular sessions list continues to use the same shared renderer but does not enter the PR-specific icon branch.

Copilot AI review requested due to automatic review settings March 25, 2026 19:40
@vs-code-engineering vs-code-engineering bot added this to the 1.114.0 milestone Mar 25, 2026
Copy link
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

Updates the agent sessions list renderer to derive pull request status icons from metadata.pullRequestState (instead of pullRequestMerged), so the dedicated sessions view can show the correct PR state icon and color.

Changes:

  • Switch PR status icon selection to use metadata.pullRequestState.
  • Map PR states (draft, open/default, closed, merged) to distinct codicons.
  • Apply theme-based icon colors inline to ensure non-default PR colors render correctly.

@osortega osortega merged commit 0e0b01f into main Mar 25, 2026
66 of 77 checks passed
@osortega osortega deleted the copilot/thin-wombat branch March 25, 2026 22:34
justschen pushed a commit that referenced this pull request Mar 26, 2026
chat: use pullRequestState for agent session PR icons
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