diff --git a/pm-stack/aggregator/src/render.ts b/pm-stack/aggregator/src/render.ts index 941130a98f..d3d59b71a5 100644 --- a/pm-stack/aggregator/src/render.ts +++ b/pm-stack/aggregator/src/render.ts @@ -335,6 +335,28 @@ document.addEventListener("submit", async (ev) => { * inputs carry the payload. A stop form must have its confirm box * ticked before the script will send it (two-step confirm). */ +/** Shell fragment watchdog (#1503): the shell pages stream their real + * content in as Datastar fragments; if a fragment request fails or stalls + * there is no error path in the markup, so the page would sit on its + * skeleton forever. Ten seconds after the shell renders, any [data-frag] + * container still holding its .skel skeleton gets the skeleton swapped for + * an inline notice linking the ?full=1 server render (the no-JS path). + * A fragment that lands in time removes the skeleton itself, so the + * watchdog no-ops; a fragment that lands late replaces the notice. */ +export const FRAG_WATCHDOG_MS = 10_000; +export const FRAG_WATCHDOG_SCRIPT = ``; + const ACTION_SCRIPT = `