Repository navigation
Web app: make it installable and usable offline - #610
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The offline CellDL runtime remains unavailable for deployed /appdev/ users because the service worker does not cache the canonical /app/celldl/ fallback URL and its assets.
1 open issue
What changed in this PR
This pull request makes the Web app installable as a Progressive Web App and supports offline use while preserving Electron and library builds.
Changes:
- Adds a generated service worker with precaching, runtime dependency caching, cache versioning, and offline navigation handling.
- Adds PWA metadata, icons, safe-area styling, and iOS standalone-app support.
- Updates hashing utilities, dependency versions, build configuration, and Web deployment ordering.
| File | Description |
|---|---|
| src/renderer/vite.config.ts | Configures service-worker generation and shares the CellDL runtime path across the build. |
| src/renderer/src/types/shims.d.ts | Declares the service-worker build flag. |
| src/renderer/src/sw.ts | Implements service-worker installation, precaching, runtime caching, updates, and offline request handling. |
| src/renderer/src/main.ts | Initializes iOS layout handling and registers the service worker for the Web app. |
| src/renderer/src/components/MainMenu.vue | Adjusts the menu layout for the iOS standalone status-bar area. |
| src/renderer/src/components/BackgroundComponent.vue | Keeps the footer clear of mobile home indicators. |
| src/renderer/src/common/serviceWorker.ts | Registers the service worker and reports fetched resources for runtime caching. |
| src/renderer/src/common/iosInstalledApp.ts | Detects iOS standalone mode and adjusts the app viewport and orientation handling. |
| src/renderer/scripts/sw.plugin.ts | Generates the deployable service worker with hashed asset and cache metadata. |
| src/renderer/scripts/hash.ts | Provides shared SHA-256 hashing helpers. |
| src/renderer/scripts/celldl.runtime.ts | Uses shared hashing helpers for CellDL runtime paths. |
| src/renderer/public/manifest.webmanifest | Defines the installable Web app manifest and icons. |
| src/renderer/public/.htaccess | Configures manifest MIME handling and fixed-file cache behavior. |
| src/renderer/package.json | Updates the renderer version and dependency versions. |
| src/renderer/index.html | Adds PWA metadata, Apple support, and safe-area layout styling. |
| src/renderer/bun.lock | Locks the renderer dependency updates. |
| package.json | Synchronizes the project version and dependency versions. |
| electron.vite.config.ts | Disables service-worker registration for Electron builds. |
| bun.lock | Locks root dependency updates. |
| .github/workflows/cddev.yml | Deploys the development service worker in the required order. |
| .github/workflows/cd.yml | Deploys the production service worker in the required order. |
Review effort: Lite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #609.