Onboarding step 3: notifications and finishing onboarding
CI / ci (push) Successful in 2m17s
CI / ci (pull_request) Successful in 2m20s

Step 3 explains what MealQuest notifies about, shows the iOS install hint
and offers "Turn on notifications" and "Maybe later". Either one PATCHes
onboarding_completed and goes Home, ending the first-run redirect.
"Turn on notifications" first calls an injectable enableNotifications(),
a no-op answering "unavailable" until Feature 19 wires Web Push; nothing
asks for notification permission.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-06 17:42:52 -04:00
co-authored by Claude Opus 5.5
parent f53c33e456
commit d100f3e74a
6 changed files with 440 additions and 12 deletions
+8 -1
View File
@@ -489,7 +489,14 @@ First run: while `household_settings.onboarding_completed_at` (read from
`/onboarding`. Onboarding is a full screen outside the app shell, in three
steps: the welcome (`/onboarding`), the Regulars (`/onboarding/regulars`,
mock 1h, adding and archiving through the dinners API optimistically) and
notifications (`/onboarding/notifications`). Offline on the saved pages the
notifications (`/onboarding/notifications`: what MealQuest notifies about,
the iOS install hint, "Turn on notifications" and "Maybe later"). Either
button sends `PATCH /api/v1/settings/household` with
`{"onboarding_completed": true}`; the server sets `onboarding_completed_at`
to the time of that update (keeping the first time if it is already set;
the field itself is read-only and `false` is refused) and the app goes Home.
Notification permission is never asked for on page load; until Feature 19
wires Web Push, "Turn on notifications" asks for nothing. Offline on the saved pages the
settings cannot be read (the service worker never caches `/api/v1/settings`),
so the saved pages open as they are.