fix: harden React Native overlay dismissal#641
Conversation
There was a problem hiding this comment.
💡 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".
| function isCloseLabel(label: string): boolean { | ||
| return /^close(?:\b|\s|\()/i.test(label); |
There was a problem hiding this comment.
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 👍 / 👎.
96093d3 to
1c73577
Compare
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
d4f7e48 to
dd3353d
Compare
dd3353d to
5f72fec
Compare
|
Summary
Harden React Native overlay dismissal so
agent-device react-native dismiss-overlayowns 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:
--verifyconcept so the command has reliable defaults without an extra flag.Dismiss noticecould be mistaken for an overlay control; collapsed!, ...LogBox banners now use the safe close affordance.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, andpnpm check:fallow --base origin/mainsuccessfully.Manual app verification used Metro on port 8098 with temporary
console.warn/console.errortriggers 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-overlaytargeted the collapsed LogBox banner instead of the app'sDismiss noticebutton and verified the overlay gone afterward.