Skip to content

feat(dashboard): Show the live GitHub change on Inbox rows and cards - #4162

Merged
BYK merged 50 commits into
mainfrom
byk/cards-read-github-objects
Nov 24, 2026
Merged

BYK merged 50 commits into
mainfrom
byk/cards-read-github-objects

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

Builds on #4148, which added the GitHub object cache and its webhook refresh.

GitHub is the source of truth for pull request state. The dashboard read the size, draft state, mergeable state and reviewers of a pull request from copies in Junior's tables. Those copies went stale: a push from someone else updated only part of them, and the preview webhook copied the old size, mergeable state and reviewers back in. Every surface now reads the pull request through object-link resolve, behind the cache from #4148.

Server

  • Pull request cache entries have a 60 minute TTL, set in one constant.
  • A page sends its cache misses to GraphQL by repository and number, with one aliased field per pull request (p<i>: repository(owner, name) { pullRequest(number) { … } }). The batching copies Craft's (getsentry/craft@02941cd, src/utils/changelog.ts):
    • A query reads at most 25 pull requests.
    • Each query stops after 10 s. GitHub fails a GraphQL query after about 10 s itself, so a longer wait only waits on a hung request. Craft's 30 s fits a CLI, not a page.
    • A failed query splits in halves, which are its retry. A pull request that fails alone is skipped and its error is reported: its card reads on its own, and keeps its stale-if-error entry when that read fails too.
    • One page waits at most 20 s for all of its card queries, and a query never runs past what is left of it. After the 20 s, a failed chunk does not split, and its cards make no read of their own: each shows its stale entry, or no card yet when there is none.
    • The viewer access check still runs at read time.
  • check_run and check_suite events refresh the cached entry, like the pull_request and issues refresh in feat(github): Keep GitHub cards current from webhooks and through outages #4148. Commit statuses do not count. The GitHub plugin docs list the Check run subscription.
  • When a payload has a new head SHA or base branch, merge state and checks show as pending, not as the old values. On the same head and base, a mergeable: null payload, such as for a label, keeps a known merge state and known checks and schedules no patch. A merge state that is not known yet turns pending, with its checks. A patch query a few seconds later reads only those fields and writes them with the same updated_at guard. It names each pull request by the repository and number of its cache key, and uses the page read's aliased query, 25 per query, and split-in-half retry, so every entry gets its patch. Cached entries no longer keep the GraphQL node_id. Pushes inside the 5 s debounce make one query. For now, the patch rides the plugin heartbeat.
  • A read that gets an unknown merge state, from the page query or from REST, shows it as pending for 15 s, so the next read after that asks GitHub again. Card reads schedule no patch.
  • Each event starts a patch's attempts again, and its due time stays. A patch whose read is older than its entry, because a webhook came in between, reads again while its fields still wait. That counts as an attempt.
  • A failed patch query is logged, and its patches wait for the next heartbeat. The rest of the heartbeat, such as the daily reconcile, still runs.
  • A patch with no pull request in the answer, or out of attempts, is dropped. Its entry then stays fresh for 15 s only, so the next read loads it from GitHub.
  • When the last attempt still finds GitHub computing the merge state, it writes the checks and keeps the merge state pending for 15 s, so the next read after that asks GitHub.
  • A deleted issue webhook also writes a gone mark in plugin state, which takes no lock. The mark and the gone entry last 3 days, while GitHub can redeliver. A late edited or opened webhook then cannot bring the issue back, even when the delete could not wait for a card read.
  • refreshGitHubPullRequestPreview no longer copies the old size, mergeable state and reviewers.
  • Drops junior_code_changes.draft, additions, deletions and changed_files, and deletes scripts/github-state-baseline.json, which then has no entries, with its join-table check. provider-state:check reads only scripts/github-state-exceptions.json. title stays, because search reads it. Migration: core 0171, after ref(github): Read pull request lifecycle from core code changes #4147's 0170.

Dashboard

  • Inbox "My pull requests", the Code pages, the # menu and reference chips, snooze, the person card, the Conversation list chips and the home card tags read the live card from one batched request. Rows show a skeleton until it resolves, and a draft moves into its group then.
  • The Inbox row head shows the live size. InboxItemSubjectPreview reads the live card first, so after anyone's push it shows the live size, mergeable state and reviewers.
  • When a Conversation's token moves, its linked cards read again, so a merge still shows without a reload.
  • A live card replaces a saved one only when both are the same type of object. A viewer who cannot see the repository gets GitHub's generic web page card, so message cards, Inbox previews and linked work keep the saved pull request.
  • The person card shows the dot before a merged change's size only when its card has a size.
  • A # menu row of an open pull request can be inserted only once its card comes, so a draft goes in as a draft.

Screenshots (mock data)

Code · Mine, after the cards resolve. The page looks the same, but the size and draft state now come from GitHub:

Before After
Dark, desktop
Light, desktop
Dark, mobile
Light, mobile

Code · Mine while the cards load (new state):

Dark Light

Inbox pull request row after someone else pushed (GitHub now has +312 −40 in 9 files). The row head shows the live size, and the preview shows the description, not a second copy of the size:

Before After
Dark, desktop
Light, desktop
Dark, mobile
Light, mobile

# menu: the draft row says "Draft" once its card comes, and Enter then inserts the draft chip. Before the card comes, Enter does nothing:

via @BYK.

--

View Session [Sentry]

sentry-junior Bot and others added 9 commits November 23, 2026 22:27
Pull request cards read GitHub through the object cache with a 60 minute
TTL. A page of cache misses loads in one GraphQL nodes query, keyed by the
stored node id. Check run and check suite events refresh the cached entry.
A push or a null mergeable marks merge state and checks as pending, and a
debounced patch query fills only those fields.

Drop the draft and size columns of junior_code_changes, which mirrored
GitHub state.

Co-Authored-By: BYK <[email protected]>
List surfaces read pull request size, draft state and status from the
live card, with a skeleton until it resolves. A Conversation whose token
moves reads its linked cards again.

Co-Authored-By: BYK <[email protected]>
@sentry-junior
sentry-junior Bot requested a review from BYK November 24, 2026 00:36
@sentry-junior
sentry-junior Bot added this pull request to stack #4163 November 24, 2026 00:36
@vercel

vercel Bot commented Nov 24, 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 24, 2026 1:31pm UTC

Request Review

@github-actions github-actions Bot added the risk: high PR risk score: high label Nov 24, 2026
sentry-junior Bot and others added 3 commits November 24, 2026 00:42
…st card read

Rows from before Junior stored the id have none, and a migration cannot
call GitHub. The batch skips them, and the card read of one stores its id,
so later pages read it in the batch.

Co-Authored-By: BYK <[email protected]>
…into byk/cards-read-github-objects

Co-Authored-By: BYK <[email protected]>
sentry-junior Bot and others added 2 commits November 24, 2026 00:50
…ebhook

The refresh merged the old issue into the cache and renewed its TTL, so
the card kept showing a deleted or moved issue as open. Write the gone
value instead, as a read of the issue would find.

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.

…into byk/cards-read-github-objects

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

# Conflicts:
#	packages/junior-github/src/webhooks/object-cache.ts

@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.

@blacksmith-sh

This comment has been minimized.

… tests

The archive test checked for a moment with no row. Its Conversation has an
open ask, so once the feed drops it the ask brings its row back. The Code
test checked the URL with item= before the Inbox drops it. Both now check
what stays.
sentry-junior Bot and others added 2 commits November 24, 2026 08:15
GitHub sends mergeable as null while it computes it. On the same head
commit, the cached value now stays. A new head commit still resets it.

Co-Authored-By: BYK <[email protected]>
A write that times out on the load lock drops the entry. The load that
held the lock then stored its older value. Now the write leaves a mark,
and a load that sees the mark change drops what it stored.

Co-Authored-By: BYK <[email protected]>
sentry-junior Bot and others added 4 commits November 24, 2026 12:03
…into byk/cards-read-github-objects

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

# Conflicts:
#	packages/junior-dashboard/e2e/inbox/inbox-fixture.ts
#	packages/junior-dashboard/src/client/inbox/InboxPullRequests.tsx
#	packages/junior/src/api/code/overview.ts
#	packages/junior/src/api/schema/code.ts
…-if-error

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

# Conflicts:
#	packages/junior-github/src/webhooks/handler.ts
…into byk/cards-read-github-objects

#4147 landed core migration 0170 first, so this branch's
code change size drop is regenerated as 0171.

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.

Base automatically changed from byk/state-cache-stale-if-error to main November 24, 2026 12:45
A check event marked the checks of a cached pull request pending, but
scheduled a patch only when the entry had a GraphQL node id. Entries
without one kept pending checks until their TTL ended.

The patch now names its pull request by the repository and number of its
cache key, and reads with the same aliased query, 25 per query, and
split-in-half retry as the page's card read. Webhooks schedule from the
key alone, and the cached fields drop node_id. Patches saved with a
nodeId still parse.

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.

}
}
},
}),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Patch splits stall the heartbeat

Medium Severity

Heartbeat patch queries now reuse loadInHalves with no canSplit budget and no request timeout. A GitHub error on a chunk of 25 recursively retries down to one pull request each, still inside this heartbeat. Page card reads bound that work to 20s and abort at 10s; patches do neither, so an outage can run a binary tree of GraphQL calls (on the order of a hundred) before daily reconcile continues. Failed patches do wait, but only after that storm.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 414c536. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 53414b1a5 (#4204): a failed patch query no longer splits. Its patches wait whole for the next heartbeat, so an outage costs one query per chunk of 25.

#4148 landed as a squash commit with the same content
that this branch already merged, so each conflict in its files keeps this
branch's version.

Conflict fix: InboxRow takes #4191's new rowActions
options, and leaves out its `sizeShown` prop, which this branch removed.

Co-Authored-By: BYK <[email protected]>
The provider state check read a second file of GitHub state copies that a
cleanup would remove. Its last entries went with the size columns, so the
check now reads only scripts/github-state-exceptions.json.

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.

if (isOlderGitHubObject(current, { updated_at: node.updatedAt })) {
readAgain =
current.checks === "pending" || current.mergeable === "pending";
return undefined;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

SHA mismatch drops pending patches

Medium Severity

When the cached head SHA does not match the GraphQL read, writeHeadFacts skips the write and returns false, so the patch is treated as finished and expirePending does not run. Pending merge state and checks then stay on the 60-minute TTL. A newer updated_at in that situation correctly retries; a SHA mismatch does not.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2f38eff. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 40641d7d4 (#4204): a patch that reads another head SHA is now dropped like one with no node, so its pending fields stay fresh for 15 s and the next read asks GitHub.

{search.changes.map((change) => {
const reference: ComposerReference = {
draft: change.draft,
draft: listedDraft(listedOf(change.url)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Snooze stores draft before the card

Medium Severity

The snooze pull request picker writes draft from listedDraft as soon as the row is selected. listedDraft is false until the live card arrives, and unlike the # menu this picker does not wait for listed.settled. A fast choice stores an open draft as a non-draft watch.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2f38eff. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in c55ab52f2 (#4204): open pull request rows in the snooze picker now wait for their card (listed.settled) before they can be picked, as the # menu does.

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

57 screenshot changes — 57 changed · 0 added · 0 removed

Review screenshots in Frameshift

Conversation Google Calendar Link · Desktop
Conversation Google Calendar Link · Desktop
Changed
Conversation Google Calendar Link Light · Desktop
Conversation Google Calendar Link Light · Desktop
Changed
Conversation Google Document Link · Desktop
Conversation Google Document Link · Desktop
Changed
Conversation Google Document Link Light · Desktop
Conversation Google Document Link Light · Desktop
Changed
Conversation Google Drive File Link · Desktop
Conversation Google Drive File Link · Desktop
Changed
Conversation Google Drive File Link Light · Desktop
Conversation Google Drive File Link Light · Desktop
Changed
Show 12 more changed screenshots
Conversation Google Drive Folder Link · Desktop
Conversation Google Drive Folder Link · Desktop
Changed
Conversation Google Drive Folder Link Light · Desktop
Conversation Google Drive Folder Link Light · Desktop
Changed
Conversation Long Transcript Memory · Desktop
Conversation Long Transcript Memory · Desktop
Changed
Conversation Object Attach · Desktop
Conversation Object Attach · Desktop
Changed
Conversation Object Attach Light · Desktop
Conversation Object Attach Light · Desktop
Changed
Conversation Object Attached · Desktop
Conversation Object Attached · Desktop
Changed
Conversation Object Attached Light · Desktop
Conversation Object Attached Light · Desktop
Changed
Conversation Resolved Object Links · Desktop
Conversation Resolved Object Links · Desktop
Changed
Conversation Resolved Object Links Light · Desktop
Conversation Resolved Object Links Light · Desktop
Changed
Conversation Sentry Alert Link · Desktop
Conversation Sentry Alert Link · Desktop
Changed
Conversation Sentry Alert Link Light · Desktop
Conversation Sentry Alert Link Light · Desktop
Changed
Conversation Sentry Chart Link · Desktop
Conversation Sentry Chart Link · Desktop
Changed

39 more changed screenshots in Frameshift.

// Webhooks refresh a changed issue, so the TTL bounds only a change that
// sends no webhook.
const OBJECT_CACHE_TTL_MS = 60_000;
const ISSUE_CACHE_TTL_MS = 60_000;

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.

Why do we have a shorter issue cache?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No strong reason. 60 s is the TTL #4148 set for every object, and this PR raised only pull requests to 60 min. Pull requests are what every dashboard surface now reads, and pull_request plus check_run/check_suite webhooks keep them fresh. Issues were out of scope here, so they kept the #4148 value.

Issues get issues webhooks too, so 60 min would fit them the same way, and it saves more there: an issue card has no batched read, so each miss is one REST call. The TTL then only bounds changes that send no webhook, as for pull requests. Want me to give issues the same 60 min TTL in this PR, or in a follow-up?

sentry-junior Bot and others added 4 commits November 24, 2026 13:15
A deleted webhook that could not wait for a card read dropped the entry
instead of writing it as gone, and the gone entry itself expired after a
day. A late or redelivered edited webhook then wrote the issue back as
live.

The deleted webhook now also writes a gone mark in plugin state, which
takes no lock, and keeps both the mark and the gone entry for the 3 days
in which GitHub can redeliver a webhook. Other issue webhooks skip an
issue with the mark.

The slow card read tests move to their own file, so objects.test.ts stays
under the file length limit.

Co-Authored-By: BYK <[email protected]>
A pull request webhook with `mergeable: null` set checks and merge state
to pending and scheduled a patch, even on the same head commit and base
branch, such as for a label. Known check counts and conflict state then
went away until the patch ran.

On the same head and base, `mergeable: null` is now a missing field:
known checks and a known merge state stay, and no patch runs. A new head
or base, or a merge state that is not known yet, still turns both pending
and patches.

Co-Authored-By: BYK <[email protected]>
The webhook cache test still expected a label with mergeable null on the
same head to turn the merge state pending.

Co-Authored-By: BYK <[email protected]>
When the last patch attempt still found GitHub computing the merge state,
it wrote the merge state as unknown with the 60-minute pull request TTL.
The card then hid the merge state, and nothing asked GitHub again for an
hour.

The last attempt now keeps the merge state pending with the shared 15 s
pending TTL, so the next read after that asks GitHub. Checks are written
as before.

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.

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

There are 4 total unresolved issues (including 3 from previous reviews).

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 01d3e06. Configure here.

return {
fields: { ...fields, checks: "pending", mergeable: "pending" },
patch: true,
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unchanged checks marked pending

Medium Severity

The new merge fallthrough always writes checks: "pending" together with mergeable, even when the head SHA did not change. Check counts belong to the head commit, so a base retarget or a same-head mergeable: null event (while mergeable is still unknown) hides known check counts until the next patch, which can wait on the heartbeat.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 01d3e06. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 1ae4715c7 (#4204): only a new head SHA resets checks to pending now. A base retarget, or a same-head mergeable: null while the merge state is unknown, sets only mergeable to pending and patches it, so known check counts stay. A new test covers a base retarget that keeps the checks and patches the merge state.

@BYK
BYK merged commit 7d51e16 into main Nov 24, 2026
59 checks passed
@BYK
BYK deleted the byk/cards-read-github-objects branch November 24, 2026 13:59
BYK added a commit that referenced this pull request Nov 24, 2026
Follows up #4162, which merged before these review fixes
landed.

**Page reads alone skip GitHub after a timeout.** A page that ran out of
its 20 s card budget used to write a shared 30 s `:out-of-time` cache
marker. Every read of those pull requests then skipped GitHub, so an
Attach of an uncached pull request in that window returned "Object not
found". Now `prefetch` can return an outcome per URL
(`ObjectLinkPrefetchOutcome`, only `out_of_time` for now). Core hands it
to that URL's `canView` and `resolve` on the same page as
`ctx.prefetchOutcome`. Attach and other single reads get no outcome, so
they ask GitHub. The shared marker is gone. The plugin API change is
documented in `extend/build-a-plugin.md`.

**Patch queries do not split.** A failed heartbeat patch query used to
split in halves down to one pull request each, with no time limit. Now
it waits whole for the next heartbeat, so a GitHub outage costs one
query per chunk of 25. Only the page card read still splits, inside its
budget, so `loadInHalves` moves next to it.

**A patch of another head commit reads again soon.** When the patch read
a head SHA other than the cached one, its pending merge state and checks
stayed fresh for the full hour. Now that patch is dropped like one with
no pull request in the answer, and its pending fields stay fresh for 15
s.

**Only a new head resets checks.** Checks belong to the head commit, so
a base retarget, or a same-head webhook with `mergeable: null` while the
merge state is unknown, now marks only the merge state pending and
patches it. Known check counts stay.

**The snooze picker waits for the card.** An open pull request row in
the snooze picker now waits for its live card before it can be picked,
as the `#` menu does, so an open draft is no longer watched as a ready
pull request.

**Saved object rows have no Attach slot.** Since the live card replaces
a saved row, the row also got the Attach slot. That moved its state
chip, or showed an empty gap for a viewer who is not a participant. A
saved object's row now has no slot, as before. A link that an Attach
saved keeps its "Attached" chip, as on `main`. The attach journeys move
to `conversation-object-attach.spec.ts` to keep both specs under the
length limit.

### Snooze picker

| | Desktop | Mobile |
| --- | --- | --- |
| Light | ![Snooze picker, light,
desktop](https://junior-prod.sentry.dev/public/artifacts/044ba35b-5abd-4f94-ae91-a872e0b8f790.png)
| ![Snooze picker, light,
mobile](https://junior-prod.sentry.dev/public/artifacts/93a44bfd-4078-48a9-b107-884ff778206d.png)
|
| Dark | ![Snooze picker, dark,
desktop](https://junior-prod.sentry.dev/public/artifacts/5ddae438-b346-460f-832f-5c05f451a1af.png)
| ![Snooze picker, dark,
mobile](https://junior-prod.sentry.dev/public/artifacts/d75b1f23-b4bf-4b89-8c01-9ad2de9f0489.png)
|

### Saved object row, with no Attach slot

| | Desktop | Mobile |
| --- | --- | --- |
| Light | ![Saved row, light,
desktop](https://junior-prod.sentry.dev/public/artifacts/6f34a7f7-3b06-4de5-9bd5-0ccc07b5978c.png)
| ![Saved row, light,
mobile](https://junior-prod.sentry.dev/public/artifacts/3233016c-19f9-4a80-b698-01b56ddc7373.png)
|
| Dark | ![Saved row, dark,
desktop](https://junior-prod.sentry.dev/public/artifacts/ed37e3c3-da00-4a11-985f-ff152acc2e04.png)
| ![Saved row, dark,
mobile](https://junior-prod.sentry.dev/public/artifacts/94469594-13b1-4273-82ab-d93d07ebf233.png)
|

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A5705312f4aef43e90d54baa93d9f241a -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A5705312f4aef43e90d54baa93d9f241a)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A5705312f4aef43e90d54baa93d9f241a/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <[email protected]>
BYK added a commit that referenced this pull request Nov 24, 2026
…reen (#4230)

Since #4162, `/inbox?view=conversations` resolves the
cards of every GitHub and Linear link in every row, even rows far off
screen. `InboxList` asked for all of the list's links under one query
key, in batches of 100. Each row summary then asked for its own links
under a different key, so some links were read twice. The page made 3
`/api/objects` reads of 115 links and 11 requests in total.

`resolvedObjects.tsx` now gives each link its own `["object-links",
url]` query, so a link is read once for the page. The 60 s staleness and
the `versions.ts` refresh still apply. Links that ask in the same task
share one batched request. A new `useNearScreen` hook watches each Inbox
row against its scroll parent with a 50% margin, and a row asks for its
links only when it is on or near the screen. The page now makes one
object read of 6 links and 9 requests in 2 serial rounds. The second
round stays, because the links come from the feed's rows.

Because the undo toast now shows sooner after an archive, the archive
undo e2e tests pause the fake clock before the archive, so render time
does not count against the 6 s undo timer. `ExpandedPin` moves to its
own file to keep `InboxRow.tsx` under the file length limit.

The list looks the same as on `main`:

| | Light | Dark |
| --- | --- | --- |
| Desktop | ![desktop
light](https://junior-prod.sentry.dev/public/artifacts/4a6dd3ba-b163-441d-be6b-ea0715ad25a6.png)
| ![desktop
dark](https://junior-prod.sentry.dev/public/artifacts/cfdfc55b-008a-414b-81ba-add50de388ab.png)
|
| Mobile | ![mobile
light](https://junior-prod.sentry.dev/public/artifacts/e2b27f9c-5296-42fc-8b39-1c333d7edba1.png)
| ![mobile
dark](https://junior-prod.sentry.dev/public/artifacts/b53328d6-e317-48d4-9b18-7deb48903ce3.png)
|

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A3a8462327ad477941f22607d29abb0ea -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A3a8462327ad477941f22607d29abb0ea)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A3a8462327ad477941f22607d29abb0ea/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <[email protected]>

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 01d3e06f Deployed Nov 24, 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