Skip to content

Deepen React Native overlay analysis and dismissal #577

@thymikee

Description

@thymikee

Context

While fixing iOS interactive snapshots for the collapsed React Native !, Open debugger to view warnings. overlay, we found that overlay behavior is currently split across several modules:

  • snapshot presentation decides which overlay accessibility nodes to preserve/suppress
  • snapshot warning output separately detects RN overlay text
  • react-native dismiss-overlay separately resolves a safe target and sends a coordinate press
  • screenshot overlay refs do not have a shared overlay-action model

The current PR fixes the concrete collapsed-overlay bug and moves shared text predicates into src/utils/react-native-overlay-signals.ts, but it does not fully deepen the RN overlay module.

Goal

Create one deep React Native overlay analysis module that exposes a small interface for all callers that need overlay facts.

Proposed direction

Model RN overlays as snapshot analysis artifacts, for example snapshot.overlays[] or snapshot.issues[], with enough data for:

  • overlay kind, e.g. LogBox collapsed warning, LogBox expanded warning, RedBox
  • severity/reporting metadata
  • visible evidence nodes
  • safe controls/actions, preferring exposed refs/selectors and marking coordinate fallback explicitly
  • agent-facing warnings and next-command guidance
  • post-action verification state

Then make these callers consume the same analysis result:

  • iOS snapshot presentation preserves/suppresses overlay nodes through the overlay analysis module
  • snapshot warnings are generated from the analysis
  • react-native dismiss-overlay consumes the safe-action model
  • dismissal verifies with a post-action snapshot before reporting final dismissal
  • screenshot overlay refs can annotate overlay targets consistently

Acceptance criteria

  • One module owns RN overlay recognition vocabulary and safe-action selection.
  • Snapshot presentation, warning generation, and react-native dismiss-overlay do not duplicate overlay heuristics.
  • Collapsed Open debugger to view warnings overlays remain dismissible on iOS.
  • Full-screen warning parents are not exposed as generic app targets.
  • RedBox behavior still prefers Minimize over Dismiss.
  • Tests cover collapsed LogBox, expanded LogBox, RedBox, no-overlay app copy, and post-dismiss verification behavior.

Notes

This should be a separate improvement from the iOS snapshot presentation PR. That PR should keep only the concrete bug fix and the small predicate extraction.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions