Skip to content

feat(web): make review verdicts legible in the pull request detail - #7077

Merged
juliusmarminge merged 7 commits into
pingdotgg:mainfrom
Bil0000:t3code/pr-detail-approvals-clarity
Aug 17, 2026
Merged

feat(web): make review verdicts legible in the pull request detail#7077
juliusmarminge merged 7 commits into
pingdotgg:mainfrom
Bil0000:t3code/pr-detail-approvals-clarity

Conversation

@Bil0000

@Bil0000 Bil0000 commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

An approval arrives in the pull request detail as a line inside a collapsed "9 comments" section, wearing a grey lowercase word and an empty markdown block where its body would be. Whether a change is approved is the question the page is opened with, and answering it takes a press and a squint.

This makes verdicts read the way the host's own page reads them.

Before

image image

After

CleanShot 2026-08-17 at 12  24 00@2x CleanShot 2026-08-17 at 12  23 51@2x

What changed

A verdict is a first-class timeline row

It sits beside commits and merges rather than folding into the conversation group, with the reviewer's avatar on the rail, a toned icon, and octocat approved these changes. A review carrying only remarks (COMMENTED) still groups as ordinary conversation, so nothing that was readable before became noisier.

The summary badges the verdict

Instead of printing Approved in grey next to the timestamp. The empty body block underneath it is gone — an approval usually carries no words, and the blank block read as a card somebody forgot to fill in. The block stays wherever this reader may rewrite the remark, since the edit pencil lives inside it.

Where the reviewers landed is above the conversation

A Reviews meta row beside Reviewers lists each reviewer with their verdict, and the timeline header counts approvals — both derived from comments already loaded, no new request.

No dead space under a verdict

The reaction bar's add button is invisible until hovered but still occupies h-6 + mt-2. Under a one-line verdict that reads as a hole rather than an affordance, so the bar is drawn only once a reaction exists.

A bodiless review no longer offers "Fix in a thread"

Handing an empty review to a fresh thread promised work it does not describe. The whole-review sweep already skipped these; the per-comment button did not.

How it is derived

  • pullRequestReviewOutcome normalises the three verdict states across hosts — GitHub reports CHANGES_REQUESTED, Bitbucket changes_requested — so case and separator are ignored, and anything else is not a verdict. It replaces the ad-hoc comment.reviewState?.toLowerCase() comparisons the summary tab was making inline.
  • latestPullRequestReviewOutcomes keeps one entry per reviewer and only their last word: a host keeps every review ever submitted, and an approval later followed by a request for changes is not an approval any more. It picks by timestamp rather than by read order, because not every host returns reviews sorted. A dismissal is a verdict taken back, so it clears the entry rather than showing itself.
  • One shared presentation map owns the icon, tone and wording. The green is the green a passing check already wears in the same panel, so "approved" and "all checks passed" cannot look like two different kinds of good news.

Known gap

GitLab and Azure DevOps report no verdict alongside their comments, so both new summaries stay hidden on those hosts rather than claiming nobody has approved. Surfacing GitLab approvals needs a new read in the server adapter and is left for its own change.

Verification

Rebased onto main (20a70420a) and re-resolved against the newer pull request surface — collapsed resolved/dismissed comments, reactions, in-place editing.

Command Result
vp run -r test Every package green, including 2581 web tests with six new cases covering verdict normalisation, last-word-per-reviewer, dismissal, and a verdict staying out of the collapsed conversation it was submitted in.
vp run -r typecheck All 15 packages clean.
vp lint No new warnings from these files.

Six files change, all under apps/web/src/components/pullRequest/. No contract, server, provider or listing code is touched — this is presentation over data the detail view already carries.

Note

Show review verdicts as colored badges, avatar rings, and timeline rows in pull request detail

  • Adds verdict normalization logic in pullRequestDetail.logic.ts: pullRequestReviewOutcome maps host-specific review states to a canonical set (approved, changes-requested, dismissed), latestPullRequestReviewOutcomes deduplicates per-reviewer, marks stale verdicts, and filters dismissed ones.
  • The Summary tab now shows reviewer avatars with colored rings indicating their latest verdict, renders verdict badges on comments, and suppresses empty bodies for non-editable verdicts.
  • The Timeline tab renders verdicts as first-class ReviewVerdictEvent rows with icons, colored labels, staleness indicators, and reaction bars, instead of hiding them inside collapsed conversations.
  • The detail panel header shows a green approval tick with the count of current non-stale approvals when comments are not truncated.
  • Presentation helpers (icons, tone classes, ring classes, badges) are centralized in pullRequestPresentation.tsx.
  • Behavioral Change: groupPullRequestTimelineConversations no longer collapses verdict events into comment groups; they appear as separate timeline rows.

Macroscope summarized 6068440.

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c8cd000c-a2bc-4e9e-bb09-dd93deb7efb8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 15, 2026
Comment thread apps/web/src/components/pullRequest/pullRequestDetail.logic.ts Outdated
Comment thread apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx Outdated

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One finding on the new review-verdict UI. Details inline.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx Outdated
@macroscopeapp

macroscopeapp Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

New UI feature introducing user-facing behavior (review verdict display across multiple views with staleness tracking). While purely frontend and well-tested, the substantial new capability warrants human review.

You can customize Macroscope's approvability policy. Learn more.

@Bil0000
Bil0000 force-pushed the t3code/pr-detail-approvals-clarity branch 2 times, most recently from accfaf0 to 70cbf6e Compare August 15, 2026 13:26
Comment thread apps/web/src/components/pullRequest/PullRequestTimelineTab.tsx Outdated
Comment thread apps/web/src/components/pullRequest/PullRequestTimelineTab.tsx Outdated

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two consistency issues in the new review-verdict surfaces. Details inline.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/pullRequest/PullRequestTimelineTab.tsx
Comment thread apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx
@Bil0000
Bil0000 force-pushed the t3code/pr-detail-approvals-clarity branch 2 times, most recently from a5277aa to 395c738 Compare August 15, 2026 13:44

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the review-verdict surfaces for consistency with the existing comment cards. Two related findings: both new verdict surfaces drop the reaction affordance that every other comment card keeps.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/pullRequest/PullRequestTimelineTab.tsx Outdated
Comment thread apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx Outdated
@Bil0000
Bil0000 force-pushed the t3code/pr-detail-approvals-clarity branch from 395c738 to ac4be9a Compare August 15, 2026 13:53
Comment thread apps/web/src/components/pullRequest/PullRequestTimelineTab.tsx Outdated

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three consistency issues in the new verdict surfaces — two of them are hover-affordance scoping (group) on the timeline rows.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx Outdated
Comment thread apps/web/src/components/pullRequest/PullRequestTimelineTab.tsx Outdated
Comment thread apps/web/src/components/pullRequest/PullRequestTimelineTab.tsx Outdated
@Bil0000
Bil0000 force-pushed the t3code/pr-detail-approvals-clarity branch 2 times, most recently from 139a491 to 02c764b Compare August 15, 2026 14:16
Comment thread apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx Outdated

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two findings on the new verdict presentation, both in apps/web/src/components/pullRequest. The main one is that the reviewer-avatar verdict ring cannot render: it is painted into the exact band the avatar's own opaque ring-background separator fills, and colour is the only visible signal on that row.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx
Comment thread apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx
@Bil0000
Bil0000 force-pushed the t3code/pr-detail-approvals-clarity branch from 02c764b to fa27a76 Compare August 15, 2026 15:41

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One finding on the reviewer avatar row: the new p-0.5 wrapper makes the verdict ring visible but cancels the stack's overlap. Details inline.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx Outdated
@Bil0000
Bil0000 force-pushed the t3code/pr-detail-approvals-clarity branch from fa27a76 to 220673d Compare August 15, 2026 15:51

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One finding on the reviewer avatar row: the verdict ring now paints an opaque 6px halo around a 16px avatar that overlaps its neighbours by 4px, so an approving reviewer largely eclipses the avatar to their left. Details inline.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx Outdated
@Bil0000
Bil0000 force-pushed the t3code/pr-detail-approvals-clarity branch from 220673d to 7b610fa Compare August 15, 2026 15:59
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 15, 2026
@Bil0000
Bil0000 force-pushed the t3code/pr-detail-approvals-clarity branch from 7b610fa to ffa10c5 Compare August 15, 2026 18:28
@macroscopeapp
macroscopeapp Bot dismissed their stale review August 15, 2026 18:28

Dismissing prior approval to re-evaluate ffa10c5

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 15, 2026
@Bil0000
Bil0000 force-pushed the t3code/pr-detail-approvals-clarity branch from ffa10c5 to cf1dbda Compare August 15, 2026 18:41
@macroscopeapp
macroscopeapp Bot dismissed their stale review August 15, 2026 18:41

Dismissing prior approval to re-evaluate cf1dbda

@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Aug 15, 2026
Comment thread apps/web/src/components/pullRequest/PullRequestTimelineTab.tsx

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two colour-handling issues in the new verdict presentation; both are theme/stack regressions rather than style preferences.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/pullRequest/PullRequestTimelineTab.tsx Outdated
Comment thread apps/web/src/components/pullRequest/pullRequestPresentation.tsx Outdated
@Bil0000
Bil0000 force-pushed the t3code/pr-detail-approvals-clarity branch from cf1dbda to 6b27837 Compare August 15, 2026 18:53
Comment thread apps/web/src/components/pullRequest/pullRequestDetail.logic.ts Outdated
An approval used to arrive as a line inside a collapsed "9 comments"
section, wearing a grey lowercase word and an empty markdown block where
its body would be. Whether a change is approved is the question the page
is opened with, and answering it took a press and a squint.

Verdicts now read the way a host's own page reads them:

- `pullRequestReviewOutcome` normalises the three verdict states across
  hosts (GitHub `CHANGES_REQUESTED`, Bitbucket `changes_requested`), and
  `latestPullRequestReviewOutcomes` keeps one entry per reviewer — their
  last word, with a dismissal clearing it rather than replacing it. It
  replaces the ad-hoc lowercased comparisons the summary made inline.
- The timeline gives a verdict its own row beside commits and merges,
  with the reviewer's avatar on the rail, a toned icon, and "approved
  these changes". A review carrying only remarks still groups as before,
  and the row keeps the reaction bar it had inside the group.
- The summary badges the verdict instead of printing "Approved" in grey,
  and stops rendering an empty body block under it — except where this
  reader may rewrite the remark, since the edit pencil lives in there.
- The reviewers' verdicts get a "Reviews" row above the conversation, and
  the timeline header counts approvals.
- A bodiless review no longer offers "Fix in a thread": an approval names
  nothing to fix.

The verdict is named in words everywhere it is drawn. The icon is
decorative, and a name written onto a generic span is not announced, so
the "Reviews" row carries the label as text rather than as an aria-label
the reader would never hear.

Green is the green a passing check already wears in the same panel, taken
from one shared presentation map.

Known gap: GitLab and Azure DevOps report no verdict with their
comments, so both new summaries stay hidden there rather than claiming
nobody has approved.
@Bil0000
Bil0000 force-pushed the t3code/pr-detail-approvals-clarity branch from 6b27837 to 1bcde52 Compare August 15, 2026 19:03
Comment thread apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx Outdated
The header's approval count included verdicts the branch had already
moved past, so a change request could report an approval in a number
while the reviewer who gave it sat dimmed in the row underneath. The
count now takes only approvals that still stand, and the two surfaces
agree.
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 16, 2026
@macroscopeapp
macroscopeapp Bot dismissed their stale review August 17, 2026 13:10

Dismissing prior approval to re-evaluate 67fb978

@juliusmarminge
juliusmarminge merged commit c7e6d71 into pingdotgg:main Aug 17, 2026
17 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Aug 17, 2026
NeilTheFisher pushed a commit to NeilTheFisher/t3code that referenced this pull request Aug 18, 2026
bcotrim pushed a commit to bcotrim/mognet that referenced this pull request Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants