Offline start for the installed web app without displacing the isolation shim
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 32/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- dart, flutter, javascript
Research direction
Start by reading web/index.html, the vendored web/coi-serviceworker.min.js, and the vendoring note; then inspect test/web/smoke/smoke.mjs and pages_bundle_test.dart. First decide whether offline startup is useful given that trading needs relays, and compare the proposed worker approaches against the isolation constraints. Done means documenting the decision; if implementing caching, the smoke test must still verify isolation, the bridge, and SMOKE_INSTALLABLE.
Written by the indexing model from the issue text.
Description
Problem
With #658, the web build is installable, but an installed Mostro still needs the network to start. --pwa-strategy=none stays, because Flutter's service worker would register over the same scope as web/coi-serviceworker.min.js and evict it, and the page would lose cross-origin isolation (SharedArrayBuffer, the wasm threads). So nothing caches the app shell. Offline, the installed app opens to the browser's network error instead of the app, even though the app keeps its data in IndexedDB.
Constraints
- There is one service worker per scope, and the shim must stay at the app's scope (
/app/). The FCM worker already lives in its own scope (firebase-cloud-messaging-push-scope). - Anything added must keep re-serving every response with COOP/COEP, which is the shim's whole job, and keep the shim the first script in
index.html. - Static greps cannot prove isolation survives.
test/web/smoke/smoke.mjsis where this gets verified (isolation, bridge,SMOKE_INSTALLABLE).
Options to evaluate
- Extend the shim: a small worker that imports
coi-serviceworkerbehaviour and adds a cache-first strategy for the hashed Flutter and wasm assets, plus network-first forindex.html. This replaces the vendored file with an owned one, so the vendoring note andpages_bundle_test.dartchange. importScriptsa caching layer into a thin wrapper worker that keeps the vendored shim unchanged.- Do nothing: state "needs a connection" in the docs. The app is useless offline anyway, since trading needs relays. Then the value is limited to a nicer error screen and a faster cold start.
Option 3 is a legitimate outcome. Decide before building.
Out of scope
Web push. It does not depend on this: the FCM worker is separate.
- Dominant language
- Dart
- Stars
- 11
- Forks
- 9
- Avg merge
- 13h 4m
- Merged PRs (30d)
- 259
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MostroP2P/app
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Add-invoice screen stays on "Sent, waiting for the node" after a late acceptance on a sell orderOpenbug priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
area: ui
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
MostroP2P/app#341 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
intel/rohd-wave-viewer#11 ·
-
DOCS UPDATE: README.md and BACKEND.md reference a search-meetings edge function that does not existOpendocumentation
Difficulty 1/5 1-3 hours Newbie friendliness 93/100
AOSSIE-Org/Ell-ena#337 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
cat: puzzle
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
lichess-org/mobile#3826 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
saber-notes/saber#1844 ·