Bundle and fingerprint the mobile PWA runtime #379

Closed
opened 2026-08-09 06:50:37 +00:00 by rockachopa · 0 comments
Member

Product gap

The dashboard currently loads 38 classic JavaScript files and the service worker maintains the same asset inventory and cache revision by hand. On high-latency mobile connections this adds avoidable startup round trips and permits mixed old/new shell assets during service-worker upgrades. No historical issue, PR, or recent commit covers runtime bundling, content-hashed assets, or a startup request budget.

Vertical slice

Serve the ordered page runtime as one content-addressed bundle, reference that exact digest from dashboard HTML and the offline shell, retain separately scoped worker/login assets, and apply immutable caching only to the fingerprinted runtime. Keep source modules independently testable.

Acceptance

  • Dashboard HTML references exactly one page-runtime script instead of the current 38.
  • Identical source yields an identical URL and bytes; changing a module changes the fingerprint.
  • The service worker precaches the exact fingerprinted runtime and no superseded page modules.
  • Fingerprinted runtime responses are immutable; HTML and worker remain revalidated.
  • Existing online/offline, auth, My Work, Today/Later, composer, and mobile tests remain green.
  • Automated test enforces a <=100 KiB gzip runtime budget.

Implementation will use strict RED/GREEN TDD and close this issue from its PR.

## Product gap The dashboard currently loads 38 classic JavaScript files and the service worker maintains the same asset inventory and cache revision by hand. On high-latency mobile connections this adds avoidable startup round trips and permits mixed old/new shell assets during service-worker upgrades. No historical issue, PR, or recent commit covers runtime bundling, content-hashed assets, or a startup request budget. ## Vertical slice Serve the ordered page runtime as one content-addressed bundle, reference that exact digest from dashboard HTML and the offline shell, retain separately scoped worker/login assets, and apply immutable caching only to the fingerprinted runtime. Keep source modules independently testable. ## Acceptance - Dashboard HTML references exactly one page-runtime script instead of the current 38. - Identical source yields an identical URL and bytes; changing a module changes the fingerprint. - The service worker precaches the exact fingerprinted runtime and no superseded page modules. - Fingerprinted runtime responses are immutable; HTML and worker remain revalidated. - Existing online/offline, auth, My Work, Today/Later, composer, and mobile tests remain green. - Automated test enforces a <=100 KiB gzip runtime budget. Implementation will use strict RED/GREEN TDD and close this issue from its PR.
timmy was assigned by rockachopa 2026-08-09 06:50:37 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#379
No description provided.