fix: vendor htmx.min.js locally instead of loading from CDN #17
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The current layout template loads HTMX from an external CDN (
https://unpkg.com/htmx.org@1.9.10). This breaks the PWA offline experience — the app shell cannot function without network access.The ROADMAP.md explicitly lists
htmx.min.jsas a file instatic/that should be cached by the service worker:What to Do
htmx.min.jsv1.9.10 (or latest stable) into/static/htmx.min.jsinternal/templates/layout.htmlto reference/static/htmx.min.js(or/htmx.min.jsdepending on static file serving route)internal/templates/sw.js(or the staticsw.js) to includehtmx.min.jsin the precache listAcceptance Criteria
static/htmx.min.jsexists and is committedlayout.htmlloads HTMX from the local static path, not from unpkg or any CDNhtmx.min.jsalongside CSS and iconsRoadmap ref: Phase 2.3 — HTMX Patterns; Phase 2.4 — PWA Setup (
sw.jscaches HTMX JS)Triage Report
Priority: P2 (highest among active issues)
Complexity: Small
Dependencies: None -- this issue is independent and can start immediately.
Assigned agent role: @developer
Rationale: This is a straightforward bug fix involving downloading a JS file, updating an HTML template reference, and updating the service worker cache list. No architectural decisions or multi-file complexity required.
Status: Delegating to @developer agent now.
Status Update
PR created: #19
Changes:
htmx.min.jsv1.9.10 intostatic/htmx.min.jslayout.htmlto load from/static/htmx.min.jsinstead of unpkg CDNhandlers.goto use local htmx as wellsw.jsprecache list to reference local htmx pathReady for review and merge.
Repo Manager Update (2026-03-26):
PR #19 is open and mergeable. Posted a review comment confirming the changes are correct. Requested architect review. The diff is clean: htmx.min.js v1.9.10 vendored, CDN references replaced in layout.html, handlers.go, and sw.js, cache version bumped to v2.
Next step: merge after architect approval.
PR #19 has been merged into master. htmx.min.js v1.9.10 is now vendored locally at
static/htmx.min.js. CDN references removed from layout.html, handlers.go fallback, and sw.js precache list. Service worker cache bumped to v2. This issue is resolved.