Opening the Recruitment Inbox showed skeleton placeholders every time, and
on the combined All channel it showed them stacked ABOVE rows that had
already arrived — the channel ORs its two sources' pending flags together,
so the email rows sat under placeholders while the sheet fetch finished.
The queue is a local table, not a live feed. Rows only appear when the Sync
worker writes them, and that path already invalidates qk.mailbox.all(). So
refetching on every visit bought nothing and cost a full-width skeleton each
time — worse on the All channel, which fetches BOTH sources unpaged and so
re-downloaded thousands of rows to render ten.
- LIST_CACHE / COUNT_CACHE: 10 min staleTime, 1 h gcTime, keepPreviousData.
A revisit inside the window paints rows immediately and issues no request.
- Placeholders now mean "nothing to show yet": gated on the list being
empty. A refetch over live rows is a 2px bar and the word "Updating…",
with the rows readable and clickable throughout.
- "Updated 4 min ago" + a Refresh button under the search box, because a
cached list that never admits its age reads as a broken list. Refresh
re-reads the DB; Sync pulls new mail from Outlook. Both tooltips now say
which is which — two circular arrows were indistinguishable.
- Search debounced to 300ms. Each keystroke used to mint a query key, a
request and a skeleton, so the list strobed while you typed.
- resume_text dropped from the list row mapping. serialize_application
ships the whole extracted CV on every row and the queue renders none of
it; caching a thousand of them for an hour is not a trade worth making.
The detail query fetches it for the one row actually open.
Trade-off: a sync run started elsewhere is now invisible here for up to ten
minutes. The age label and the Refresh button are the deliberate mitigation.
inbox-loading.test.mjs pins all of it, driving hand-gated fetches so the
frames a fast API flashes past become assertable: both sources pending, one
source home, and a second visit served from cache. Reverting the placeholder
rule reproduces the original defect as "skeleton=true rows=2". Wired into
npm run verify; needed a mountRoute export on the smoke harness, since
renderRoute tears the tree down before those intermediate frames can be read.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>