Skip to content

feat: WASM Progressive Web App (PWA) support and offline caching #155

@MaximumTrainer

Description

@MaximumTrainer

Summary

Package the MaximumTrainer WASM build as a Progressive Web App (PWA) with a service worker, manifest.json, and offline asset caching so users can install it to their home screen and use it without an internet connection after the first visit.

Motivation

PWA installation removes the browser chrome, provides a native-app experience, enables offline use (useful when training in areas without reliable Wi-Fi), and allows users to launch the app from their desktop without navigating to the GitHub Pages URL.

Acceptance Criteria

  • A manifest.json is served alongside the WASM assets with correct name, short_name, start_url, display: standalone, and icon paths
  • App icons are provided at 192×192 and 512×512 px in PNG format
  • A service worker pre-caches MaximumTrainer.wasm, MaximumTrainer.js, qtloader.js, and all audio/icon assets on first load
  • On subsequent visits (or after going offline) the app loads from cache with no network requests for core assets
  • The service worker invalidates the cache and fetches fresh assets when a new version is deployed (version hash in cache name)
  • The GitHub Pages deployment pipeline (pages.yml) generates and serves the manifest and service worker
  • Playwright tests verify the manifest is served, the service worker registers, and the app loads in offline mode (network throttled to ''offline'')
  • iOS Safari and Chrome (Android/desktop) install prompts are verified manually

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions