Repository navigation
feat(api): Review item sort, status filter and bundle counts, and Automations owner filter - #3445
Merged
Merged
Conversation
…omations owner filter Review items take sort=waiting and status=done,dismissed, and each item subject carries the objectType of the plugin link type that claims its URL. The count adds decisions, codeChanges and snoozed from one grouped query; Automations come only with include=automations. Automations take owner=me. The visibility filter no longer puts false inside its or, so Postgres can semi-join a lone assignee exists. Co-Authored-By: BYK <[email protected]>
…sort-status-counts Co-Authored-By: BYK <[email protected]>
…sort-status-counts Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
31 screenshot changes — 31 changed · 0 added · 0 removed Review screenshots in Frameshift Show 12 more changed screenshots13 more changed screenshots in Frameshift. |
BYK
approved these changes
Nov 14, 2026
sentry-junior Bot
added a commit
that referenced
this pull request
Nov 14, 2026
Take main's Review item count, sort and status API from #3445, which ports this branch's server side. The dashboard now reads `codeChanges` and sends `include=automations`. Drop this branch's duplicate count helpers in store.ts. Co-Authored-By: BYK <[email protected]>
BYK
pushed a commit
that referenced
this pull request
Nov 14, 2026
Follow-up to review feedback on #3445: on the first page of `GET /api/review-items` with a search or `include=archived`, the archived matches do not depend on the open page. This runs both reads with `Promise.all` instead of one after the other, so the first page waits for the slower read instead of the sum. Responses do not change. <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A8541f171a3af567a3e793732efc8684f --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A8541f171a3af567a3e793732efc8684f) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A8541f171a3af567a3e793732efc8684f/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
BYK
pushed a commit
that referenced
this pull request
Nov 14, 2026
#3441 renamed a link type's `objectType` to an `objectTypes` list. `readLinkObjectType`, added in #3445, still reads `objectType`. The two merged close together, so `main` no longer builds, the Inbox count finds no pull requests, and review item subjects lose their `objectType`. `readLinkObjectType` now names a type only when the link type that claims the URL has exactly one. A `/pull/` URL is still a `code_change`. A GitHub issue URL can open an issue or a pull request (`["task", "code_change"]`), so it names no type from the URL alone. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A8541f171a3af567a3e793732efc8684f --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A8541f171a3af567a3e793732efc8684f) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A8541f171a3af567a3e793732efc8684f/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
23 tasks done
This branch was successfully deployed
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.
Server API for the new Inbox in the dashboard rewrite (#3035). The current dashboard sends none of the new params, so it sees no change.
What it adds
GET /api/review-items?sort=waiting: the items that wait on the viewer first, then the rest, each group newest first.GET /api/review-items?status=done,dismissed: closed items, newest closed first.subject.objectType, such ascode_change.GET /api/review-items/count:decisions,codeChangesandsnoozed(from?snoozed=<ids>).automationsis present only withinclude=automations.GET /api/automations?owner=me: only the viewer's own Automations, inside any scope.Code change detection
Core has no pull request URL rule.
readLinkObjectType(url)asks the registered object-link types which one claims a URL. The GitHub plugin'sgithubPullRequestLinksfilter (/*/*/pull/*) answerscode_change.Query cost
The badge and both bundle counts share one
GROUP BY subject_urlquery, so a count with no params stays 1 query at the same cost asmain(12.7 ms for a user with 3,192 assignments).include=automationsadds 1 query (5.6 ms), andsnoozedids add 1 (5.7 ms).reviewItemVisibleTokeepsfalseout of itsor, so Postgres turns a lone assigneeEXISTSinto a semi-join. A closed list takes 46 ms for that user and 3.7 ms for a typical one, against 98 ms and 91 ms with the old shape.sort=waitingcosts the same as the default order.owner=meadds nothing measurable. No schema change.Numbers are
EXPLAIN (ANALYZE, BUFFERS)medians on bench data with 100k Review items, 3,000 Automations and 300k runs.Compatibility
The dashboard parses responses with
.strict()schemas from this package. A tab that still runs a bundle from before this deploy rejects the new count fields until it reloads. #3439 has the same caveat.The new UI in #3035 must read
codeChanges, sendinclude=automations, and usesubject.objectType === "code_change".via @BYK.
--
View Session [Sentry]