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
fix(aggregator): shell pages — a stalled/failed fragment must surface, not spin (board/today/attention) #1503
Problem (observed in source + live sizes, 2026-10-27)
The three highest-traffic pages — / (board), /today, /attention — are shells (#1444): the server returns nav + a skeleton ("Loading the board…", "Loading today…") and the real content streams in as a Datastar fragment (data-on-load="@get('/frag/…')"). The only fallback in the shell markup is a <noscript> meta-refresh to ?full=1.
There is no error or timeout path: src/render.ts / src/server.ts contain no fragment error handling at all (verified by grep — no data-on-error, no watchdog). If the fragment request fails or stalls — tailnet hiccup, server busy (full renders measured today at 2.36 MB for the board and 3.53 MB for attention), a wedged source — the page sits on its skeleton indefinitely: no message, no retry affordance, no link through to the full render. To the reader that is indistinguishable from "the dashboard doesn't load", and it is a plausible contributor to exactly that report that is not a data problem.
Design
A shell-side watchdog, no protocol change: if the fragment has not replaced the skeleton within ~10 s, the skeleton is swapped for an inline notice — the live view didn't arrive — <a href="?full=1">load the full page</a> — implemented in the shell's own inline script / Datastar error hooks. The ?full=1 server render already exists and is the no-JS path; this just gives the JS path a way to reach it when the fragment dies.
Acceptance
With /frag/* requests blocked, each of /, /today, /attention shows the notice with a working full-page link within the time bound.
Normal path unchanged: when the fragment lands, no notice ever appears.
?full=1 renders are untouched.
Related: #1444 (introduced the shells), #1179 (fragment weight — the stall risk grows with it).
Related: #1444 (shells), #1179 (fragment weight). Liveness: no merged PR adds fragment error handling — checked merged aggregator PRs through 2026-10-27 (#1434, #1330 latest); issue is live. Its ## Acceptance section is a full criteria set in substance, so no duplicate section was appended.
Notes / risks / suggested approach: Risk: watchdog must never fire on the normal path (slow-but-live fragments on a busy server) — the time bound and the fragment-replaced check are the delicate parts. Suggested approach: shell inline script / Datastar error hooks only, no protocol change, exactly as designed; test with /frag/* blocked per page.
Task: Shell pages (/, /today, /attention) spin forever when the Datastar fragment stalls/fails; add a ~10s shell-side watchdog swapping the skeleton for a notice linking ?full=1.
Expectation: intake only this run — labels normalized, liveness checked, acceptance criteria in place; the fix itself routes through the normal queue/sweep path
Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 15168 moved from blocked/parked to queued in the fleet unblock-all pass (worker main-unblock-all-2026-11-13). Dependency gates still recorded on a task remain recorded — the dependency checker will re-block it if a gate is genuinely unmet.
Found via: queue claim (triage packet; fix in scope per packet acceptance, worked direct per §1b/§1c after five prior handoffs)
Task: Implement the shell fragment watchdog designed in this issue
Expectation: Done — merged; the watchdog ships on the next aggregator deploy
Outcome
PR #9934 merged (squash 79606607397e75d11066effebf0881b9c30c402a, 2026-11-14T11:28:18Z); this issue closed by the merge.
pm-stack/aggregator/src/render.ts: shared FRAG_WATCHDOG_SCRIPT (bound FRAG_WATCHDOG_MS = 10_000) wired into all five shell renderers — board, attention, today, queue, overview. Ten seconds after a shell renders, any [data-frag] container still holding its .skel skeleton gets it swapped for an inline notice ("the live view did not arrive — load the full page") linking that page's ?full=1 render. In-time fragments remove the skeleton themselves (watchdog no-ops); late fragments replace the notice. No protocol change; ?full=1 renders untouched — acceptance criteria met as designed.
pm-stack/aggregator/src/ui.css: .frag-failed styling in dark + both light-theme selector lists.
pm-stack/aggregator/test/frag-watchdog-1503.test.ts: 4 new tests (bound, all five shells, attention's three containers, today health-strip order).
Verification
New tests 4/4 pass; test/render.test.ts 30/30 pass; affected-area files 177 named tests pass (only failures: unnamed server-boot hook timeouts, the same flake class present on unmodified main).
bunx tsc --noEmit: 22 errors — identical count to unmodified main, none in touched files.
Full suite: branch 2324 pass / 19 fail vs main 2327 / 16 across repeated runs (main itself varies 16–19; failures are browser/boot/live-source environment timeouts in both trees, none in render/shell tests).
Activity
developing-today commentedon Oct 27, 2026
CODE-568
dezren39 commentedon Oct 27, 2026
Intake review
Related: #1444 (shells), #1179 (fragment weight). Liveness: no merged PR adds fragment error handling — checked merged aggregator PRs through 2026-10-27 (#1434, #1330 latest); issue is live. Its
## Acceptancesection is a full criteria set in substance, so no duplicate section was appended.Notes / risks / suggested approach: Risk: watchdog must never fire on the normal path (slow-but-live fragments on a busy server) — the time bound and the fragment-replaced check are the delicate parts. Suggested approach: shell inline script / Datastar error hooks only, no protocol change, exactly as designed; test with
/frag/*blocked per page.🤖 Agent note · filed
/,/today,/attention) spin forever when the Datastar fragment stalls/fails; add a ~10s shell-side watchdog swapping the skeleton for a notice linking?full=1.dezren39 commentedon Nov 1, 2026
🤖 Agent note · picked up
23 remaining items
dezren39 commentedon Nov 14, 2026
Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 15168 moved from blocked/parked to queued in the fleet unblock-all pass (worker
main-unblock-all-2026-11-13). Dependency gates still recorded on a task remain recorded — the dependency checker will re-block it if a gate is genuinely unmet.fix(aggregator): shell pages surface a stalled/failed fragment instea…
dezren39 commentedon Nov 14, 2026
🤖 Agent note · done
Outcome
PR #9934 merged (squash
79606607397e75d11066effebf0881b9c30c402a, 2026-11-14T11:28:18Z); this issue closed by the merge.pm-stack/aggregator/src/render.ts: sharedFRAG_WATCHDOG_SCRIPT(boundFRAG_WATCHDOG_MS = 10_000) wired into all five shell renderers — board, attention, today, queue, overview. Ten seconds after a shell renders, any[data-frag]container still holding its.skelskeleton gets it swapped for an inline notice ("the live view did not arrive — load the full page") linking that page's?full=1render. In-time fragments remove the skeleton themselves (watchdog no-ops); late fragments replace the notice. No protocol change;?full=1renders untouched — acceptance criteria met as designed.pm-stack/aggregator/src/ui.css:.frag-failedstyling in dark + both light-theme selector lists.pm-stack/aggregator/test/frag-watchdog-1503.test.ts: 4 new tests (bound, all five shells, attention's three containers, today health-strip order).Verification
test/render.test.ts30/30 pass; affected-area files 177 named tests pass (only failures: unnamed server-boot hook timeouts, the same flake class present on unmodified main).bunx tsc --noEmit: 22 errors — identical count to unmodified main, none in touched files.Task 15168 completes as
fixed_merged.