Repository navigation
test(app): record visual-audit pages as one simulator walk - #24492
Conversation
A named walk reuses the audit scenarios, pushes real routes, and records them with one command. The plans sheet in that walk and in tests uses a local catalog, so Upgrade does not charge StoreKit or miss UsageProvider. Production billing is unchanged. Co-authored-by: Cursor <[email protected]>
The walk and the plans catalog live in tests. Production billing and the shipped UI are unchanged. Co-authored-by: Cursor <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
7 issues found across 14 files
Confidence score: 3/5
- The simulator walk stops when
harness.dartwrites the host-only marker path, so the reporter-log fallback never gets a chance to continue it. CatchFileSystemExceptionor skip marker writes on mobile. flutter_test_config.dartalso installsQuietWalkBindingforcapture_test.dart, changing the existing headless PNG audit’s binding and timer behavior. Restrict it todemo_walk_test.dart.demo_billing.dartomits requiredprice_stringfields, so tapping Continue throws before the no-op checkout runs. Add a formatted price to each_priceresult.- With
--hold-ms,demo_walk.shtries to execute the environment assignment as a command, so the walk never starts. Invokeenvfor the optional assignment or branch whenholdis set.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="app/e2e/SKILL.md">
<violation number="1" location="app/e2e/SKILL.md:545">
P2: The primary example is not portable across valid iOS simulator setups: without `--device`, the script only selects an available `iPhone 17 Pro`. Document that prerequisite or make automatic selection support any suitable simulator.</violation>
</file>
<file name="app/integration_test/visual_audit/scenarios/settings_pages.dart">
<violation number="1" location="app/integration_test/visual_audit/scenarios/settings_pages.dart:105">
P2: This scenario does not disable the storefront feature flag, so an enabled `mobile-plan-storefront` rollout bypasses `DemoBillingUsage` and loads the live storefront instead of the local catalog. Inject a deterministic `readStorefrontGate: () async => false` into `PlansSheet` for this demo host.</violation>
</file>
<file name="app/integration_test/visual_audit/walks.dart">
<violation number="1" location="app/integration_test/visual_audit/walks.dart:118">
P2: The walkthrough can record the plans sheet before `Omi Pro` is visible when the catalog’s maximum scroll is less than 520 pixels. Clamp the target to `maxScrollExtent` and await the animation so the catalog is actually brought into view.</violation>
</file>
<file name="app/integration_test/visual_audit/harness.dart">
<violation number="1" location="app/integration_test/visual_audit/harness.dart:121">
P1: The simulator walk fails when `walkLog` writes the host-only marker path. Catch `FileSystemException` (or skip marker writes on mobile) so the existing reporter-log fallback can let the walk continue.</violation>
</file>
<file name="app/scripts/demo_walk.sh">
<violation number="1" location="app/scripts/demo_walk.sh:156">
P2: Passing `--hold-ms` makes the shell try to execute `OMI_DEMO_WALK_HOLD_MS=<value>`, so the walk never starts. Invoke `env` explicitly for the optional assignment or branch the command when `hold` is set.</violation>
</file>
<file name="app/integration_test/visual_audit/flutter_test_config.dart">
<violation number="1" location="app/integration_test/visual_audit/flutter_test_config.dart:8">
P2: This directory-wide config installs the live walk binding for `capture_test.dart` too, changing the existing headless PNG audit's binding and timer behavior. Restrict `QuietWalkBinding` to `demo_walk_test.dart` (for example with a demo-only config/guard) so capture keeps its automated binding.</violation>
</file>
<file name="app/integration_test/visual_audit/demo_billing.dart">
<violation number="1" location="app/integration_test/visual_audit/demo_billing.dart:105">
P2: The demo catalog omits required `price_string` fields, so pressing Continue throws while parsing the selected offer before the no-op checkout stub runs. Add the required formatted price to each `_price` result.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| final marker = Platform.environment['OMI_DEMO_WALK_MARKER']; | ||
| if (marker == null || marker.isEmpty) return; | ||
| if (message == 'DEMO_WALK_READY' || message == 'DEMO_WALK_DONE') { | ||
| File(marker).writeAsStringSync('$message\n', flush: true); |
There was a problem hiding this comment.
P1: The simulator walk fails when walkLog writes the host-only marker path. Catch FileSystemException (or skip marker writes on mobile) so the existing reporter-log fallback can let the walk continue.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/integration_test/visual_audit/harness.dart, line 121:
<comment>The simulator walk fails when `walkLog` writes the host-only marker path. Catch `FileSystemException` (or skip marker writes on mobile) so the existing reporter-log fallback can let the walk continue.</comment>
<file context>
@@ -97,9 +97,34 @@ class LoopbackOnly extends HttpOverrides {
+ final marker = Platform.environment['OMI_DEMO_WALK_MARKER'];
+ if (marker == null || marker.isEmpty) return;
+ if (message == 'DEMO_WALK_READY' || message == 'DEMO_WALK_DONE') {
+ File(marker).writeAsStringSync('$message\n', flush: true);
+ }
+}
</file context>
| File(marker).writeAsStringSync('$message\n', flush: true); | |
| try { | |
| File(marker).writeAsStringSync('$message\n', flush: true); | |
| } on FileSystemException { | |
| // Device test isolates cannot access host marker paths. | |
| } |
|
|
||
| ```bash | ||
| app/scripts/demo_walk.sh --list | ||
| app/scripts/demo_walk.sh --walk ui-cleanup --out /tmp/omi-demo-walk.mp4 |
There was a problem hiding this comment.
P2: The primary example is not portable across valid iOS simulator setups: without --device, the script only selects an available iPhone 17 Pro. Document that prerequisite or make automatic selection support any suitable simulator.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/e2e/SKILL.md, line 545:
<comment>The primary example is not portable across valid iOS simulator setups: without `--device`, the script only selects an available `iPhone 17 Pro`. Document that prerequisite or make automatic selection support any suitable simulator.</comment>
<file context>
@@ -532,6 +532,35 @@ widgets by stable `Key`s, and keep `expect(...)` checks that prove the intended
+
+```bash
+app/scripts/demo_walk.sh --list
+app/scripts/demo_walk.sh --walk ui-cleanup --out /tmp/omi-demo-walk.mp4
+app/scripts/demo_walk.sh --walk ui-cleanup --device <UDID> --out /tmp/omi-demo-walk.mp4
+```
</file context>
| run: (a) async { | ||
| await a.pumpHost( | ||
| (context) => showOmiSheet(context: context, padding: EdgeInsets.zero, builder: (_) => _PlansHost()), | ||
| providers: [ChangeNotifierProvider<UsageProvider>(create: (_) => DemoBillingUsage())], |
There was a problem hiding this comment.
P2: This scenario does not disable the storefront feature flag, so an enabled mobile-plan-storefront rollout bypasses DemoBillingUsage and loads the live storefront instead of the local catalog. Inject a deterministic readStorefrontGate: () async => false into PlansSheet for this demo host.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/integration_test/visual_audit/scenarios/settings_pages.dart, line 105:
<comment>This scenario does not disable the storefront feature flag, so an enabled `mobile-plan-storefront` rollout bypasses `DemoBillingUsage` and loads the live storefront instead of the local catalog. Inject a deterministic `readStorefrontGate: () async => false` into `PlansSheet` for this demo host.</comment>
<file context>
@@ -97,15 +89,31 @@ final settingsPagesScenarios = <AuditScenario>[
+ run: (a) async {
+ await a.pumpHost(
+ (context) => showOmiSheet(context: context, padding: EdgeInsets.zero, builder: (_) => _PlansHost()),
+ providers: [ChangeNotifierProvider<UsageProvider>(create: (_) => DemoBillingUsage())],
+ );
+ final list = find.descendant(of: find.byType(PlansSheet), matching: find.byType(Scrollable));
</file context>
| if (target <= position.maxScrollExtent) { | ||
| position.animateTo(target, duration: const Duration(milliseconds: 800), curve: Curves.easeOut); | ||
| } |
There was a problem hiding this comment.
P2: The walkthrough can record the plans sheet before Omi Pro is visible when the catalog’s maximum scroll is less than 520 pixels. Clamp the target to maxScrollExtent and await the animation so the catalog is actually brought into view.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/integration_test/visual_audit/walks.dart, line 118:
<comment>The walkthrough can record the plans sheet before `Omi Pro` is visible when the catalog’s maximum scroll is less than 520 pixels. Clamp the target to `maxScrollExtent` and await the animation so the catalog is actually brought into view.</comment>
<file context>
@@ -0,0 +1,123 @@
+ if (lists.evaluate().isEmpty) return;
+ final position = tester.state<ScrollableState>(lists.last).position;
+ final target = position.pixels + 520;
+ if (target <= position.maxScrollExtent) {
+ position.animateTo(target, duration: const Duration(milliseconds: 800), curve: Curves.easeOut);
+ }
</file context>
| if (target <= position.maxScrollExtent) { | |
| position.animateTo(target, duration: const Duration(milliseconds: 800), curve: Curves.easeOut); | |
| } | |
| final target = (position.pixels + 520).clamp(0.0, position.maxScrollExtent).toDouble(); | |
| if (target > position.pixels) { | |
| await position.animateTo(target, duration: const Duration(milliseconds: 800), curve: Curves.easeOut); | |
| } |
| cd "$app_dir" | ||
| OMI_DEMO_WALK="$walk" \ | ||
| OMI_DEMO_WALK_MARKER="$marker" \ | ||
| ${hold:+OMI_DEMO_WALK_HOLD_MS="$hold"} \ |
There was a problem hiding this comment.
P2: Passing --hold-ms makes the shell try to execute OMI_DEMO_WALK_HOLD_MS=<value>, so the walk never starts. Invoke env explicitly for the optional assignment or branch the command when hold is set.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/scripts/demo_walk.sh, line 156:
<comment>Passing `--hold-ms` makes the shell try to execute `OMI_DEMO_WALK_HOLD_MS=<value>`, so the walk never starts. Invoke `env` explicitly for the optional assignment or branch the command when `hold` is set.</comment>
<file context>
@@ -0,0 +1,228 @@
+ cd "$app_dir"
+ OMI_DEMO_WALK="$walk" \
+ OMI_DEMO_WALK_MARKER="$marker" \
+ ${hold:+OMI_DEMO_WALK_HOLD_MS="$hold"} \
+ flutter test -d "$device" --flavor dev integration_test/visual_audit/demo_walk_test.dart --reporter expanded
+) >"$log" 2>&1 &
</file context>
| ${hold:+OMI_DEMO_WALK_HOLD_MS="$hold"} \ | |
| env ${hold:+OMI_DEMO_WALK_HOLD_MS="$hold"} \ |
| /// Installed before the test runner's IntegrationTestWidgetsFlutterBinding.ensureInitialized, | ||
| /// so the walk uses [QuietWalkBinding] instead of the binding that paints the tap crosshair. | ||
| Future<void> testExecutable(FutureOr<void> Function() testMain) async { | ||
| QuietWalkBinding(); |
There was a problem hiding this comment.
P2: This directory-wide config installs the live walk binding for capture_test.dart too, changing the existing headless PNG audit's binding and timer behavior. Restrict QuietWalkBinding to demo_walk_test.dart (for example with a demo-only config/guard) so capture keeps its automated binding.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/integration_test/visual_audit/flutter_test_config.dart, line 8:
<comment>This directory-wide config installs the live walk binding for `capture_test.dart` too, changing the existing headless PNG audit's binding and timer behavior. Restrict `QuietWalkBinding` to `demo_walk_test.dart` (for example with a demo-only config/guard) so capture keeps its automated binding.</comment>
<file context>
@@ -0,0 +1,10 @@
+/// Installed before the test runner's IntegrationTestWidgetsFlutterBinding.ensureInitialized,
+/// so the walk uses [QuietWalkBinding] instead of the binding that paints the tap crosshair.
+Future<void> testExecutable(FutureOr<void> Function() testMain) async {
+ QuietWalkBinding();
+ await testMain();
+}
</file context>
| 'title': title, | ||
| 'interval': interval, | ||
| 'unit_amount': amount, | ||
| 'currency': 'usd', |
There was a problem hiding this comment.
P2: The demo catalog omits required price_string fields, so pressing Continue throws while parsing the selected offer before the no-op checkout stub runs. Add the required formatted price to each _price result.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/integration_test/visual_audit/demo_billing.dart, line 105:
<comment>The demo catalog omits required `price_string` fields, so pressing Continue throws while parsing the selected offer before the no-op checkout stub runs. Add the required formatted price to each `_price` result.</comment>
<file context>
@@ -0,0 +1,107 @@
+ 'title': title,
+ 'interval': interval,
+ 'unit_amount': amount,
+ 'currency': 'usd',
+ 'is_active': false,
+ };
</file context>
The walk was opening the provenance chip alone, so it sat in the top left. The beat now opens the conversation summary, and the tap holds the explanation under that line. Co-authored-by: Cursor <[email protected]>
Drop an unused provider import, a redundant material import, and a null assertion the type promotion already covers.
The sheet treats a past period end as already ended. A frozen 2026-11-03 midnight now fails that check on CI.
Summary
app/scripts/demo_walk.sh, boots one iOS simulator, plays a named list of visual-audit scenarios as real route pushes, and records the walk withsimctl.settings-plans-readyscenario, render a local plan catalog. There is no StoreKit charge and no payment request. ProductionUsageProvideris unchanged.Test plan
flutter test test/visual_audit/demo_billing_test.dartflutter test --name 'settings-plans-ready|memories-locked|conversation-iphone-summary' test/visual_audit/visual_audit_smoke_test.dartOMI_DEMO_WALK_HOLD_MS=40 flutter test -d flutter-tester integration_test/visual_audit/demo_walk_test.dartapp/scripts/demo_walk.sh --walk ui-cleanup --device 5E1E4C93-A65E-40C6-B571-79BE19FA5671 --out /Users/david/.hermes/cache/scratch/pr-24397-demo/ios-ui-walkthrough.mp4(44s, 21.7 fps, plans sheet shows Omi Pro, no red error screen, no tap crosshair)Product invariants affected
These match files already on the parent lane (
lane/ui-junk-audit/ #24397). This PR does not change navigation chrome or memory tiers.UI-Evidence: none -- product UI evidence is on #24397; this PR is the walk tooling and the video is on that PR's comment.
Failure class (fixes)
Failure-Class: FC-decoded-outcome-discarded-before-canonical-record
The
fix:commit in the range against main is the parent lane's Dream-edit fix, already declared on #24397. This PR does not add another fix.Base
Opened against
lane/ui-junk-audit. This branch was cut from that lane, so the diff is the walk tooling and the test catalog, not the UI cleanup already in #24397.