Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/frontend/packages/dashboard/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
iris b9df538940 frontend/dashboard: heartbeat + watchdog so a dead SharedWorker self-heals (#515)
Firefox kills "idle" SharedWorkers under memory pressure with no native
signal to the client. The page's port silently becomes a no-op and
events stop flowing — observable symptom: mara's "dashboard never
refreshes; F5 fixes it" (because F5 creates a fresh page that creates
a fresh worker).

The worker now pings every connected port every 30s. The client tracks
last-activity-from-worker on every message arrival (incl. pings, since
those carry no URL — bumped before the URL filter in the route handler).
A visibility-gated watchdog polls every 15s; if the page is visible AND
has active subs AND hasn't heard from the worker in >90s, it presumes
the worker dead, logs a console warning, and re-subscribes on a fresh
port. Three pings missed before we act, so a normal tab-throttle blip
doesn't false-positive.

The fresh-port re-subscribe re-uses the bfcache-restore code path
(same shape: drop stale listeners, getSharedPort → new SharedWorker,
re-attach each route + repost subscribe). Recovery is per-tab — when
one tab's watchdog fires and brings up a new worker, other tabs that
share the named worker pick it up on their own watchdog cycle.

Falls back gracefully on environments without SharedWorker (the
existing direct-EventSource path is untouched) and is invisible on the
healthy path — pings are 30s apart, no UI surface.
2026-05-27 23:37:21 +02:00
..
common.js frontend/dashboard: heartbeat + watchdog so a dead SharedWorker self-heals (#515) 2026-05-27 23:37:21 +02:00
dashboard.css approvals: manager can withdraw pending approvals (closes #250) 2026-05-27 12:48:30 +02:00
flow.html dashboard: rename src/app.js → src/tabs.js (closes #406) 2026-05-26 19:39:27 +02:00
flow.js flow.js: subscribe to /dashboard/stream with ?kinds= filter (closes #408) 2026-05-26 23:02:52 +02:00
index.html dashboard: rename src/app.js → src/tabs.js (closes #406) 2026-05-26 19:39:27 +02:00
stream-worker.js frontend/dashboard: heartbeat + watchdog so a dead SharedWorker self-heals (#515) 2026-05-27 23:37:21 +02:00
tabs.js tabs: dedup target-chips + interval-parse between new/edit schedule forms 2026-05-27 19:22:59 +02:00