Skip to content

feat: your review requests and assignments sync (#366) - #408

Merged
bRRRITSCOLD merged 2 commits into
mainfrom
feat/366-review-requests
Nov 24, 2026
Merged

bRRRITSCOLD merged 2 commits into
mainfrom
feat/366-review-requests

Conversation

@bRRRITSCOLD

Copy link
Copy Markdown
Owner

Closes #366

PR sync now keeps every Pull request that is yours: the ones you authored, the ones where your review is requested and the ones assigned to you, so everything waiting on you is in one place. Only the ones you authored alert.

What changes

  • Whose PRs. The full sync keeps the list of open PRs you authored and adds two open searches, is:pr is:open user-review-requested:@me sort:updated-desc and is:pr is:open assignee:@me sort:updated-desc, each stored page by page and stopping at the age cutoff, as the list does. The incremental sync runs one updated:>=T search per way a PR is yours (author, review requested, assigned). The age cutoff applies to all of them, in both kinds of sync.
  • Why it's yours. Each Pull request stores any of authored, review_requested and assigned (migration 0003; every PR kept before is marked authored). Every read of a PR (the list's light fields, each search, each fetch by number) reads its author, review requests and assignees, and every query for PRs asks for viewer { login } beside them, so they're matched against the token's login with no extra request. The rule is agentdeck_core::why_yours.
  • No longer yours → Finished. An open Pull request that is yours no way at all (your review submitted, you unassigned) becomes Finished, and is pruned after the 7-day window like any other. When GitHub shows it open, yours and within the cutoff again, it stops being Finished. A full sync sees this through its fetch of the PRs no list or search showed. The incremental sync now also re-fetches the open PRs that are yours only as a reviewer or an assignee, beside the unsettled ones, because submitting a review or being unassigned takes a PR out of every search.
  • Where they show. Review-requested and assigned PRs show in both Pull requests views and in pr ls through the existing rows. GET /v1/prs and pr ls --json carry yours on each PullRequest. They never alert: the alert rule from Pull request alerts follow the new model #363 (author is the signed-in login) is unchanged, and a GUI test now pins it for reviewer and assignee PRs.
  • API. API_VERSION 28: PullRequest.yours. openapi.json and the client are regenerated, and Yours is a core type shared with the client. An older daemon sends no yours, which the client reads as empty.
  • Spec. docs/spec.md §3 (columns, migration, Pull request, Finished), §4 (yours, API_VERSION 28), §8 (Whose PRs, full and incremental searches, the re-fetch, Finished, progress, cost), §10 (pr ls) and §12 (tests) are rewritten to match.

What a sync costs now

  • Incremental (every 120 s): 3 searches plus one request per 25 PRs that are unsettled or yours only as a reviewer or assignee. That's 4 requests with a few such PRs, up from 2.
  • Full (hourly): one request per 100 authored PRs, plus one per 50 review-requested and one per 50 assigned open PRs, plus one per 25 PRs fetched by number. That's 2 more requests than before.
  • Points: the nested reviewRequests(first: 50) and assignees(first: 10) make a list or search page 2 GraphQL points and a fetch 1. That's about 210 points an hour, out of 5,000.
  • Unchanged: the paging, the fetch-by-number batching (25 per request, 4 at a time) and the unsettled re-fetches.

Deviation from the ticket

  • user-review-requested:@me, not review-requested:@me. The latter also finds requests to a team you're on. A team's request names no login in reviewRequests, so when the sync reads such a PR back (a fetch by number, the incremental re-fetch) it would count it as not yours and mark it Finished, then bring it back at the next search, over and over. The user-only qualifier finds exactly what why-yours can read. Team requests are tracked in Review requests to your teams sync as yours #407.

Tests

  • Daemon integration (httpmock): each kind of PR (authored, review requested, assigned, all three at once) in full and incremental syncs, each with why it's yours in GET /v1/prs. Also: the age cutoff on review requests and assignments in both kinds of sync; a submitted review → Finished at the next incremental sync; an unassignment → Finished at a full sync; an authored PR whose review request goes stays unfinished; deletion after the shortened window, with its Repository; a PR yours again stops being Finished; and a migration test for 0003. I checked that 8 of the new tests fail with the searches, the re-fetch and the Finished rule reverted.
  • GUI: review-requested, assigned and both never alert, through the shell over the fake notifier.
  • CLI: pr ls and pr ls --json with yours.
  • Core and daemon unit tests: why_yours, the parsers reading review requests, assignees and team requests, the search queries, the incremental re-fetch rule and the progress tally.

🤖 Generated with Claude Code

bRRRITSCOLD and others added 2 commits November 23, 2026 17:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR sync keeps the Pull requests where your review is requested and those
assigned to you beside the ones you authored. Each stores why it is yours,
read from its author, review requests and assignees; an open one that is
yours no way at all is Finished. They show in both Pull requests views and
pr ls, and never alert. API_VERSION 28 adds PullRequest.yours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bRRRITSCOLD
bRRRITSCOLD merged commit a60220a into main Nov 24, 2026
6 checks passed
@bRRRITSCOLD
bRRRITSCOLD deleted the feat/366-review-requests branch November 24, 2026 01:08
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.

Your review requests and assignments sync

1 participant