Skip to content

feat(github): Remove the person who dismisses a PR item from its reviewers - #4312

Open
sentry-junior[bot] wants to merge 28 commits into
feat/github-issue-assignee-itemsfrom
feat/github-pr-dismiss-reviewer
Open

sentry-junior[bot] wants to merge 28 commits into
feat/github-issue-assignee-itemsfrom
feat/github-pr-dismiss-reviewer

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

The reviewer half of the design/github.md dismiss rule and of the design/inbox.md role rule from #4308, which this stacks on. A requested reviewer can already see the pull request on GitHub, so their review ask belongs in their Inbox even when they are not in the Conversation that opened it. Dismissing the ask should withdraw the request on GitHub, which stays the source of truth.

  • The github:pull_request subject kind sets assigneeRoles. A requested reviewer with a linked account gets the item even when they are not in the owner Conversation. Their card shows the item and the pull request, but not the Conversation unless they can see it. A review asked only of people with no linked account gets no item, so it is never up for grabs.
  • A dismiss removes only the person who dismissed it. The item closes when nobody is left.
  • The inboxItemDismissed hook finds the pull request from its code change (the subject id is the provider id), and reads its requested reviewers. If the dismisser's linked login is on the list, it calls DELETE /pulls/{n}/requested_reviewers first. If GitHub refuses, the dismiss fails with a 409 and the person stays.
  • A requester, such as on Ready to merge, holds no reviewer role, so their dismiss changes nothing on GitHub and works as for any item. The same goes for a dismisser with no linked GitHub account.
  • The hook context gets codeChanges for the lookup.
  • Merge conflict items are unchanged: a dismiss still closes them for everyone.
  • A requester who dismisses their own review ask leaves only the review: they still own the pull request, and its merge ask comes to them on a new item once it is approved.
  • Dismiss says what it also changes on GitHub. Plugin subject kinds get an optional per-viewer dismissNote, which the Inbox payload sends as subject.dismissNote. A reviewer's note reads "Also removes you from the reviewers on GitHub." It shows while the item asks for a review, or when the card lists the viewer as a requested reviewer. A requester on Ready to merge gets none. An issue assignee's note reads "Also unassigns you on GitHub." On a wide screen with a fine pointer, the note is Dismiss's tooltip. Elsewhere, such as on a phone, it shows on the card's action line. The inbox-item-fields baseline gets dismissNote, and design/inbox.md gets "A plugin item's Dismiss says what else it changes on the provider."

Dismiss note

Dismiss note
Light desktop (tooltip on hover)
Dark desktop (tooltip on hover)
Light mobile (on the action line)
Dark mobile (on the action line)
Light mobile (under a stack header)
Dark mobile (under a stack header)
Light desktop (stack header, tooltip only)

Hidden Conversation

A review request card for a viewer who can see its Conversation (before), and for one whose role on the pull request is their only way in (after). The after card has no Conversation button, its title opens the item's own Inbox row, and it leaves the Conversation's stack. The card comes from #4308. These after shots were taken before 89ec9eb, which brings back the repo name, so the subtitle now reads payments#91 there too.

Before After
Light desktop
Light mobile
Dark desktop
Dark mobile

via @BYK.

--

View Session [Sentry]

…ewers

A dismiss on a Junior pull request item now removes only the person who
dismissed it. When GitHub lists them as a requested reviewer, Junior
removes them there first, and a GitHub refusal fails the dismiss. A
requester, such as on Ready to merge, holds no reviewer role, so their
dismiss changes nothing on GitHub.

Co-Authored-By: BYK <[email protected]>
@sentry-junior
sentry-junior Bot requested a review from BYK November 25, 2026 13:38
@sentry-junior
sentry-junior Bot added this pull request to stack #4309 November 25, 2026 13:38
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 26, 2026 1:15pm UTC

Request Review

@blacksmith-sh

This comment has been minimized.

sentry-junior Bot and others added 2 commits November 25, 2026 14:13
…' into feat/github-pr-dismiss-reviewer

Co-Authored-By: BYK <[email protected]>
…on the PR item

A requested reviewer with a linked account now gets the pull request's
item even when they are not in the owner Conversation, as an issue
assignee does. Their card shows the item and the pull request, and no
Conversation unless they can see it. A review asked only of people with
no linked account gets no item, so it is never up for grabs.

The pull request kind keeps its flag under the new assigneeRoles name,
which the merge of the base branch took over from dismissLeaves.

Co-Authored-By: BYK <[email protected]>

@BYK BYK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Two things:

  1. We should show this as a tooltip on the "Dismiss" button to reduce the surprise factor
  2. Dismissing a PR review that a user themselves created should NOT dissociate their ownership, just their Review request/responsibility. So when the PR shows up under "Code/Mine" with "Waiting on others" and it sends regular merge conflict or "ready to merge" notifications to the owner/creator.

…review

A requester whose review Junior asked for can dismiss that ask. It
removes only their review request: once the pull request is approved,
the merge ask comes to them on a new item.
…' into feat/github-pr-dismiss-reviewer

Co-Authored-By: BYK <[email protected]>
@sentry-junior

sentry-junior Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

@BYK on your review:

  1. This already works, and da107ba adds a test for it. When a requester dismisses their own review ask, the dismiss removes them only from the requested reviewers on GitHub. Code/Mine reads ownership from the Conversation's requester, and a dismiss never changes it. The PR moves to "Waiting on others" because they are no longer on its item. Once it's approved and can merge, "Ready to merge" comes back to them on a new item. Merge conflicts have their own item, and this dismiss doesn't touch it.

  2. The Dismiss tooltip comes next, in its own commit on this PR. Each plugin subject kind gets an optional per-viewer dismissNote. It's empty when the dismiss changes nothing on GitHub.

A dismiss of a GitHub item can change GitHub: it removes a reviewer from
the requested reviewers, or unassigns an issue assignee. The Dismiss
button now says so in its tooltip, so the change is no surprise.

Plugin subject kinds get an optional per-viewer dismissNote, and the
Inbox payload sends it as subject dismissNote. A pull request's note
shows only when its card lists the viewer as a requested reviewer, so a
requester's dismiss says nothing more. Every assignee of an issue's item
is its GitHub assignee, so the issue's note always shows.

The inbox-item-fields baseline gets the one subject field, and
design/inbox.md gets the confirmed line.

Co-Authored-By: BYK <[email protected]>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

The card lists at most five requested reviewers, so a sixth reviewer
got no note, though their dismiss still removes them on GitHub. While
the item asks for a review, everyone on it holds a review request, so
the note now shows for that ask. Once it asks for the merge, the card's
list still decides, and the requester gets none.
Tooltips show only on a wide screen with a fine hover pointer, so a
phone never showed what Dismiss also changes on GitHub. Where tooltips
are off, the card's action line now shows the note next to Dismiss.

Co-Authored-By: BYK <[email protected]>
sentry-junior Bot and others added 2 commits November 25, 2026 22:40
The note showed to everyone on an item that asked for a review, but the
requester is on that item with no review request, so their dismiss
changes nothing on GitHub. The card's reviewer list now decides. Only a
full list, which can leave out a reviewer past its five, warns everyone
on an item that asks for a review.

Co-Authored-By: BYK <[email protected]>
A stack's Dismiss closes each open ask in it, which can remove the
viewer from a pull request's reviewers on GitHub, but it showed no
note. It now shows each distinct note of the asks that it closes.

Co-Authored-By: BYK <[email protected]>
…' into feat/github-pr-dismiss-reviewer

Co-Authored-By: BYK <[email protected]>
…' into feat/github-pr-dismiss-reviewer

Co-Authored-By: BYK <[email protected]>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Removing a reviewer from a pull request that GitHub no longer serves
failed the whole dismiss, so the person stayed on the item. A 404 or
410 now means nobody is left to remove, as it does for an issue's
assignees.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6f978b0. Configure here.

The stack header put its Dismiss note only in a tooltip, and phones have
no tooltips. A tap could withdraw a GitHub review request with no
warning. The note now shows under the stack header where tooltips are
off, as it does on a card's action line. Both use one `DismissNote`.
sentry-junior Bot and others added 2 commits November 26, 2026 11:37
The next-action read now needs the base ref and the branch rules, and a
private Conversation now needs its own visibility, as in the other
scenarios.

Co-Authored-By: BYK <[email protected]>
…ismiss-reviewer

Co-Authored-By: BYK <[email protected]>

# Conflicts:
#	packages/junior/tests/integration/github-pull-request-ask.test.ts
…ismiss-reviewer

Co-Authored-By: BYK <[email protected]>

# Conflicts:
#	packages/junior/tests/integration/github-pull-request-ask.test.ts

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 6460af50 Deployed Nov 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant