Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Offline start for the installed web app without displacing the isolation shim

Open
#661 0 comments 0 reactions 0 assignees View on GitHub

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
Domain
frontend, web-dev

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

status: accepted

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.mjs is where this gets verified (isolation, bridge, SMOKE_INSTALLABLE).

Options to evaluate

  1. Extend the shim: a small worker that imports coi-serviceworker behaviour and adds a cache-first strategy for the hashed Flutter and wasm assets, plus network-first for index.html. This replaces the vendored file with an owned one, so the vendoring note and pages_bundle_test.dart change.
  2. importScripts a caching layer into a thin wrapper worker that keeps the vendored shim unchanged.
  3. 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MostroP2P/app

All issues in MostroP2P/app

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.