Skip to content

feat: auto-reverse Android localhost opens#590

Merged
thymikee merged 6 commits into
mainfrom
codex/android-localhost-reverse-open
May 26, 2026
Merged

feat: auto-reverse Android localhost opens#590
thymikee merged 6 commits into
mainfrom
codex/android-localhost-reverse-open

Conversation

@thymikee
Copy link
Copy Markdown
Member

Summary

Android deep-link opens to localhost URLs with a port now ensure the matching adb reverse tcp:<port> tcp:<port> through the existing Android reverse provider before launch.

Updates help/docs and SkillGym guidance so agents rely on automatic handling for direct localhost URL opens while keeping manual adb reverse guidance for app launches or unsupported flows.

Closes #587

Touched files: 6. Scope stayed within Android app lifecycle, tests, and user-facing guidance.

Validation

Verified with targeted Android lifecycle and CLI help tests, quick lint/type checking, formatting, and build:

  • pnpm format
  • pnpm exec vitest run src/platforms/android/__tests__/index.test.ts src/utils/__tests__/args.test.ts
  • pnpm check:quick
  • pnpm build
  • git diff --check

pnpm test:skillgym:case android-local-metro-reverse-before-url-open was not run because it requires external Codex/Claude runners and explicit authorization for repo-derived prompt transfer.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-05-26 08:45 UTC

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef0e062ad3

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/platforms/android/app-lifecycle.ts Outdated
Comment on lines +252 to +255
throw new AppError(
'COMMAND_FAILED',
`Failed to ensure Android port reverse ${endpoint} before opening localhost URL`,
{
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 Badge Fall back to deep-link launch when reverse ensure fails

This new preflight converts any adb reverse failure into a hard COMMAND_FAILED before am start runs, which means localhost deep links now cannot open at all in environments where reverse is unavailable or flaky (for example bridge/device setups that reject reverse). That regresses behavior because the deep link dispatch itself may still succeed when reverse is already configured externally or not needed by the app, so this should be best-effort instead of aborting the open flow.

Useful? React with 👍 / 👎.

@thymikee thymikee merged commit bbe7c06 into main May 26, 2026
19 checks passed
@thymikee thymikee deleted the codex/android-localhost-reverse-open branch May 26, 2026 08:44
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.

feat: auto-ensure adb reverse for Android localhost Metro deep links

1 participant