feat(pwa): installable web app + landing web entry #184

Merged
developer merged 1 commits from feature/pwa-install-cta into development 2026-07-05 19:36:37 +00:00
Owner

Makes the web SPA an installable PWA and surfaces it to users.

What

  • PWA plumbing (dependency-free): ui/public/manifest.webmanifest, an install-only service worker (ui/public/sw.js), and 192/512/maskable icons generated from the brand tile; PWA head tags in index.html; the .webmanifest MIME type registered in the gateway (distroless has no /etc/mime.types).
  • Platform-adaptive install CTA (components/InstallApp.svelte + lib/pwa): one-tap on Chromium, manual Add-to-Home-Screen instructions on iOS Safari, hidden elsewhere / once installed / inside a Mini App. Shown under the logged-out login card and at the bottom of Settings.
  • Landing: a third entry linking /app/ (the brand tile), with a caption under all three (Telegram / VK / Веб-версия).

Feasibility note

One-tap install (beforeinstallprompt) is Chromium-only. iOS Safari has no programmatic install (manual Share → Add to Home Screen only); Firefox has none on desktop. The CTA adapts per platform accordingly.

Safety

The service worker is navigation-only (network-first, cached-shell fallback); hashed assets and the Connect stream are untouched. Registered web-only (skipped in Mini Apps and the mock build). It is the single growth point for a future opt-in offline mode (documented in ARCHITECTURE §13).

Tests

pwa.ts unit tests; a webui probe (manifest/sw.js content-type + the SPA-fallback-to-HTML trap); e2e for the one-tap CTA, the iOS instructions modal and the landing web entry. Local: pnpm check + test:unit + build green; go build/vet/test ./gateway/... + gofmt clean.

Review on the contour

  • Chromium desktop/Android: the install CTA one-taps and installs (standalone launch, right icon).
  • iOS Safari: the CTA opens the instructions modal; manual add yields the apple-touch-icon.
  • Landing shows three captioned entries; the web one opens /app/.
  • CTA hidden once installed and inside the Telegram/VK Mini Apps.
Makes the web SPA an installable PWA and surfaces it to users. ## What - **PWA plumbing** (dependency-free): `ui/public/manifest.webmanifest`, an install-only service worker (`ui/public/sw.js`), and 192/512/maskable icons generated from the brand tile; PWA head tags in `index.html`; the `.webmanifest` MIME type registered in the gateway (distroless has no `/etc/mime.types`). - **Platform-adaptive install CTA** (`components/InstallApp.svelte` + `lib/pwa`): one-tap on Chromium, manual Add-to-Home-Screen instructions on iOS Safari, hidden elsewhere / once installed / inside a Mini App. Shown under the logged-out login card and at the bottom of Settings. - **Landing**: a third entry linking `/app/` (the brand tile), with a caption under all three (Telegram / VK / Веб-версия). ## Feasibility note One-tap install (`beforeinstallprompt`) is **Chromium-only**. iOS Safari has no programmatic install (manual Share → Add to Home Screen only); Firefox has none on desktop. The CTA adapts per platform accordingly. ## Safety The service worker is **navigation-only** (network-first, cached-shell fallback); hashed assets and the Connect stream are untouched. Registered **web-only** (skipped in Mini Apps and the mock build). It is the single growth point for a future opt-in offline mode (documented in ARCHITECTURE §13). ## Tests `pwa.ts` unit tests; a `webui` probe (manifest/sw.js content-type + the SPA-fallback-to-HTML trap); e2e for the one-tap CTA, the iOS instructions modal and the landing web entry. Local: `pnpm check` + `test:unit` + `build` green; `go build`/`vet`/`test ./gateway/...` + `gofmt` clean. ## Review on the contour - Chromium desktop/Android: the install CTA one-taps and installs (standalone launch, right icon). - iOS Safari: the CTA opens the instructions modal; manual add yields the apple-touch-icon. - Landing shows three captioned entries; the web one opens `/app/`. - CTA hidden once installed and inside the Telegram/VK Mini Apps.
developer added 1 commit 2026-07-05 19:11:42 +00:00
feat(pwa): installable web app + landing web entry
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 10s
CI / integration (pull_request) Successful in 19s
CI / ui (pull_request) Successful in 1m8s
CI / conformance (pull_request) Successful in 9s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m43s
51147a1429
Make the web SPA an installable PWA and surface it to users:

- manifest.webmanifest + an install-only service worker + 192/512/maskable
  icons (ui/public); PWA head tags in index.html; the .webmanifest MIME type
  registered in the gateway (the distroless image has no /etc/mime.types).
- Platform-adaptive install CTA (components/InstallApp.svelte + lib/pwa):
  one-tap on Chromium, manual Add-to-Home-Screen instructions on iOS Safari,
  hidden elsewhere / once installed / inside a Mini App. Shown under the
  logged-out login card and at the bottom of Settings.
- The landing gains a third entry linking /app/ (the brand tile), with a
  caption under all three (Telegram / VK / Веб-версия).

The service worker is navigation-only (network-first, cached-shell fallback);
hashed assets and the Connect stream are untouched. It exists to satisfy
Chromium's installability requirement and is the single growth point for a
future opt-in offline mode.

Tests: pwa.ts unit tests; a webui probe (manifest/sw.js content-type + the
SPA-fallback-to-HTML trap); e2e for the one-tap CTA, the iOS instructions
modal and the landing web entry. Docs: ARCHITECTURE §13, FUNCTIONAL (+ru),
gateway README.
developer force-pushed feature/pwa-install-cta from 990cb4a68d to 51147a1429 2026-07-05 19:11:42 +00:00 Compare
owner approved these changes 2026-07-05 19:33:54 +00:00
developer merged commit d19609f87d into development 2026-07-05 19:36:37 +00:00
developer deleted branch feature/pwa-install-cta 2026-07-05 19:36:38 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: developer/scrabble-game#184