Mobile PWA: secure-context service worker (offline shell) + Tailscale HTTPS for full Android install
Los mantenedores suelen responder en 4 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript
- Área
- full-stack, mobile
Línea de trabajo
Start by reading the remote app entry points in src/remote/index.html and src/remote/index.tsx, then trace how electron/remote/server.ts serves static files and how the remote build emits dist-remote/. Check behavior against the acceptance criteria: secure contexts register the service worker, plain HTTP skips registration, API and WebSocket requests bypass caching, and the worker is served with no-cache; document the Tailscale HTTPS setup in README.md or PRIVACY.md.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Add a secure-context-gated service worker (offline app shell) and a Tailscale HTTPS path so the mobile app becomes a fully installable PWA on Android/Chrome — not just iOS add-to-home-screen.
This is follow-up step 5 of 5 from the "autoconnect to mobile + installable PWA" work. Steps 1–3 have landed (auto-start server, manifest + icons, reconnect screen).
Background: why a manifest alone isn't enough
The remote server serves plain HTTP on a LAN IP (http://192.168.1.x:7777). That is not a secure context, and:
- Service workers won't register over HTTP on a non-localhost origin → no offline shell, and Chrome won't show the "Install app" prompt / generate a WebAPK.
getUserMediais also blocked → in-PWA QR-camera scanning can't work over HTTP either.- iOS Safari is the exception: "Add to Home Screen" works for any page (already shipped via the manifest in step 2), without a service worker.
So full installability requires a real HTTPS origin. The clean way to get one for a localhost service is Tailscale (tailscale serve → https://<machine>.<tailnet>.ts.net, trusted cert), which also gives a stable IP across networks/restarts — ideal for an origin-locked PWA.
Proposed solution
- Minimal service worker in
src/remote/(emitted intodist-remote/):- Pre-cache / cache-first the app shell (HTML, JS, CSS, icons, manifest).
- Never cache
/api/*or/ws(network-only) — these are dynamic and token-scoped. - Register it only when
isSecureContextso it's a no-op over plain HTTP (no console errors on WiFi).
- Server caching headers: the static handler currently serves all non-HTML as
immutable(electron/remote/server.ts). The service-worker file must be servedno-cache(or short max-age) so SW updates propagate; revisit the manifest's caching too. - Tailscale HTTPS guidance / integration: document
tailscale serve(or detect/offer to run it) so users get a secure origin. The app already detects Tailscale IPs and offers a WiFi/Tailscale toggle inConnectPhoneModal.
Acceptance criteria
- Over a secure origin (Tailscale HTTPS / localhost), the service worker registers and the app shell loads offline.
- Over plain HTTP (WiFi), SW registration is skipped cleanly — no errors, app still works as today.
-
/api/*and/wsare never served from cache. - The SW file is served with
no-cache; updates roll out without a year-long immutable cache. - Chrome (Android) shows the install prompt when served over Tailscale HTTPS.
- README/docs describe the Tailscale HTTPS setup for full install.
Touch points
src/remote/— service worker source + registration (guarded byisSecureContext).src/remote/index.html/index.tsx— SW registration entry.electron/remote/server.ts— cache-control for the SW file; ensure SW scope path is served correctly.README.md/PRIVACY.md— Tailscale HTTPS instructions.
Note
iOS already gets a standalone home-screen app over HTTP (shipped in step 2). This issue is specifically about Android/Chrome full install + offline shell, which is a web-platform requirement (secure context), not something we can shortcut in code.
- Lenguaje dominante
- TypeScript
- Estrellas
- 1k
- Forks
- 144
- Merge medio
- 4 d 19 h
- PR fusionados (30 d)
- 28
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de johannesjo/parallel-code
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
johannesjo/parallel-code#385 ·
Los mantenedores suelen responder en 4 días
-
Option to show usage as used instead of left, and potential further customization ideasPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
johannesjo/parallel-code#353 ·
Los mantenedores suelen responder en 4 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
johannesjo/parallel-code#163 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
johannesjo/parallel-code#375 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
-
Package as a PlatpakAbiertoenhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
johannesjo/parallel-code#374 ·
Los mantenedores suelen responder en 4 días
Todos los issues de johannesjo/parallel-code
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
ci
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ClickHouse/clickhouse-js#1248 ·
Los mantenedores suelen responder en 1 día
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechseltAbiertotechnik
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
AhmedNAgy25/analysor#25 ·
Los mantenedores suelen responder en 1 día