Skip to content

flows on tvOS still get an empty tree: ui-tree-match's fetchTree routes through describeIos without isTvOs #682

Description

@filip131311

Split out of #620, which fixed await-screen-idle / await-ui-element on tvOS by routing them to the focus view. The flow/recorder path was left on the broken route to keep that PR reviewable.

packages/tool-server/src/utils/ui-tree-match.ts's fetchTree routes an iOS device into describeIos without the isTvOs option, so the tvOS short-circuit fires (describe/platforms/ios/index.ts:93-96) and returns an empty tree. Everything built on it is therefore dead on an Apple TV:

  • flow directives that target elements
  • the flow recorder
  • treeFingerprint-based settle detection inside flows

So #620's headline — "tvOS has no working wait primitive" — remains true for flow-execute even after that fix.

The fix should be small: describeTvFocus (added in #620, describe/platforms/tv-focus.ts) drops into that function the same way it did into the two wait tools — resolve the TvControlApi when the target is a tvOS simulator, and adapt the focus read.

Worth checking while there: whether flow recording on a TV should capture tv-remote presses rather than coordinate taps, since a focus view has no tap targets in the usual sense.

Related: the comment at describe/platforms/ios/index.ts:30-36 lists the short-circuit's remaining direct callers but omits this one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions