wealth/docs/decisions/0047-pwa-install-offer.md

978 B

0047 The pwa lib keeps the install offer; install lives in حساب کاربری

Status: Proposed · Area: architecture · Date: 2026-10-09 · Decided by: agent

Context

J12-4 offers «نصب اپلیکیشن» from the account page and once on خانه (J12-4d). lib-pwa lists a custom install prompt as out of the lib.

Decision

  • The pwa lib captures beforeinstallprompt/appinstalled from the client bootstrap and exposes {canInstall, installed, isIOS, isStandalone} and promptInstall().
  • /account/install shows the prompt, iOS steps, or the installed state. InstallPrompt on bull's خانه shows from the second visit, only when the browser offered install, never on iOS or inside the app; «بعداً» snoozes it 30 days per device.
  • The manifest starts the installed app at /feed (id /).

Alternatives

  • Browser's own mini-infobar only: no iOS help, no snooze.

Consequences

App icons are placeholders until the designer delivers them.