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.
Split out of #620, which fixed
await-screen-idle/await-ui-elementon 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'sfetchTreeroutes an iOS device intodescribeIoswithout theisTvOsoption, 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:treeFingerprint-based settle detection inside flowsSo #620's headline — "tvOS has no working wait primitive" — remains true for
flow-executeeven 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 theTvControlApiwhen the target is a tvOS simulator, and adapt the focus read.Worth checking while there: whether flow recording on a TV should capture
tv-remotepresses 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-36lists the short-circuit's remaining direct callers but omits this one.