feat(app): first-run onboarding flow - #9
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
RangeSlider, defaults 70–180 mg/dL (≈ 3.9–10 mmol/L), changeable later.Skippable from any intro step.
onboarding_completed(plus the chosen target range, stored in mg/dL) persists inshared_preferencesvia a self-containedOnboardingStore; onboarding shows only on first launch.Scope / shared files
openhealth/lib/src/onboarding/(onboarding_flow.dart,onboarding_store.dart).main.dart(// --- TASK-007 onboarding gate ---), kept minimal/separable to ease merging with the mock-harnessmain.dartwork.Verification
flutter analyzeclean (only a pre-existing info inlive_activity_payload.dart).flutter test— 23 passing, incl. new tests for the gate, completion persistence, full screen flow, and skip.--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 ontomainafter #4 merges.Refs: TASK-007
🤖 Generated with Claude Code