hyperhive/frontend/packages/swarm-ui/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
iris 6b3840b6ac swarm-ui: content-hash main/theme/swarm-ui-css filenames for real cache-busting
Every redeploy currently changes the nix store path serving swarm-ui's
JS/CSS but never the URL the browser requested (main.js, main.css,
theme.css, swarm-ui.css are all fixed filenames) -- so a browser can get
stuck serving yesterday's bundle after a deploy until someone clears the
cache by hand.

build.mjs now hashes main.tsx's JS bundle + its companion CSS output,
plus theme.css and swarm-ui.css, via esbuild's own metafile (not a
guessed hash algorithm), and rewrites the real URLs into index.html and
sw.js after the build.

colors.css deliberately stays unhashed: nix/host-modules/swarm-ui.nix's
stylix theming swaps that exact fixed path via an `= /static/colors.css`
nginx location override with no npm/esbuild rebuild involved. Hashing it
would silently break that swap on a themed host.

sw.js's CACHE_VERSION is now derived from the real hashed URLs instead of
a hand-bumped literal, so any shell-asset change gets a fresh cache name
and the SW's own activate-time sweep evicts the previous one in full --
fulfilling a promise its own prior comment already made.

Scope: swarm-ui only, per mara's call on hyperhive#4283 ("this is about
swarm ui - everything else will eventually migrate over"). dashboard and
agent are untouched.
2026-09-12 13:04:01 +02:00
..
pages swarm-ui/agents: move the split-out agent-page files into pages/agents/ 2026-09-11 22:35:44 +02:00
shell treefmt: apply prettier 2026-09-02 15:25:07 +02:00
ui swarm-ui/agents: split the page, extract FilterableView per mara's follow-up 2026-09-11 22:30:41 +02:00
App.tsx swarm-ui/agents: move the split-out agent-page files into pages/agents/ 2026-09-11 22:35:44 +02:00
colors.css swarm-ui: bootstrap new swarm-level frontend (Preact + wouter + TS + JSX) 2026-08-11 21:31:44 +02:00
css.d.ts treefmt: apply prettier 2026-09-02 15:25:07 +02:00
index.html swarm-ui: make it installable as a PWA 2026-09-12 11:30:20 +02:00
main.tsx swarm-ui: make it installable as a PWA 2026-09-12 11:30:20 +02:00
manifest.webmanifest swarm-ui: PWA follow-ups from review 2026-09-12 11:30:20 +02:00
sw.js swarm-ui: content-hash main/theme/swarm-ui-css filenames for real cache-busting 2026-09-12 13:04:01 +02:00
swarm-ui.css swarm-ui: real hive-roster overview page 2026-08-13 11:21:30 +02:00
theme.css swarm-ui: bootstrap new swarm-level frontend (Preact + wouter + TS + JSX) 2026-08-11 21:31:44 +02:00
util.ts treefmt: apply prettier 2026-09-02 15:25:07 +02:00