Skip to content

fix: harden React Native overlay dismissal#641

Merged
thymikee merged 1 commit into
mainfrom
codex/rn-overlay-reliability
Jun 1, 2026
Merged

fix: harden React Native overlay dismissal#641
thymikee merged 1 commit into
mainfrom
codex/rn-overlay-reliability

Conversation

@thymikee
Copy link
Copy Markdown
Member

@thymikee thymikee commented Jun 1, 2026

Summary

Harden React Native overlay dismissal so agent-device react-native dismiss-overlay owns the full LogBox/RedBox flow: it selects only safe dismiss/minimize targets, sends the action, and verifies the outcome by default with a fresh post-action snapshot.

Closes #566

Details:

  • Merged the RN overlay signal vocabulary into one analyzer used by runtime warnings, screenshot overlay refs, handler targeting, Maestro overlay callers, and iOS presentation suppression.
  • Prefer concrete close/minimize/dismiss controls over broad overlay wrappers; RedBox still prefers Minimize before Dismiss.
  • Removed the separate --verify concept so the command has reliable defaults without an extra flag.
  • Fixed the real-device false positive where an app button like Dismiss notice could be mistaken for an overlay control; collapsed !, ... LogBox banners now use the safe close affordance.
  • RedBox minimize now verifies that full RedBox controls are gone, not that every minimized overlay banner disappeared.
  • Cleanup pass removed unused overlay result fields, the old standalone overlay-signal module, a one-off resolver export, duplicate handler analysis, duplicated Maestro overlay node aggregation, and an eager iOS descendant traversal.
  • Touched 11 files; scope stayed within the React Native overlay command surface, snapshot presentation/overlay refs, Maestro overlay handling, and focused tests/docs.

Validation

Verified with focused unit coverage for RN overlay targeting, RedBox minimize verification, screenshot overlay refs, iOS presentation filtering, CLI args, runtime snapshot warnings, and Maestro overlay callers: 7 files / 199 tests passed. Also ran pnpm format, pnpm check:quick, pnpm build, and pnpm check:fallow --base origin/main successfully.

Manual app verification used Metro on port 8098 with temporary console.warn/console.error triggers in the test app, then reverted the temporary app edit before commit. iOS and Android both showed the real collapsed RN overlay before dismissal; dismiss-overlay targeted the collapsed LogBox banner instead of the app's Dismiss notice button and verified the overlay gone afterward.

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: 96093d3b7d

ℹ️ 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/commands/react-native/overlay.ts Outdated
Comment on lines +216 to +217
function isCloseLabel(label: string): boolean {
return /^close(?:\b|\s|\()/i.test(label);
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 Badge Restrict close-label matching to actual overlay controls

When a RN warning is detected, collectOverlayNodes now treats any label beginning with Close as a dismiss control, so app content such as a visible Close account button can be selected by buildSafeDismissActions before the collapsed-banner fallback. This is especially risky on iOS snapshots that still include underlying app nodes while a LogBox wrapper is present; react-native dismiss-overlay can press app UI instead of the overlay. Please keep the shortcut suffix support without matching arbitrary Close … labels.

Useful? React with 👍 / 👎.

@thymikee thymikee force-pushed the codex/rn-overlay-reliability branch from 96093d3 to 1c73577 Compare June 1, 2026 13:43
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

Size Report

Metric Base Current Diff
JS raw 1.1 MB 1.1 MB -511 B
JS gzip 358.6 kB 358.7 kB +31 B
npm tarball 459.4 kB 458.2 kB -1.3 kB
npm unpacked 1.5 MB 1.5 MB -3.8 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 29.6 ms 30.0 ms +0.3 ms
CLI --help 45.4 ms 46.1 ms +0.6 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/2415.js -2.6 kB -621 B
dist/src/9533.js +1.5 kB +499 B
dist/src/args.js +228 B +63 B
dist/src/interaction.js -165 B -56 B
dist/src/session.js -234 B -55 B

@thymikee thymikee force-pushed the codex/rn-overlay-reliability branch 4 times, most recently from d4f7e48 to dd3353d Compare June 1, 2026 15:53
@thymikee thymikee force-pushed the codex/rn-overlay-reliability branch from dd3353d to 5f72fec Compare June 1, 2026 16:12
@thymikee thymikee merged commit 5d2b2ed into main Jun 1, 2026
18 checks passed
@thymikee thymikee deleted the codex/rn-overlay-reliability branch June 1, 2026 16:24
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-01 16:24 UTC

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.

Unify React Native overlay analysis and reliable dismissal

1 participant