Repository navigation
perf(dashboard): Read each link card once, for Inbox rows near the screen - #4230
Merged
Merged
Conversation
…reen The Inbox list resolved the cards of every link in every row, in batches of up to 100 links. Each row summary then read its own links again under a different query key. On /inbox?view=conversations this made 3 /api/objects reads of 115 links for links that were mostly off screen. Give each link its own query, so a link is read once per page and the existing staleness and version refresh still apply. Links that ask in the same task share one batched request. Inbox rows ask only when they are on or near the screen. The page now makes 9 requests in 2 serial rounds, with one object read of 6 links, down from 11 requests. The conversations spec pins that budget and checks that no link is read twice and that an off-screen row is read only after it scrolls into view. The archive undo tests now pause the clock before the archive, so the time that the page takes to render it does not count against the undo timer.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
186 screenshot changes — 182 changed · 0 added · 4 removed Review screenshots in Frameshift Show 12 more changed screenshots164 more changed screenshots in Frameshift. |
A link that another link already read showed its card from the first render. On a mobile Quick question the sheet then opened that card. Show the card once the link itself asks, as before. Co-Authored-By: BYK <[email protected]>
BYK
approved these changes
Nov 24, 2026
BYK
enabled auto-merge (squash)
November 24, 2026 21:26
This comment has been minimized.
This comment has been minimized.
The first load grew on main since the last update, and the link card reads add a little more. Co-Authored-By: BYK <[email protected]>
This was referenced Nov 24, 2026
BYK
added a commit
that referenced
this pull request
Nov 24, 2026
Fixes #4254 Since #4230, an Inbox row reads its link cards only after `useNearScreen`'s IntersectionObserver calls back, which happens a frame after mount. The `/api/objects` read could then start after the row-preview read had already finished, so the request budget counted it as a third serial round. The objects read doesn't depend on the preview, so this was only a timing race. `useNearScreen` now checks the row against its scroll area synchronously when it mounts, using the same 50% margin the observer uses. Rows that are on screen, or near it, at mount start their link read alongside the first requests. Rows that scroll in later still go through the observer. Nothing visible changes, and the Inbox budget stays at 10 requests in 2 serial rounds. <!-- 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]>
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.
Since #4162,
/inbox?view=conversationsresolves the cards of every GitHub and Linear link in every row, even rows far off screen.InboxListasked 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/objectsreads of 115 links and 11 requests in total.resolvedObjects.tsxnow gives each link its own["object-links", url]query, so a link is read once for the page. The 60 s staleness and theversions.tsrefresh still apply. Links that ask in the same task share one batched request. A newuseNearScreenhook 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.
ExpandedPinmoves to its own file to keepInboxRow.tsxunder the file length limit.The list looks the same as on
main:via @BYK.
--
View Session [Sentry]