Skip to content

fix(mobile): fail an open of an app the device does not have as TEST_SETUP_FAILED - #2286

Open
karolkulesza wants to merge 26 commits into
e2e-inc:mainfrom
karolkulesza:fix/ios-app-not-installed
Open

karolkulesza wants to merge 26 commits into
e2e-inc:mainfrom
karolkulesza:fix/ios-app-not-installed

Conversation

@karolkulesza

@karolkulesza karolkulesza commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What

  • Opening an app the device doesn't have now fails with TEST_SETUP_FAILED (exit 2) when agent-device reports APP_NOT_INSTALLED. That covers Android launches, iOS display names, an iOS simulator's app.clearState(), and an app-targeted device.setPermission(), plus app.open(), app.restart(), device.openApp() and device.openLink() into that app.
  • The message names the app and the device, and tells you to install it (device.installApp() for the target's own build) or check the bundle id.
  • Not fixed here, still ENGINE_FAILURE: a launch of a missing dotted iOS bundle id (simulator or physical device) and an Android openLink bound to a missing package. agent-device starts these without an install check. A custom-scheme openLink on iOS is handed to the OS rather than launched as the named app; the OS routes the URL to whichever app handles the scheme, so it never reports a missing app.

Why

  • A missing app is a setup mistake, not a device fault, and agent-device's advice (Run install before open) points at its own CLI.
  • On an iOS simulator, agent-device skips its install check for a dotted bundle id and goes straight to simctl launch. When that fails it works out APP_NOT_INSTALLED but only sets details.hint and rethrows COMMAND_FAILED. I dropped the hint text match, since every other classification in errors.ts keys on a code. The simulator case needs agent-device to throw APP_NOT_INSTALLED; after a pin bump this PR picks it up unchanged.

How it works

  1. notInstalledCause (packages/mobile/src/errors.ts) accepts APP_NOT_INSTALLED only.
  2. appNotInstalled turns that failure into a ConfigurationError('TEST_SETUP_FAILED') and keeps the agent-device error as cause.
  3. The surface's open(), openLink() into a named app, setPermission and clearState pass their failures through it. open_app still reads isAppNotInstalled, so a wrong app returns INVALID_ARGUMENT to the model.

Issue

Refs #2281

Verified

  • pnpm --filter @e2e-dev/mobile typecheck and the engine, tools and errors unit tests pass at 0a6684d. docs:check-errors passes.
  • Each of the four wraps (open, openLink, setPermission, clearState) has a unit test from APP_NOT_INSTALLED; reverting one fails it.
  • Not run: a live iOS simulator or Android emulator on this head. An earlier run of the first version of this change on an iPhone 17 Pro simulator showed the iOS open going to TEST_SETUP_FAILED through the hint match, which is gone now. The APP_NOT_INSTALLED path comes from unit tests and agent-device's source.

Checklist

  • Changeset added (pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only.
  • Breaking change: title carries !, the changeset body names what breaks and what replaces it, and the deprecation warning landed a window earlier (stability policy in CONTRIBUTING.md).
  • Docs updated in the same PR: the docs/**/*.mdx page for the behavior, and skills/e2e/ if the skill describes it.
  • Contract change: emitted .d.ts reviewed, tests/types/sdk-types.ts updated; wire change edits the schema and both fixtures.
  • Engine contract change (e2e/engine): changesets for e2e, @e2e-dev/web, and @e2e-dev/mobile.

Summary by CodeRabbit

  • Bug Fixes

    • App operations now report TEST_SETUP_FAILED with the app name and installation guidance when the target app isn’t installed. This applies to opening apps, changing app permissions, opening links for a known app, and clearing app state.
    • Missing iOS bundle IDs and Android packages that fail without an installation check continue to report ENGINE_FAILURE.
  • Documentation

    • Expanded mobile troubleshooting and reference guidance to explain these errors and how to resolve installation issues.

…SETUP_FAILED

agent-device reports an iOS simulator launch of a missing bundle as
COMMAND_FAILED with only a hint saying why, so the engine surfaced it as
ENGINE_FAILURE (exit 3) with agent-device CLI advice, and the open_app
tool's INVALID_ARGUMENT repair never matched on iOS.

Fixes e2e-inc#2281
@github-actions github-actions Bot added the size:M Up to 99 changed lines, not counting tests, fixtures, translated docs, or the lockfile label Nov 25, 2026

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 9 files

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

View guided diff | Re-trigger cubic

Comment thread docs/reference/mobile.mdx Resolved
Comment thread docs/reference/errors.mdx Resolved
Comment thread packages/mobile/src/surface.ts Resolved
Comment thread docs/mobile.mdx Resolved
@karolkulesza

Copy link
Copy Markdown
Contributor Author

Correction on the surface.ts thread: app.clearState() runs a clear-app-state settings command before open, so my reply was wrong. b1ca88e classifies a missing app there too.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 4 files (changes from recent commits).

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

View guided diff | Re-trigger cubic

Comment thread packages/mobile/src/surface.ts Resolved
Comment thread docs/reference/errors.mdx Resolved

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 5 files (changes from recent commits).

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

View guided diff | Re-trigger cubic

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[claude-opus-5-5] automated review on behalf of @okwasniewski

Reviewed at 6651c12 (main 1642ef2). Issue #2281 is real: agent-device 0.21.42 (and 0.21.43, latest) runs its install check after a failed simctl launch and computes APP_NOT_INSTALLED internally (app-launch.js), then rethrows the original COMMAND_FAILED with only details.hint set. Android (pm path check) and iOS physical devices (devicectl) already throw APP_NOT_INSTALLED. TEST_SETUP_FAILED (configuration, exit 2, blocked: test_setup) is the right code; core has no app-not-installed code, and INVALID_CONFIG would be wrong since the bundle id can be correct and only the install is missing.

Must fix

  • packages/mobile/src/errors.ts:358-366 - the iOS branch classifies by hint.startsWith('The app bundle is not installed on this simulator.'). The project fixes root causes, not text matches: every other classification in this file keys on code or details.reason. Any rewording of that hint upstream silently sends iOS back to ENGINE_FAILURE, and no test here would notice, because the fixtures copy the same string. agent-device already has the classification in hand at the throw site. Suggested fix: send a small agent-device PR that throws APP_NOT_INSTALLED (or sets details.reason) when its post-launch check finds the bundle missing, bump the pin once it ships, and drop IOS_NOT_INSTALLED_HINT. Until then this PR can land with only the APP_NOT_INSTALLED path: that already covers Android, iOS devices, and clearState/setPermission on iOS simulators, which resolve the app before acting.

Should fix

  • surface.ts:968 (setPermission) and surface.ts:1939 (clearState) wraps are untested: reverting either to throw error keeps the mobile unit suite green. Add a case for each with APP_NOT_INSTALLED from settings.update.
  • errors.ts:1-27 - the translation table at the top of the file is the file's map of codes. Add a row for "APP_NOT_INSTALLED on an open, clear-state, or app-targeted permission -> TEST_SETUP_FAILED".

Nits

  • docs/mobile.mdx:878 - the reflowed line runs past the paragraph's wrap width.

Verified: mobile unit tests for errors/tools/engine pass (the one failure is the manifest test needing a built e2e dist, and it fails the same way on main). Mutants: disabling the hint branch fails 3 tests (good); dropping the clearState or setPermission wrap fails none. Read agent-device 0.21.38 and 0.21.43 dist for the iOS simulator and Android throw sites. CI is green at this head. No simulator run (shared machine); the throw path is confirmed from agent-device's source.

@karolkulesza

Copy link
Copy Markdown
Contributor Author

Addressed in 7827e7c:

  • Dropped the hint match. A missing app is classified by APP_NOT_INSTALLED only, so this now covers Android, iOS devices, and open, clearState, and app-targeted setPermission. An iOS simulator open of a missing bundle stays ENGINE_FAILURE until agent-device throws APP_NOT_INSTALLED there; the troubleshooting entry in docs/mobile.mdx says so. The PR description's iOS paragraphs describe the earlier version.
  • Added tests for the setPermission and clearState wraps, both from settings.update.
  • Added the APP_NOT_INSTALLED row to the table at the top of errors.ts, and reflowed the docs line.
  • The changeset no longer claims iOS simulators are fixed.

Mobile unit tests, typecheck and lint pass, apart from tool-pixels.test.ts ('offers pixel verbs after a secret fill'), which I didn't investigate or compare against main. Not re-run on a simulator.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 6 files (changes from recent commits).

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

View guided diff | Re-trigger cubic

@karolkulesza

Copy link
Copy Markdown
Contributor Author

@okwasniewski the requested changes are in, ready for another look when you have time.

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[claude-opus-5-5] automated review on behalf of @okwasniewski

Re-checked at 2d4ee70 (code at 7827e7c). The hint match is gone, notInstalledCause (errors.ts:354) checks only APP_NOT_INSTALLED, the setPermission and clearState wraps are tested (each of the 4 wraps reverted fails 1 to 2 tests), and the table row is in. Thanks. All cubic threads are addressed.

The catch: with the hint match dropped, this no longer fixes the #2281 repro. In agent-device 0.21.42 (pinned) and 0.21.43, a dotted bundle id skips the install check in the app resolver and goes straight to simctl launch. When the launch fails, app-launch works out APP_NOT_INSTALLED but only sets it as details.hint and rethrows the original COMMAND_FAILED. So app.open() with bundleId: 'dev.e2e.missing' on an iOS simulator is still ENGINE_FAILURE. The changeset and docs/mobile.mdx say so honestly. The PR body and reference docs don't.

Must fix

  • PR body: change Fixes #2281 to Refs #2281, and update How and Verified. They still describe the hint match (errors.ts:358) and show the iOS simulator going to TEST_SETUP_FAILED.
  • Reference docs claim the simulator case: docs/reference/mobile.mdx:321 (the target's app.bundleId), docs/reference/errors.mdx:101, and the open_app paragraph near docs/reference/mobile.mdx:1250. Scope them to Android, iOS devices, and display names, or add the same simulator caveat as the changeset.

Should fix

  • docs/mobile.mdx:882 quotes agent-device's hint text to users. That can change upstream. Say it fails as ENGINE_FAILURE until agent-device reports it.
  • Root cause is upstream: agent-device app-launch should throw APP_NOT_INSTALLED when it detects it, not only set the hint. This PR then picks it up after a pin bump with no further change. You offered to raise it upstream, which would be great.

Nits

  • errors.ts:369: isAppNotInstalled could be a type guard and drop the (error as Error) cast. The operation labels read awkwardly ("permission camera grant for Settings failed").
  • The 4 near-identical .catch(...) wraps in surface.ts could share one helper.
  • engine.test.ts:3392 checks 5 operations in one it; it.each would show every failure.
  • docs/mobile.mdx:877-883 lines run 77 to 82 chars; the paragraph wraps near 73. tools.test.ts gains a trailing blank line.

Verified: mobile typecheck clean, unit tests 652/652, CI green. iOS simulator behavior comes from reading agent-device 0.21.42/0.21.43 dist, not a live run.

Maintainer question: land this as a partial fix (Android, iOS devices, display names, clearState, setPermission) under Refs #2281, or hold it for the agent-device change.

@karolkulesza

Copy link
Copy Markdown
Contributor Author

Pushed 4dadd88 (also merges main, which conflicted in docs/mobile.mdx):

  • PR body now says Refs #2281, and How and Verified describe the code as it is.
  • docs/reference/mobile.mdx (the app.open() and device.openApp() rows), docs/reference/errors.mdx, and docs/mobile.mdx scope the claim: an iOS simulator's missing dotted bundle id stays ENGINE_FAILURE. The troubleshooting entry no longer quotes agent-device's hint.
  • isAppNotInstalled is a type guard, so the cast is gone.
  • Not done: the shared helper for the four wraps and it.each for the operations test. They differ in operation label and argument, and the test shares one setup. Say if you want them.

On the question: I'd land this as the partial fix under Refs #2281. I haven't opened the agent-device change yet.

@karolkulesza

Copy link
Copy Markdown
Contributor Author

@okwasniewski the requested changes are in, ready for another look when you have time.

@karolkulesza

Copy link
Copy Markdown
Contributor Author

Android deterministic failed every test, smoke included, with no change to the open path on success (the wraps only rethrow). Same job passed on other PRs at the same time, so I read it as an emulator flake and pushed an empty commit to rerun it, since I can't rerun jobs.

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Automated review (AI triage pass), not yet read by a maintainer.

Reviewed cbbedcd47. Re-check after 4dadd88: the PR body now says Refs #2281 and describes the code-only match, isAppNotInstalled is a type guard, and the app.open(), device.openApp() and errors reference rows carry the iOS simulator caveat. Code is unchanged since the last pass apart from the type guard. Two reference rows still claim the simulator case.

Must fix

  1. docs/reference/mobile.mdx:1376 - the open_app paragraph flagged last round now says TEST_SETUP_FAILED "when it names no app and the app under test is not installed", with no simulator caveat. On an iOS simulator with a dotted app.bundleId (the usual case), agent-device 0.21.43 app-launch only sets details.hint and rethrows COMMAND_FAILED, so this is ENGINE_FAILURE. Add the same caveat as line 321.
  2. docs/reference/mobile.mdx:941 - the new openLink row says "The app the link opens into is not on the device" with no scope. On an iOS simulator, agent-device 0.21.43 sends a custom-scheme link with an app straight to simctl openurl and never checks the install, so this throws COMMAND_FAILED and becomes ENGINE_FAILURE. A web link with launch args, or a relaunch, goes through the same hint-only launch path. Scope this row to Android and iOS devices.

Should fix

  • The squash merge would close #2281 even though the simulator repro is not fixed. The repo squashes with COMMIT_MESSAGES, and commit 89d5951 still says Fixes #2281. Whoever merges must edit the squash message (an author force-push would also clear it).

Nits

  • docs/reference/mobile.mdx:1377 is 91 chars wide. The paragraph wraps near 73.
  • packages/mobile/tests/unit/tools.test.ts still ends with an extra blank line.

CI: all checks are green at 957ce3c, mobile included. The Android failure at a07d5a6 happened during emulator setup (Unable to connect to adb daemon), so it was not caused by this PR, and the empty-commit rerun passed. At cbbedcd (a main merge) the iOS and Android deterministic jobs are still running. Everything else has passed.

Verified: read the PR diff against merge-base c289aff and agent-device 0.21.43 dist/src/app-launch.js (now the pinned version), which has the same hint-only simulator launch path and an openurl path with no install check. No live device run.

For the maintainer

  • Land this as a partial fix under Refs #2281 (Android, iOS devices, display names, clearState, app-targeted setPermission), or wait for agent-device to throw APP_NOT_INSTALLED from its simulator launch. That fix is upstream: nobody has opened it yet. When it ships, this PR covers the simulator after a pin bump with no code change.

@karolkulesza

Copy link
Copy Markdown
Contributor Author

Pushed fca1410: both reference rows now carry the iOS simulator caveat (openLink row and the open_app paragraph, re-wrapped near 73 columns), and the extra blank line in tools.test.ts is gone.

The Fixes #2281 in commit 89d5951 stays. I did not force-push, so whoever merges needs to edit the squash message to Refs #2281. The simulator case is not fixed here.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

View guided diff | Re-trigger cubic

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Automated review (AI triage pass), not yet read by a maintainer.

Reviewed 79b74e50c. Both must-fixes from the last pass are fixed. The docs now match what the code and agent-device 0.21.43 do. Since cbbedcd the only changes are docs and the removal of a trailing blank line.

Fixed since last review

  1. docs/reference/mobile.mdx:1377 - the open_app paragraph now says a dotted bundle id on an iOS simulator is ENGINE_FAILURE, like app.open(). It is wrapped near 73 columns.
  2. docs/reference/mobile.mdx:941 - the openLink row is limited to Android and iOS devices and names the simulator exception. This matches agent-device 0.21.43 app-launch.js. On a simulator, a URL open with an app resolves the app without an install check for a dotted id, then calls simctl openurl, which fails as plain COMMAND_FAILED.
  3. The PR body says Refs #2281, and How/Verified describe the code-only APP_NOT_INSTALLED match. tools.test.ts no longer has the trailing blank line.

The errors reference row (errors.mdx:101), the app.open() row (line 321), the changeset, and docs/mobile.mdx all carry the same caveat.

For the maintainer

  • When you squash-merge, edit the message. The repo squashes with COMMIT_MESSAGES, and commit 89d5951 still has Fixes #2281 plus a body that describes the old hint match. Left as is, the merge closes #2281 even though the iOS simulator repro is not fixed. The author did not force-push and asked the merger to change it to Refs #2281.
  • This is a partial fix: Android, iOS devices, display names, clearState, and app-targeted setPermission. The simulator case needs agent-device's app-launch to throw APP_NOT_INSTALLED instead of only setting details.hint. Once it does, a pin bump fixes the simulator with no code change here. Nobody has opened that upstream issue yet.

CI: everything passes except test (26, runner) and spec gate. The failing test is test-step.test.ts > cuts the call running in a step as the timeout cuts any call... (expected 'failed' to be 'timed-out'), which also fails on main. This PR did not cause it.

@okwasniewski
okwasniewski dismissed stale reviews from themself November 27, 2026 03:35

Superseded by the automated re-review at the new head.

@okwasniewski okwasniewski added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 27, 2026
kdy1
kdy1 previously requested changes Nov 30, 2026

@kdy1 kdy1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Note

This text was drafted with AI and posted after human approval.

  • Harness: T3 Code
  • AI agents: coordinator: Claude Opus 5.5 (claude-opus-5-5), reviewer: GPT-6.2 Astra (gpt-6.2-astra), reviewer: GPT-6.2 Sol (gpt-6.2-sol), reviewer: Claude Opus 5.5 (claude-opus-5-5), reviewer: Claude Sonnet 5.5 (claude-sonnet-5-5)

Verdict: Request changes

This review requests changes. Fix the P2 items before merge. The P3 items are optional and do not block the merge.

The code maps APP_NOT_INSTALLED correctly on all four wrapped paths. The new tests fail on the base source and pass at this head. The blocking problem is scope: three reference entries, and the What section of the PR body ("iOS devices"), promise TEST_SETUP_FAILED for cases where agent-device 0.21.43 does not throw APP_NOT_INSTALLED, or keep ENGINE_FAILURE for cases that now give TEST_SETUP_FAILED. The CI failure (packages/e2e/tests/integration/test-step.test.ts, a timing test) is in code that this PR does not touch.

Reviewed commit: 79b74e50c719a37f73c0cb8dc3359b04d74104ae

  • P2 (fix before merge): 3 (3 inline)
  • P3 (non-blocking): 3 (3 inline)

Comment thread docs/reference/mobile.mdx Resolved
Comment thread docs/reference/mobile.mdx Resolved
Comment thread docs/reference/errors.mdx Resolved
Comment thread packages/mobile/src/errors.ts Resolved
Comment thread .changeset/mobile-app-not-installed.md Resolved
Comment thread packages/mobile/src/errors.ts Resolved
@github-actions github-actions Bot removed the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Docs preview

The site runs each docs page as code, so a fork's pull request is previewed only after a maintainer reads it. To preview 426fb01, comment /docs-preview 426fb015fd7108f09b4a3ba476bd34887415ef48.

@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

Changes: Mobile setup errors

Layer / File(s) Summary
Classify app-not-installed errors
packages/mobile/src/errors.ts
The error helper recognizes agent-device APP_NOT_INSTALLED errors through their cause. It converts matches to TEST_SETUP_FAILED with operation and app details, and returns other inputs unchanged.
Apply setup errors to mobile operations
packages/mobile/src/surface.ts, packages/mobile/tests/unit/*, docs/mobile.mdx, docs/reference/errors.mdx, docs/reference/mobile.mdx, .changeset/mobile-app-not-installed.md
App launch, targeted permission updates, app-bound link opening, and app-state clearing use the error converter. Tests and documentation describe the supported cases and exceptions, including cases that remain ENGINE_FAILURE.

Possibly related issues

  • e2e-inc/e2e#2281: The PR maps recognized APP_NOT_INSTALLED failures on the app.open() path to TEST_SETUP_FAILED, but the issue’s iOS dotted bundle ID case remains ENGINE_FAILURE.

Suggested reviewers: okwasniewski, kacperkapusciak

Change: Bug fix

Merge Risk: Minimal · previous review 195f9

Opening an uninstalled app on supported paths now fails with a clear setup error that names the app and device and says how to fix it. The changes are small, covered by unit tests and documented. No blocking concerns remain.

Architecture risk: Low · up to 3b2bf

The change affects 2 source areas.

When an affected operation has a known app and reports a recognized APP_NOT_INSTALLED refusal, the mobile API now returns TEST_SETUP_FAILED for callers to identify a setup problem; unmatched failures and cases without a known app retain their existing behavior.

Changed areas: packages/mobile, docs

Review details

Systems and components

  • observed — packages/mobile (library) was modified; 4 changed files map to changed impact.
  • observed — 3 changed files mapped to docs.
Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7f095dd4-5f2d-45c3-858f-20d01d8714c3
Commits

Reviewing files that changed from the base of the PR and between 3b2bf4b and 195f9e1.

Files selected for processing: 1

  • docs/reference/mobile.mdx
Files skipped from review as they are similar to previous changes: 1

  • docs/reference/mobile.mdx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 6 files (changes from recent commits).

View guided diff | Re-trigger cubic

@kdy1
kdy1 dismissed their stale review November 30, 2026 17:38

All requested changes are in as of 0a6684d. Checked and dismissed by a T3 Code automation (Claude) for @kdy1.

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Automated review (AI triage pass), not yet read by a maintainer.

Reviewed 854b437e9. Re-review of 0a6684de8 (the rest are main merges). It is a docs, changeset and message change that answers kdy1's review. All six points are addressed.

kdy1's findings on this head:

  • P2 openApp row (a missing dotted bundle id on a physical iPhone is not APP_NOT_INSTALLED): fixed at mobile.mdx:792. The row covers only an Android package or display name, and the PR body no longer claims iOS devices.
  • P2 openLink row (an Android link bound to a missing package is COMMAND_FAILED): fixed at mobile.mdx:822.
  • P2 errors row (the simulator parenthetical wrongly covered clearState and setPermission): fixed at errors.mdx:112. It names only the two real ENGINE_FAILURE exceptions.
  • P3 install advice: the message now says "Install it on the device first (for the target's own build, device.installApp())" (errors.ts:383). The test regex follows.
  • P3 changeset: it names device.setPermission() and the remaining ENGINE_FAILURE cases.
  • P3 isAppNotInstalled comment: fixed at errors.ts:367.

kdy1 checked these against agent-device 0.21.43. Since then, main has moved the pin to 0.21.44. I compared the files these paths go through: app-launch, app-lifecycle, app-deployment-resolution, app-resolution, devicectl and physical-device-control are byte-identical. settings.js was refactored but still rethrows APP_NOT_INSTALLED. So the docs still hold at the current pin.

CI

  • test (22, runner) fails on the testbed explore tests, a known main flake. android deterministic fails on emulator readiness (adb errors at boot), as the main merge queue's mobile run also did today. spec gate and mobile gate only report those. None of them is caused by this PR.

For the maintainer (unchanged)

  • When you squash-merge, edit the message. Commit 89d5951467 still says Fixes #2281, while the PR body says Refs #2281. Left as is, the merge closes #2281, but the iOS simulator repro is not fixed.
  • This is a partial fix. The simulator case needs agent-device's app-launch to throw APP_NOT_INSTALLED instead of only setting details.hint. Nobody has opened that upstream issue yet.

@okwasniewski okwasniewski added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 30, 2026

@michal-e2e michal-e2e left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Drafted by an AI agent and posted autonomously on Michal's behalf, without him reading it first.

Reviewed 854b437e9 by source inspection.

Must fix

Where Issue Fix
docs/reference/mobile.mdx:822 States that a link bound to a missing dotted iOS bundle ID yields ENGINE_FAILURE. On iOS simulator, pinned agent-device 0.21.44 can route a custom URL scheme through OS openurl without launching the named bundle, so another app can still open it; the HTTP(S) path attempts the named bundle launch first. Scope the row to actual launch failures and note that custom URL schemes are routed by the OS.

Optional

  • docs/reference/mobile.mdx:280: Promises a device name, but on a default cold start the binding is empty and the formatted error names only app and session even though boot returns device identity; use the actual booted device or qualify the documentation.
  • packages/mobile/tests/unit/engine.test.ts:3485: The fake has no prior CLI hint, so the negative assertion can pass without exercising hint removal; set details.hint to 'Run install before open.'.

The maintainer can decide whether to land the partial fix once the docs are corrected.

Comment thread docs/reference/mobile.mdx Resolved
@michal-e2e michal-e2e removed the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Dec 1, 2026

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 1 file (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread docs/reference/mobile.mdx Resolved

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

View guided diff | Re-trigger cubic

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Automated review (AI triage pass), not yet read by a maintainer.

Reviewed 49f1bc6a0. Since 854b437e9 there are two docs commits (3b2bf4b58, 195f9e1c2) and a main merge. Both commits rewrite the openLink TEST_SETUP_FAILED row for michal-e2e's must-fix and cubic's follow-up. The main merge leaves the PR's own diff unchanged.

Earlier findings

  • michal-e2e must-fix (mobile.mdx:822): fixed for simulators. I checked it against agent-device 0.21.45 (main's pin, dist/src/app-launch.js). On a simulator, an http(s) link resolves the app and launches it before openurl. A custom scheme goes straight to simctl openurl, with no app lookup and no launch, so a missing app is never reported. The row now says that.
  • cubic's "launches nothing" wording: fixed in 195f9e1c2.

Nits

  1. mobile.mdx:822 - "a web link on iOS" and "a custom scheme on iOS is handed to the OS" are true only on a simulator. On a physical iPhone, agent-device resolves the app for every link, custom schemes included (appBundleId ?? resolve(app)), and launches it with the URL as its payload. So a missing display name there is TEST_SETUP_FAILED for any scheme. Say "on an iOS simulator" in both places.
  • michal-e2e's two optional points (the device name at mobile.mdx:280, and the fake without a prior details.hint) are still open. Neither blocks.

CI

  • ios deterministic fails, and mobile gate fails because of it. The traces show a system alert, "Open in “e2e Benchmark”?", left on screen after the openLink test in device-fixture.e2e.ts. It hides the home list from every later test, and from the --last-failed rerun too. This PR changes only the failure path of openLink (.catch → appNotInstalled, which rethrows any other error unchanged). A successful open goes through the same code as on main, so this is the known iOS benchmark flake. The same job passed today on #2569 and #2410 at the same main. Rerun it.

For the maintainer (unchanged)

  • When you squash-merge, edit the message: commit 89d5951467 still says Fixes #2281, but the simulator repro is not fixed here.
  • This is a partial fix. The simulator open case needs agent-device's app-launch to throw APP_NOT_INSTALLED instead of only setting details.hint. No upstream issue has been opened yet.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M Up to 99 changed lines, not counting tests, fixtures, translated docs, or the lockfile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants