Skip to content

test(app): record visual-audit pages as one simulator walk - #24492

Merged
Git-on-my-level merged 5 commits into
lane/ui-junk-auditfrom
lane/demo-walk-tooling
Nov 4, 2026
Merged

Git-on-my-level merged 5 commits into
lane/ui-junk-auditfrom
lane/demo-walk-tooling

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Summary

  • One command, 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 with simctl.
  • Upgrade on that walk, and the settings-plans-ready scenario, render a local plan catalog. There is no StoreKit charge and no payment request. Production UsageProvider is unchanged.

Test plan

  • flutter test test/visual_audit/demo_billing_test.dart
  • flutter test --name 'settings-plans-ready|memories-locked|conversation-iphone-summary' test/visual_audit/visual_audit_smoke_test.dart
  • OMI_DEMO_WALK_HOLD_MS=40 flutter test -d flutter-tester integration_test/visual_audit/demo_walk_test.dart
  • app/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

  • INV-NAV-1
  • INV-MEM-1

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.

View guided diff Turn on auto-fix

Git-on-my-level and others added 2 commits November 3, 2026 04:37
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]>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-03T09:53:13.862202Z
We couldn’t complete this review. Comment @codex review to try again.
2497773 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 issues found across 14 files

Confidence score: 3/5

  • The simulator walk stops when harness.dart writes the host-only marker path, so the reporter-log fallback never gets a chance to continue it. Catch FileSystemException or skip marker writes on mobile.
  • flutter_test_config.dart also installs QuietWalkBinding for capture_test.dart, changing the existing headless PNG audit’s binding and timer behavior. Restrict it to demo_walk_test.dart.
  • demo_billing.dart omits required price_string fields, so tapping Continue throws before the no-op checkout runs. Add a formatted price to each _price result.
  • With --hold-ms, demo_walk.sh tries to execute the environment assignment as a command, so the walk never starts. Invoke env for the optional assignment or branch when hold is 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Suggested change
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.
}

Comment thread app/e2e/SKILL.md

```bash
app/scripts/demo_walk.sh --list
app/scripts/demo_walk.sh --walk ui-cleanup --out /tmp/omi-demo-walk.mp4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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())],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Comment on lines +118 to +120
if (target <= position.maxScrollExtent) {
position.animateTo(target, duration: const Duration(milliseconds: 800), curve: Curves.easeOut);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Suggested change
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);
}

Comment thread app/scripts/demo_walk.sh
cd "$app_dir"
OMI_DEMO_WALK="$walk" \
OMI_DEMO_WALK_MARKER="$marker" \
${hold:+OMI_DEMO_WALK_HOLD_MS="$hold"} \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Suggested change
${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();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Git-on-my-level and others added 3 commits November 3, 2026 07:36
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.
@Git-on-my-level
Git-on-my-level merged commit f295b0b into lane/ui-junk-audit Nov 4, 2026
11 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/demo-walk-tooling branch November 4, 2026 07:53
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