HERMES-GIELIE/static
nesquena-hermes 4fea813adc fix(sw-cache): version style.css link so old SW cannot return stale CSS (#1507)
Container restart / in-place upgrade left the previous service worker still
controlling open tabs. Its fetch handler intercepted 'static/style.css',
matched the unversioned URL exactly against its old shell cache, and returned
the OLD CSS — while the JS files (which already carry ?v=__WEBUI_VERSION__)
hit the cache as misses and loaded fresh from network. New JS + old CSS
broke the layout until a force refresh bypassed the SW.

Fix is a 1-line attribute change plus aligning the SW pre-cache list:

* static/index.html: add ?v=__WEBUI_VERSION__ to the style.css link, matching
  the pattern already in use for every JS file in the page.
* static/sw.js: add the same ?v=__CACHE_VERSION__ suffix to every versioned
  entry in SHELL_ASSETS so that pre-cache URLs match what the page actually
  requests. Unversioned entries (root, manifest, favicons) stay unversioned.

Tests:

* New regression test_index_versions_stylesheet (lock the href) and
  test_sw_shell_assets_match_versioned_asset_urls in test_pwa_manifest_sw.py.
* test_workspace_panel_preload_marker_restored_in_head in test_sprint37.py
  loosened to match the css link prefix (preserves the ordering invariant).

Verified live on port 8789: served HTML carries
'static/style.css?v=v0.50.275-dirty' and SW SHELL_ASSETS receive the
matching VQ at request time.

Closes #1507.
2026-05-03 06:09:47 +00:00
..
vendor chore: vendor streaming-markdown@0.2.15, remove CDN dependency 2026-04-24 01:05:20 +00:00
apple-touch-icon.png feature: add manifest and icons to enable app install on android 2026-05-02 19:06:39 +02:00
boot.js fix: add sidebar cancel for running sessions 2026-05-03 08:46:36 +08:00
commands.js fix: anchor active sessions per browser tab 2026-05-01 19:52:05 +08:00
favicon-32.png fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
favicon-192.png feature: add manifest and icons to enable app install on android 2026-05-02 19:06:39 +02:00
favicon-512.png feature: add manifest and icons to enable app install on android 2026-05-02 19:06:39 +02:00
favicon-512.svg feature: add manifest and icons to enable app install on android 2026-05-02 19:06:39 +02:00
favicon.ico fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
favicon.svg fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
i18n.js fix(onboarding): allow keyless setup for self-hosted providers (#1499 third sub-bug) 2026-05-03 03:07:07 +00:00
icons.js fix(composer): distinct voice-mode icon, descriptive labels, opt-in pref (#1488) 2026-05-02 22:16:23 +00:00
index.html fix(sw-cache): version style.css link so old SW cannot return stale CSS (#1507) 2026-05-03 06:09:47 +00:00
login.js fix(login): retry connectivity probe every 3s, auto-reload when server recovers 2026-05-01 19:54:47 +00:00
manifest.json feature: add manifest and icons to enable app install on android 2026-05-02 19:06:39 +02:00
messages.js fix(sessions): sync URL after session id rotation (#1395) 2026-05-02 17:41:05 +00:00
onboarding.js fix(onboarding): allow keyless setup for self-hosted providers (#1499 third sub-bug) 2026-05-03 03:07:07 +00:00
panels.js fix(composer): distinct voice-mode icon, descriptive labels, opt-in pref (#1488) 2026-05-02 22:16:23 +00:00
sessions.js fix: add sidebar cancel for running sessions 2026-05-03 08:46:36 +08:00
style.css fix(onboarding): allow keyless setup for self-hosted providers (#1499 third sub-bug) 2026-05-03 03:07:07 +00:00
sw.js fix(sw-cache): version style.css link so old SW cannot return stale CSS (#1507) 2026-05-03 06:09:47 +00:00
terminal.js fix: anchor active sessions per browser tab 2026-05-01 19:52:05 +08:00
ui.js fix: P0 bugfixes — tool-card args, sw.js path, CLI rename, scroll pinning 2026-05-02 23:39:52 +00:00
workspace.js fix: anchor active sessions per browser tab 2026-05-01 19:52:05 +08:00