chat: use pullRequestState for agent session PR icons#304879
Merged
Conversation
… pull request state handling
Contributor
There was a problem hiding this comment.
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.
eleanorjboyd
approved these changes
Mar 25, 2026
justschen
pushed a commit
that referenced
this pull request
Mar 26, 2026
chat: use pullRequestState for agent session PR icons
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.
Summary
This updates the shared agent sessions renderer to use
metadata.pullRequestStateinstead ofpullRequestMergedwhen 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
pullRequestMergedtopullRequestStatedraft,closed,merged, andopenValidation
npm run compile-check-ts-nativenode --experimental-strip-types build/hygiene.ts src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.tsNotes for Reviewers
The PR state icon path is only used when
useStatusOnlyIconsis 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.