Skip to content

Fix iOS link confirmation in Mobile E2E - #2938

Merged
ymichael merged 2 commits into
mainfrom
bb/ci-flake-fix-mobile-e2e-native-link-confirmation-thr_35897dy9u5
Sep 8, 2026
Merged

ymichael merged 2 commits into
mainfrom
bb/ci-flake-fix-mobile-e2e-native-link-confirmation-thr_35897dy9u5

Conversation

@ymichael

@ymichael ymichael commented Sep 2, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

On a fresh iOS simulator, Maestro reports openLink: "bb://threads" complete before the operating system's first custom-scheme confirmation has been accepted. The app remains behind the native Open in “bb”? dialog while shell-deep-link waits for shell-webview; that simulator-owned dialog survives the next flow's app stop and launch, so later flows cannot see their native screens. The original and prior scheduled evidence show that exact sequence: run 33637452626 and run 33517924818.

After this PR was labeled, run 34273156200 checked out the PR merged with newer main and exposed a second deterministic blocker introduced by #2881: the first-run Get notified when a thread needs you? action sheet covered an otherwise rendered shell after every direct-server pairing. That explains why shell-launch now failed before any deep link. Its artifact shows the sheet in all three failed-flow screenshots; clear-open-confirmation passed after each failure and shell-unreachable-server passed, proving the PR's fail-closed cleanup prevented native state from leaking. Every scheduled main run since #2881 merged shows the same new shell-launch failure, so this recurrence is current-main flow orchestration, not infrastructure.

What changed

  • Route every Mobile E2E bb:// action through one parameterized Maestro subflow. It preserves the real custom-scheme invocation, conditionally accepts the native confirmation only when visible on iOS, and proves the dialog is absent before route assertions continue.
  • Make the existing direct-server pairing subflow own the post-connect UI boundary. It uses the unchanged 30-second readiness budget to wait for either the notification opt-out or rendered page content, conditionally chooses Not now, proves the sheet is absent, and keeps the shell-webview assertion.
  • Have shell-launch, shell-deep-link, and shell-send use that one pairing boundary instead of duplicating pairing. The notifications deep-link added by Add mobile push notifications to the bb app #2881 also uses the custom-scheme helper.
  • After a failed CI flow, preserve the original final screenshot, cancel and verify removal of the native confirmation, and stop the app before continuing. If cleanup cannot establish isolation, the runner stops before the next flow.
  • Add regression coverage for cleanup-before-continuation, fail-closed cleanup failure, shared pairing, and the absence of direct bb:// Maestro commands.
  • No assertion, timeout, polling budget, or retry budget increased. No server/host-daemon wire, CLI, SDK, or user-facing configuration changed, so HOST_DAEMON_PROTOCOL_VERSION is unchanged.

How you verified

  • Mandatory initial fresh-main gate: clean worktree; HEAD, origin/main, and merge-base all independently verified as ab8e0a202c70525c3c935733300198dac617e3de before task inspection.
  • Before the follow-up edit, fetched and recorded live origin/main as 06047280e04e6ce57554052ec788a1c5defe7d1e, with PR head 5f2f960c2c289518b8493dece775f4f22103f722 and retained merge-base ab8e0a202c70525c3c935733300198dac617e3de; then rebased cleanly. Current PR merge-base is 06047280e04e6ce57554052ec788a1c5defe7d1e.
  • Native red: run 34273156200 failed shell-launch, shell-deep-link, and shell-send at shell-webview; its screenshots show the notification action sheet over the rendered shell. The new cleanup passed after every failure, and shell-unreachable-server passed.
  • Original focused runner red on pre-fix main: 2/2 tests failed because cleanup was never invoked and the next flow always ran.
  • Focused green: pnpm exec turbo run test --filter=@bb/mobile --force --concurrency=2 -- --run src/lib/e2e/mobile-e2e-flows.test.ts src/lib/e2e/ci-run-flows.test.ts — 2 files, 4 tests passed.
  • pnpm exec turbo run test --filter=@bb/mobile --force --concurrency=2 — 46 files, 331 tests passed.
  • pnpm exec turbo run typecheck --filter=@bb/mobile --force --concurrency=2 — passed.
  • pnpm exec turbo run lint --filter=@bb/mobile --force --concurrency=2 — passed with two pre-existing React warnings and zero errors.
  • pnpm exec turbo run build --filter=@bb/app --force --concurrency=2 — passed after a frozen-lockfile install refreshed dependencies for current main; 439 files precompressed.
  • bash -n, Ruby YAML parsing for every changed Maestro file, targeted oxfmt --check, git diff --check, and the no-direct-bb:// scan passed. ShellCheck is unavailable on this host.
  • Ordinary CI run 34277221769 passed on commit 1594a59a2b2ccf1c17645200f2fb0db522e8861c, including build/typecheck/lint, package tests, all app test shards, server, integration, and Linux/macOS package smoke.
  • All local build, test, typecheck, lint, and install commands ran with explicit process-group deadlines on Intel host host_nwqfteeqz4 (x86_64, Intel Core i5-1038NG7). A final cwd audit found one stale earlier Xcode-discovery process group, terminated it, and then proved no task build, test, backend, fixture, Maestro, or simulator process remained. Temporary artifacts and logs were moved recoverably to Trash.
  • This host has Command Line Tools only, with no Xcode app, iOS runtime, or Maestro, so no after-change simulator result is claimed. The mobile-e2e label was removed before the updated push; run 34277221938 therefore skipped without starting a simulator.

AGENT GENERATED: by GPT-5.6-Sol.

@ymichael ymichael added the mobile-e2e Run the iOS simulator Maestro flows on this PR label Sep 8, 2026
@blacksmith-sh

This comment has been minimized.

@ymichael ymichael removed the mobile-e2e Run the iOS simulator Maestro flows on this PR label Sep 8, 2026
@ymichael
ymichael force-pushed the bb/ci-flake-fix-mobile-e2e-native-link-confirmation-thr_35897dy9u5 branch from 5f2f960 to 1594a59 Compare September 8, 2026 20:51
@ymichael
ymichael merged commit 51f4c92 into main Sep 8, 2026
16 checks passed
@ymichael
ymichael deleted the bb/ci-flake-fix-mobile-e2e-native-link-confirmation-thr_35897dy9u5 branch September 8, 2026 21:26
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