Conversation
Stable promotion of the 3.3.1-rc line. Bumps manifest + sw.js CACHE_VERSION + all HTML ?v= cache-busters → 3.3.1. See CHANGELOG and v3.3.1 release notes for the user-facing summary. Closes #772, #777, #779, #780, #784, #786, #787, #788, #790. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request promotes Beatify to version 3.3.1, incorporating a wide range of bug fixes, UI improvements for the setup wizard, and a new emergency reset functionality. Key technical changes include updating the manifest, service worker cache version, and asset query strings to ensure proper versioning. Feedback identifies critical issues with the service worker's precaching strategy, such as URL and filename mismatches that could bypass the cache, and a redundant script tag in the admin interface that may cause double loading and execution of stale code.
| 'use strict'; | ||
|
|
||
| var CACHE_VERSION = 'beatify-v3.3.1-rc8'; | ||
| var CACHE_VERSION = 'beatify-v3.3.1'; |
There was a problem hiding this comment.
While updating the CACHE_VERSION is necessary for the release, the service worker's precaching strategy (defined in the PRECACHE_ASSETS array) currently contains several discrepancies that will lead to redundant network requests and ineffective caching:
- Query String Mismatch: The HTML files request assets using
?v=3.3.1, but the precache list uses URLs without version strings. Sincecaches.match()is URL-sensitive, the precached assets will not be used by the application, causing them to be fetched from the network and cached a second time (with the query string) on first use. - Filename Mismatch: The precache list references
/beatify/static/js/player.min.js, butplayer.html(line 897) now requests/beatify/static/js/player.bundle.min.js. - Missing Assets: Several new or critical scripts used in
admin.html(e.g.,playlist-hub.js,wizard.js,playlist-requests.min.js) are not included in the precache list.
Consider updating the PRECACHE_ASSETS array to align with the actual filenames and versioned URLs used in the HTML templates.
| <script src="/beatify/static/js/party-lights.min.js?v=3.3.0"></script> | ||
| <script src="/beatify/static/js/tts-settings.js?v=3.3.0"></script> | ||
| <script src="/beatify/static/js/playlist-requests.min.js?v=3.3.1"></script> | ||
| <script type="module" src="/beatify/static/js/playlist-hub.js?v=3.3.1"></script> |
There was a problem hiding this comment.
This script tag for playlist-hub.js is redundant and causes a double load. wizard.js (loaded on the next line) already imports playlist-hub.js as an ES module.
Furthermore, because the import inside wizard.js uses a relative path without a version query string (import ... from './playlist-hub.js'), the browser will fetch the file twice: once with ?v=3.3.1 (from this script tag) and once without (from the module import). The application will ultimately use the version without the cache-buster, potentially leading to stale code execution if the browser has a cached copy from a previous version.
Stable promotion of the 3.3.1-rc line.
Bumps manifest +
sw.js CACHE_VERSION+ all HTML?v=cache-busters →3.3.1.See CHANGELOG and the v3.3.1 GitHub Release for the user-facing summary.
Closes #772, #777, #779, #780, #784, #786, #787, #788, #790.
🤖 Generated with Claude Code