Skip to content

Expose Windows onboarding to UI Automation - #580

Merged
coneilen merged 2 commits into
coneilen-microsoft-first-run-daemon-orderingfrom
coneilen-microsoft-onboarding-uia-provider
Oct 2, 2026
Merged

coneilen merged 2 commits into
coneilen-microsoft-first-run-daemon-orderingfrom
coneilen-microsoft-onboarding-uia-provider

Conversation

@coneilen

@coneilen coneilen commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Exposes the four-page custom Windows onboarding modal as a named UI Automation tree with Invoke-capable actions and deterministic keyboard focus. This is layer 2 above #579 and preserves the early daemon connection, modal ownership, foregrounding, teardown, navigation, and backend selection behavior.

Part of #556.

Changes

  • Add an onboarding-specific IRawElementProviderFragmentRoot for the current page, Skip, Back, Continue/Get Started, and backend actions.
  • Route WM_GETOBJECT, UIA Invoke/SetFocus, mouse input, and Tab/Shift+Tab/Enter/Space through one deterministic onboarding action model with visible focus outlines.
  • Keep the shared shell provider unchanged apart from a two-line include that compiles the isolated onboarding provider.

Test plan

RED: zig test src\WindowsOnboarding.zig -target x86_64-windows-msvc -lc -luser32 -lgdi32 -> 11/12 passed; deterministic Tab traversal failed with TestUnexpectedResult
GREEN: zig test src\WindowsOnboarding.zig -target x86_64-windows-msvc -lc -luser32 -lgdi32 -> 13/13 passed
REGRESSION: zig test src\App.zig src\AccessibilityProvider.cpp src\FilePicker.c winghostty-win32-host.lib and ghostty-vt-static.lib with Windows system libraries -> 734/734 passed

Additional provider RED: zig test src\WindowsOnboarding.zig ... --test-filter "onboarding routes WM_GETOBJECT" -> 0/1 passed; the assertion found no WM_GETOBJECT route.

Additional verification:

  • zig test src\WindowsOnboarding.zig src\AccessibilityProvider.cpp ... -> 13/13 passed with the native provider compiled and linked.
  • zig build -Doptimize=ReleaseSafe -Dwinghostty-dir=... -Dwinghostty-lib=... -> passed.
  • Isolated shown-window probe with owned GRAPHCODE_SUPPORT_DIR, LOCALAPPDATA, TEMP, TMP, and USERPROFILE roots -> named root and four pages discovered; Skip, Back, Continue/Get Started, and Copilot CLI exposed Invoke; backend selection reported Selected; UIA SetFocus reached Get Started; posted native WM_KEYDOWN Tab traversed Continue -> Skip -> Continue.
  • Desktop-level injected keystrokes were not observed by this host, so this does not claim physical keyboard injection, packaged install, screen-reader conformance, or package install -> first launch -> connected Welcome coverage.

Checklist

  • I have read the Contributing Guidelines
  • I have signed off my commits (git commit -s) per the DCO
  • Tests pass locally (make test)
  • Code follows the existing style (make check)
  • I added the test/contract before the implementation and observed the intended RED failure

coneilen and others added 2 commits October 1, 2026 18:54
Part of #556.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Part of #556.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
@coneilen
coneilen added this pull request to stack #581 October 2, 2026 02:00
@coneilen
coneilen merged commit acdb2a6 into main Oct 2, 2026
30 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant