feat(app): OG_DEMO flag to run demo driver on native builds for simulator testing - #4
Open
shroominic wants to merge 1 commit into
Open
feat(app): OG_DEMO flag to run demo driver on native builds for simulator testing#4shroominic wants to merge 1 commit into
shroominic wants to merge 1 commit into
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>
This was referenced Jun 23, 2026
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.
What this does
Adds a compile-time
OG_DEMObuild flag so native / iOS-simulator builds run the in-memoryDemoCgmDriverinstead of the real BLE Aidex driver, and auto-scan + auto-connect on launch so the app opens straight onto the populated dashboard.The iOS simulator has no Bluetooth, so without this the app is stuck on the empty "0 sensors" scan view. This flag makes the whole feature fleet able to verify features in the simulator.
driver_factory_io.dart: whenOG_DEMO=true, returnDemoCgmDriver; otherwise unchanged (realAidexSensorDriver).main.dart: whenOG_DEMO=true, after bootstrap, scan and connect to the first demo sensor (the demo driver only yields its sensor after a scan). Skipped if a persisted session is already restoring. Strictly gated behind the flag.test/og_demo_flag_test.dartasserting the factory selects the demo driver under the flag and the real driver otherwise.Flag defaults to
false— production builds are untouched (real BLE driver, manual scan flow).Why merge first
This is the simulator-verification prerequisite that the rest of the feature fleet builds on. It should merge first so other feature agents can run their work in the simulator.
Verification command
Results
--dart-define=OG_DEMO=true): app lands directly on the populated dashboard —AiDEX Demo 07A12, 106 mg/dL, Connected, history chart + recent readings. Screenshot captured locally at/tmp/og-demo-dashboard.png.flutter build ios --simulator --debug: builds clean, uses real driver.flutter analyze: clean (the only remaininginfois pre-existing inlive_activity_payload.dart, untouched).flutter test: passes — both default and--dart-define=OG_DEMO=true.🤖 Generated with Claude Code