Skip to content

feat(app): first-run onboarding flow - #9

Merged
shroominic merged 2 commits into
mainfrom
feat/onboarding
Aug 12, 2026
Merged

feat(app): first-run onboarding flow#9
shroominic merged 2 commits into
mainfrom
feat/onboarding

Conversation

@shroominic

Copy link
Copy Markdown
Owner

TASK-007 — first-run onboarding

A light, skippable first-run onboarding for OpenGlucose, in the wellness / local-first / privacy framing (not a medical device).

Screens

  1. Welcome — what OpenGlucose is: open-source, local-first, your data stays on your phone; wellness/self-experimentation (with a plain not-a-medical-device disclaimer).
  2. How it works — apply the Aidex X sensor, ~1h warm-up, a reading every minute.
  3. Set your target range — unit-aware RangeSlider, defaults 70–180 mg/dL (≈ 3.9–10 mmol/L), changeable later.
  4. You're all set — connect-your-sensor handoff into the existing scan/connect flow.

Skippable from any intro step. onboarding_completed (plus the chosen target range, stored in mg/dL) persists in shared_preferences via a self-contained OnboardingStore; onboarding shows only on first launch.

Scope / shared files

  • New files under openhealth/lib/src/onboarding/ (onboarding_flow.dart, onboarding_store.dart).
  • The only shared-file change is a small, clearly delimited launch gate in main.dart (// --- TASK-007 onboarding gate ---), kept minimal/separable to ease merging with the mock-harness main.dart work.
  • Dashboard, chart, settings, and demo_driver untouched.

Verification

  • flutter analyze clean (only a pre-existing info in live_activity_payload.dart).
  • flutter test — 23 passing, incl. new tests for the gate, completion persistence, full screen flow, and skip.
  • Simulator (iPhone 15 Pro, --dart-define=OG_DEMO=true): onboarding shows on first run, flows through all four screens incl. range pick, hands off to the populated demo dashboard. Re-launch (prefs intact) goes straight to the dashboard — onboarding does not show again.

Screenshots (captured locally): welcome, how-it-works, target-range, connect, dashboard-after-handoff, relaunch-skips-onboarding — at /tmp/og-onboarding-{1-welcome,2-howitworks,3-range,4-connect,5-dashboard,6-relaunch}.png.

Stacking

Stacked on #4 (feat/sim-demo-mode). Will rebase onto main after #4 merges.

Refs: TASK-007

🤖 Generated with Claude Code

shroominic and others added 2 commits June 23, 2026 19:24
…ator testing

Add a compile-time OG_DEMO build flag (--dart-define=OG_DEMO=true) so
native/simulator builds run the in-memory DemoCgmDriver instead of the
real BLE Aidex driver, and auto-scan + auto-connect on launch so the app
lands directly on the populated dashboard. The iOS simulator has no
Bluetooth, so this unblocks simulator-based feature verification.

When the flag is false (the default), behavior is unchanged: production
builds keep using the real AidexSensorDriver and the manual scan flow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Introduce a light, skippable first-run onboarding for OpenGlucose:
welcome (open-source, local-first, wellness-not-medical), how it works
(apply Aidex X, ~1h warm-up, reading every minute), a unit-aware target
range picker (defaults 70-180 mg/dL), and a connect-your-sensor handoff.

Onboarding state and the chosen target range persist in
shared_preferences via OnboardingStore; the flow shows only on first
launch and hands off to the existing scan/connect flow on completion or
skip. The launch gate in main.dart is a small, clearly delimited block.

Adds widget/unit tests for the gate, completion persistence, the full
screen flow, and skip.

Refs: TASK-007

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@shroominic
shroominic changed the base branch from feat/sim-demo-mode to main August 12, 2026 17:22
@shroominic
shroominic merged commit e114739 into main Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant