Skip to content

winapp ui: plain words are refused in very large Reactor apps (DevTools search truncated) #1371

Open

Description

Follow-up from reviewing #1197 (Reactor support in DevTools). Not blocking that PR.

What happens
In a Reactor app whose visual tree has more than 20,000 elements (the DevTools search limit, kMaxTreeWalk, which counts every template part), every plain word given to winapp ui is refused, not just C# names:

winapp ui click Save -a app
DevTools could not search this app for an element named 'Save'. Run the command again.

Running it again gives the same answer, and winapp ui wait-for Save (without --gone) polls until it times out. In v0.8.0 the text search finds the Save button.

Why
To keep wait-for --gone from reporting a visible Reactor element as gone, the bridge now refuses a bare word when the DevTools C# name search is cut short with no match (DevToolsSelectorUiAutomation.cs ~L299). On very large trees the search is always cut short, so every bare word hits that path. Reproduced with a test fixture where VisualTree.find returns {"matches":[],"truncated":true}.

Suggested fix
When the search is truncated and no C# name matched, try the normal UI Automation text search first, and only refuse if that also finds nothing. A C# variable name is never a UIA name, so a text match is always the right answer. At minimum, don't say "run again" for the truncated case, since retrying can't help.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdevtoolsWinUI DevTools: toolbar, inspector, and winapp devtools commandsui-automation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions