Add PR status + review-decision badges to the header#11
Merged
Conversation
The header showed the PR number/title but never the PR's state. Add a GitHub-style status pill next to the number — Draft / Open / Merged / Closed — plus a secondary review-decision pill (Approved / Changes requested / Review required) shown only while the PR is open. - shared: PRMeta gains isDraft + reviewDecision. - ghFetcher: fetch isDraft,reviewDecision from gh; normalize reviewDecision. - PRStatusBadge: derives the 4-state status from state+isDraft; solid pill for state (green/gray/purple/red), soft-tinted pill for the review decision. Verified live across cli/cli PRs: Open+Approved (#13581), Draft (#13450), Merged (#13510, review pill correctly suppressed). typecheck + 70 tests + build green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
The header showed the PR number and title but never the PR's state. This adds it.
Implementation:
PRMetagainsisDraft+reviewDecision;ghFetcherfetches them fromgh pr view --json isDraft,reviewDecision(+ normalize); newPRStatusBadgecomponent derives the 4-state status fromstate+isDraft.Verification
typecheck+ 70 tests +buildgreen#1f883d+ tinted Approved), Draft (#13450, gray + Review required), Merged (#13510, purple#8250df, review pill correctly suppressed). No console errors.🤖 Generated with Claude Code