Skip to content

feat: show requested reviewers in PR sidebar#724

Merged
dlvhdr merged 5 commits intodlvhdr:mainfrom
sideshowbarker:requested-reviewers
Jan 2, 2026
Merged

feat: show requested reviewers in PR sidebar#724
dlvhdr merged 5 commits intodlvhdr:mainfrom
sideshowbarker:requested-reviewers

Conversation

@sideshowbarker
Copy link
Contributor

@sideshowbarker sideshowbarker commented Dec 31, 2025

Summary

This change causes a new “reviewers:” line to be displayed in the PR preview pane, just below the author information.

The “reviewers:” display includes:

  • Review-status icon:
    • “waiting” icon for pending reviews
    • “comment” icon, for reviewers who have commented
    • “success” icon for approved reviews
    • “failure” icon for “changes requested”
  • Reviewer GH name, with @ prefix for users, no prefix for teams
  • Reviewer-type indicators:
    • “team icon for reviews requested from GH teams
    • “owner” icon for code owners

In the case of reviews requested from bots: For GH usernames containing bot, we skip the code-owner icon annotation — since the GH name already makes clear that the reviewer is a bot.

The implementation fetches reviewer data via GraphQL using a union type to handle the different reviewer types (User, Team, Bot, Mannequin) — with helper methods to extract display names and determine reviewer types.

Closes #685

How did you test this change?

Added unit tests in internal/tui/components/prview/reviewers_test.go:

  • Empty review requests
  • Single user awaiting review
  • User who commented
  • Code-owner display
  • Team reviewer display
  • Bot reviewer (no extra annotation)
  • Multiple reviewers
  • Reviewer who approved
  • Reviewer who requested changes
  • Mix of pending reviews and completed reviews

Images/Videos

“waiting for review” + “changes requested” + “made comments” reviewers

image

“waiting for review” + “approved” reviewers

image

“team” + “bot”  reviewers

image

“code owner”  reviewers

image

@sideshowbarker sideshowbarker force-pushed the requested-reviewers branch 3 times, most recently from 586dd13 to 114d592 Compare December 31, 2025 12:16
This change causes a new “reviewers:” line to be displayed in the PR
preview pane, just below the author information. Fixes dlvhdr#685.

The “reviewers:” display includes:

- Review-status icon:
  - “waiting” icon for pending reviews
  - “comment” icon, for reviewers who have commented
  - “success“ icon for approved reviews
  - “failure” icon for “changes requested”
- Reviewer GH name, with @ prefix for users, no prefix for teams
- Reviewer-type indicators:
  - “team icon for reviews requested from GH teams
  - “owner” icon for code owners

In the case of reviews requested from bots: For GH usernames containing
"bot", we skip the code-owner icon annotation — since the GH name
already makes clear that the reviewer is a bot.

The implementation fetches reviewer data via GraphQL using a union type
to handle the different reviewer types (User, Team, Bot, Mannequin) —
with helper methods to extract display names and determine reviewer types.

Closes dlvhdr#685

Added unit tests in internal/tui/components/prview/reviewers_test.go:

- Empty review requests
- Single user awaiting review
- User who commented
- Code-owner display
- Team reviewer display
- Bot reviewer (no extra annotation)
- Multiple reviewers
- Reviewer who approved
- Reviewer who requested changes
- Mix of pending reviews and completed reviews
…ents

- Move the Reviewers info from header to Overview tab, above Labels
- Use common styles (FaintTextStyle, WaitingGlyph, CommentGlyph)
- Remove bot string detection — rely solely on GraphQL type
- Remove team-icon suffix from team reviewers
- Rename hasTeamIcon to hasOwnerIcon for clarity
- Add ApprovedIcon and ChangesRequestedIcon to constants
- Add wrapping for long reviewer lists
- Update tests for new format and add wrapping test
@dlvhdr
Copy link
Owner

dlvhdr commented Jan 2, 2026

@sideshowbarker I made some small style changes which I think look better. Main one being changing the icons to be consistent with GitHub - so no clock :D

SCR-20260102-pquc SCR-20260102-pqmn

SCR-20260102-pqja

@dlvhdr dlvhdr merged commit 6419aa1 into dlvhdr:main Jan 2, 2026
3 of 4 checks passed
@sideshowbarker sideshowbarker deleted the requested-reviewers branch January 2, 2026 19:08
sideshowbarker added a commit to sideshowbarker/gh-dash that referenced this pull request Jan 2, 2026
…ers too

This change implements two follow-ups in response to dlvhdr#724 review comments:

dlvhdr#724 (comment)
dlvhdr#724 (comment)

Specifically:

- Increases # of reviewers limit from last 5 reviewers to 100 reviewers
- Shows “Loading…” state while enriched data is being fetched
- Shows “suggested” reviewers (= code owners), even if not yet requested
- Shows also those reviewers who only commented (not just approved/rejected)
dlvhdr pushed a commit that referenced this pull request Jan 3, 2026
…ers too (#728)

# Summary

This change implements two follow-ups in response to #724 review
comments:

#724 (comment)
#724 (comment)

Specifically:

- Increases # of reviewers limit from last 5 reviewers to 100 reviewers
- Shows “Loading…” state while enriched data is being fetched
- Shows “suggested” reviewers (= code owners), even if not yet requested
- Shows also those reviewers who only commented (not just
approved/rejected)

## How did you test this change?

Updated internal/tui/components/prview/reviewers_test.go with new tests.
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.

Feature request: Show all requested reviewers for a PR

2 participants