Skip to content

fix(android): name the OEM install dialog on helper install timeouts - #2619

Merged
thymikee merged 1 commit into
mainfrom
t3code/android-install-timeout-hint
Sep 15, 2026
Merged

thymikee merged 1 commit into
mainfrom
t3code/android-install-timeout-hint

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

The first adb install of each Android helper package can stall behind an OEM install-confirmation
dialog (ColorOS is one), so an unattended first snapshot -i or test-IME activation failed with the
generic "adb server may be wedged" advice. Helper installs now name the dialog and the fix.

  • installAndroidHelperPackage is the shared install seam for the snapshot helper and the test IME
    helper. Timeouts there raise the install-confirmation hint; every other adb call keeps the
    wedged-server advice, and app-under-test installs are unchanged.
  • Curated hints from provider/cloud install errors survive: only the generic timeout hint is replaced.
  • activateAndroidTestIme helper-unavailable outcomes and the android_test_ime_activate_failed
    diagnostic now carry the curated hint.
  • isCommandTimeoutError is now a type predicate (error is AppError).

Closes #2364. 15 files, +428/−16.

Validation

Commit 6eb81957cd. pnpm check:affected --run passed on that head (756 files / 5659 tests; fallow
dead-code and health baselines clean). pnpm typecheck, pnpm lint, pnpm format:check pass.

Regression proof: reverting each production edit fails its own test — snapshot-helper install timeout,
IME-helper install timeout, curated-hint passthrough, adb-failure hint policy, and the runtime warn
diagnostic. app-deployment pins the generic hint for app installs.

Unresolved risk: this is device-facing and no ColorOS/OPPO hardware is available here, so there is no
live run of the changed path. Confirming it needs agent-device --platform android snapshot -i on a
fresh install on an OPPO Find N6. Integration Tests and Coverage jobs are not observable locally.

Follow-up: the platform-apple host port still declares isCommandTimeoutError(error): boolean, which
loses narrowing there but does not change runtime behavior.

The first install of each helper package on some OEM builds (ColorOS) opens the
system install-confirmation flow and adb blocks until it is dismissed, so an
unattended first snapshot failed with the generic "adb server may be wedged"
advice. Route both helper installs through one seam that rewrites that generic
hint, keep the timeout classification and install-failure marker, and carry the
IME helper's curated advice into its activation diagnostic.
@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-15 08:00 UTC

@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.54 MB 4.54 MB +690 B
Package (unpacked) 4.53 MB 4.54 MB +690 B
Package (download) 1.34 MB 1.34 MB +211 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 18.8 ms 19.0 ms +0.3 ms
CLI --help 49.0 ms 51.0 ms +2.0 ms

@thymikee

Copy link
Copy Markdown
Member Author

Reviewed at 6eb8195. The code looks correct: helper install timeouts now carry the install-confirmation hint through the shared helper install path, and the unit tests cover the classification with synthetic timeouts.

One validation step is left. This is a device-facing error path, and the tests do not show the hint on a real stall. As the PR body notes, the check is agent-device --platform android snapshot -i (or another helper install) on a device that shows the OEM install dialog, such as the OPPO ColorOS device from #2364, confirming the error carries the install-confirmation hint and not the wedged adb server hint. If no such device is available, a run that makes the real helper install time out on any Android device would still show that the hint reaches the user.

Smoke Tests failed in the iOS runner XCTest testAlertDismissDoesNotActivateAReplacementWithTheSameTitle (ALERT_DEADLINE_EXCEEDED). This diff touches no Apple or alert code, and the other 93 targeted XCTests passed, so the failure is likely unrelated. There are no conflicts.

@thymikee
thymikee merged commit 2cafab3 into main Sep 15, 2026
19 of 20 checks passed
@thymikee
thymikee deleted the t3code/android-install-timeout-hint branch September 15, 2026 08:00
thymikee added a commit that referenced this pull request Sep 15, 2026
#2619 copied the snapshot helper manifest fixture after #2618 deleted
`installArgs` from AndroidSnapshotHelperManifest, so the new fixture failed
typecheck on main: the field is parsed by no one and the leniency case is
already covered in snapshot-helper.test.ts.

Repair for the breakage on main (2cafab3), unrelated to the settings
vocabulary refactor it blocks here.
thymikee added a commit that referenced this pull request Sep 15, 2026
…tion (#2625)

* refactor(settings): derive the permission vocabulary from one declaration

packages/contracts/src/settings.ts now declares the settings permission
actions, modes, app-scoped targets and macOS targets once, and the two
parsers, the settings help fragments and its invalid-args message, the
public client permission types, and the CLI's membership sets are built
from those collections.

Accepted names, normalization, error strings, help ordering and daemon
positionals are unchanged; no surface widened what it accepts. The macOS
action list stays a literal because it is a support fact owned by
platform-apple.

Part of #2614.

* fix(android): drop the manifest installArgs the type no longer declares

#2619 copied the snapshot helper manifest fixture after #2618 deleted
`installArgs` from AndroidSnapshotHelperManifest, so the new fixture failed
typecheck on main: the field is parsed by no one and the leniency case is
already covered in snapshot-helper.test.ts.

Repair for the breakage on main (2cafab3), unrelated to the settings
vocabulary refactor it blocks here.
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.

Android: ColorOS blocks the test-only snapshot helper as a "PC install attack" (-99), removing all snapshot-based commands

1 participant