You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky: Inbox request budget sees 3 serial rounds because near-screen link reads start a frame late #4254
e2e/inbox/inbox.spec.ts "loads the Inbox within its request budget" (budget { requests: 10, serialRounds: 2 }) sometimes measures 3 serial rounds. It failed 2 of 3 local runs and both CI attempts on #4205 (Blacksmith job 138815975032).
Cause: since #4230, a row reads its link cards only after useNearScreen's IntersectionObserver callback fires (packages/junior-dashboard/src/client/display-text/resolvedObjects.tsx). That callback runs a frame after mount, so the /api/objects read often starts after the row-preview read (/api/conversations/…?limit=1) has finished. The request guard then counts it as a third round. The objects read doesn't depend on the preview, so this is a timing race.
On main the budget test exists only in the classic spec. #4205 moves it into the new UI spec, which is where it shows up.
Fix: set useNearScreen's first near value from a synchronous check on mount (getBoundingClientRect against the scroll parent, with the same 50% margin). On-screen rows then start their link read in the first round, and the observer still handles rows that scroll in later. The budget stays at 10/2.
Activity