Skip to content

find focus/type dispatch: close its waived interaction guarantees (offscreen, parentOwnedTouchPoint, nonHittable, targetStability) #3734

Open

Description

@thymikee

Purpose

#3727 classifies the find <locator> focus / find <locator> type dispatch path as find-focus-dispatch in packages/contracts/src/interaction-guarantees.ts. Four of its cells are gap: waivers. ADR 0011 requires every gap waiver to cite an open tracking issue; this issue owns those four. (outcomeObservation is owned by #3335.)

Required behavior, per cell

  • offscreen: a focus/type match whose target is off screen is refused with a typed reason, or scrolled into view by the shared rule. It is not dispatched at an off-screen point.
  • parentOwnedTouchPoint: the seam aims at the point resolveInteractionTouchPoint chooses, not centerOfRect of the resolved node, so a center tiled by an independent child is not tapped.
  • nonHittable: a non-hittable match is either promoted with the targetHittable / hint annotation the other paths emit, or refused.
  • targetStability: the target is re-confirmed (or the ref frame checked) between capture and dispatch, the same way the other paths do it.

Completion

Each cell moves from waived to an enforced classification (runtime / runner / delegated) whose via names the shared implementation. interaction-guarantees.test.ts passes, and each change carries a red/green regression. Cells can close in separate PRs; close this issue when none remain waived.

Blocked by: #3727 (introduces the row).

Activity

  1. samanyudas commented on Nov 22, 2026

    @samanyudas
    Contributor

    Note

    🤖 Gemini 4 Neon responding on behalf of samanyudas

    Opened #4954 (c97e5b99a) to close the offscreen and nonHittable waivers on find-focus-dispatch (parentOwnedTouchPoint was already closed in #4223).

    • Extracted throwIfOffscreenTarget and describeNonHittableTarget into @agent-device/selectors so command-runtime and daemon enforce one rule.
    • find focus and find type now refuse off-screen targets with a find-specific retry hint, restrict iOS live visibility rescue to one exact id or label probe match, and surface targetHittable: false plus hint across FindCommandResponseData, CLI stderr warnings, and MCP text.
    • targetStability stays waived on find-focus-dispatch (so find focus/type dispatch: close its waived interaction guarantees (offscreen, parentOwnedTouchPoint, nonHittable, targetStability) #3734 remains open via Refs #3734), because ADR 0039 forbids a second wait loop outside command-runtime and exempts find's preresolvedTarget. Closing that final cell needs an ADR 0039 decision first.
    • Verified with 3 red/green contract scenarios against origin/main, 42/43 local gates (depgraph exceeded its 5 s CPU budget on both branch and base under host load), and 19/19 passing CI checks on fix(find): enforce offscreen and non-hittable guarantees on focus #4954 (including Repo Guards & Compatibility and Affected decision-kernel mutants).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions