Fix issue closed state colors to match GitHub.com behavior with state reason support#7629
Merged
Fix issue closed state colors to match GitHub.com behavior with state reason support#7629
Conversation
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Red "closed" on closed issues is confusing
Fix issue closed state colors to match GitHub.com behavior
Aug 19, 2025
alexr00
requested changes
Aug 20, 2025
Member
alexr00
left a comment
There was a problem hiding this comment.
@copilot Now, we are using the proper existing purple merged color for closed issues. The next step is to:
- Determine if an issue was closed as not planned or completed
- Use the exising grey "draft pr" color for issues closed as not planned issues.
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
…atus Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Contributor
Author
I've implemented the stateReason functionality to distinguish between issues closed as "not planned" vs "completed": Changes made in commit 1a22a03:
Color behavior:
The implementation leverages GitHub's |
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot
AI
changed the title
Fix issue closed state colors to match GitHub.com behavior
Fix issue closed state colors to match GitHub.com behavior with state reason support
Aug 20, 2025
alexr00
approved these changes
Aug 20, 2025
Tyriar
approved these changes
Aug 20, 2025
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.
This PR fixes the inconsistent coloring of closed issues in the PR webview to align with GitHub.com's visual design, including support for distinguishing between issues closed as "completed" vs "not planned".
Problem
Previously, both closed issues and closed pull requests displayed with red color in the extension's webview, which was inconsistent with GitHub.com where:
Solution
Updated the color logic to differentiate between closed issues and closed PRs using GitHub's
stateReasonfield:stateReasonfield to GraphQL queries to fetch issue closure reason (COMPLETEDvsNOT_PLANNED)interface.tsandviews.tsto include the optionalstateReasonfieldgetStatus()function inwebviews/components/header.tsxto acceptstateReasonparameter and use appropriate colors:IssueModelto track and handlestateReasonchangessrc/github/markdownUtils.tsto use grey (#6a737d) for "not planned" issues and purple (#8957e5) for "completed" issuesVisual Impact
This change makes the extension's visual language consistent with users' expectations from GitHub.com, improving the overall user experience and reducing confusion between different item states.
Fixes #7628.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.