Skip to content

Commit bb421e0

Browse files
author
Roy Lin
committed
feat: complete WinUI native input conformance
1 parent 41852fa commit bb421e0

18 files changed

Lines changed: 476 additions & 187 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,14 @@ jobs:
111111
throw "Windows App Runtime installer exited with code $LASTEXITCODE"
112112
}
113113
114-
- name: Capture WinUI button-backed role OS-input smoke evidence
114+
- name: Capture complete WinUI OS-input smoke evidence
115115
if: runner.os == 'Windows' && github.event_name == 'workflow_dispatch'
116116
shell: pwsh
117117
run: >-
118118
cargo run --locked --no-default-features --features winui-native
119119
--bin a3s-gui-winui-input-smoke -- native-input-winui-smoke.json
120120
121-
- name: Upload WinUI button-backed role OS-input smoke evidence
121+
- name: Upload complete WinUI OS-input smoke evidence
122122
if: always() && runner.os == 'Windows' && github.event_name == 'workflow_dispatch'
123123
uses: actions/upload-artifact@v6
124124
with:

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ object graph at the host boundary.
3030
conformance checks. Versioned native-input manifests expand every role marked
3131
native into strict OS-automation cases; adapter and headless traces cannot
3232
satisfy that evidence gate.
33-
A WinUI smoke runner records real XAML Button mouse and keyboard input through
34-
`SendInput`, pen and touch through Windows synthetic pointer injection, and
35-
assistive activation through UI Automation `InvokePattern`. It covers
36-
activation, mouse/pen/touch cancellation, keyed-rerender cancellation, and
37-
disabled input for all 14 cases of each button-backed `Button`,
38-
`DisclosureSummary`, `Link`, `ImageMapArea`, and `MenuItem` role (70 of 98
39-
WinUI cases); `ListBoxItem` and `TreeItem` remain outstanding.
40-
Populating the remaining manifest cases with real platform automation,
33+
A WinUI smoke runner records real XAML Button and list-item mouse and keyboard
34+
input through `SendInput`, pen and touch through Windows synthetic pointer
35+
injection, and assistive activation through UI Automation `InvokePattern`
36+
and `SelectionItemPattern`. It covers activation, mouse/pen/touch
37+
cancellation, keyed-rerender cancellation, and disabled input for all 14
38+
cases of each `Button`, `DisclosureSummary`, `Link`, `ImageMapArea`,
39+
`MenuItem`, `ListBoxItem`, and `TreeItem` role (98 of 98 WinUI cases).
40+
Populating the AppKit and GTK4 manifests with real platform automation,
4141
role-edge input parity, layout-aware collection page movement, IME/dead-key
4242
conformance, measured overlay collision/arrow conformance and scroll locking,
4343
remaining native focus conformance, and locale formatting are still in
@@ -185,7 +185,7 @@ platform-matched typography, for example `w-[396px]`, `rounded-[12px]`, and
185185
| AppKit native surface | Usable for macOS smoke apps with role-aware press/hover/focus/key translation, controls, menus, close actions, and typed post-mount `autoFocus`. |
186186
| GTK4 native surface | Usable for Linux smoke apps with role-aware press/hover/focus/key translation, controls, menus, dialogs, and scroll containers. |
187187
| WinUI native surface | Usable for Windows smoke apps with role-aware press/hover/focus/key translation, typed programmatic focus and post-mount `autoFocus`, core controls, resize bounds, close actions, and root-window exit. |
188-
| Native input conformance | Versioned requirement/run/report artifacts and a strict verifier are available. The WinUI smoke harness covers all 70 button-backed role cases (70 of 98); full AppKit, GTK4, and WinUI evidence is not complete. |
188+
| Native input conformance | Versioned requirement/run/report artifacts and a strict verifier are available. The WinUI smoke harness covers the complete 98-case manifest; AppKit and GTK4 evidence is not complete. |
189189
| Product app shell | Dogfood-ready. Production distribution still needs signed installers and longer real-world focus/input hardening. |
190190

191191
## Roadmap
@@ -272,18 +272,18 @@ then verify an artifact emitted by an operating-system automation runner:
272272
```bash
273273
just native-input-manifest winui
274274
just native-input-conformance path/to/winui-evidence.json
275-
just winui-input-smoke path/to/winui-button-backed-smoke.json
275+
just winui-input-smoke path/to/winui-smoke.json
276276
```
277277

278278
The verifier exits nonzero for missing or duplicate cases, incorrect semantic
279279
event order, modality/target mismatches, incomplete environment identity, or
280280
evidence produced only by an adapter kernel or the portable runtime.
281-
The WinUI smoke command opens a real XAML window and emits a partial artifact;
282-
passing that command validates its 70 captured button-backed role cases, not
283-
the full WinUI manifest. It requires a supported Windows desktop session with
284-
the Windows App Runtime 1.7 framework package available. WinUI examples enter
285-
the XAML-owned application lifecycle with `run_winui_application_staged_async`
286-
and keep native layout and input responsive through the asynchronous app loop.
281+
The WinUI smoke command opens a real XAML window and emits a complete 98-case
282+
artifact. Passing that command validates the full current WinUI manifest. It
283+
requires a supported Windows desktop session with the Windows App Runtime 1.7
284+
framework package available. WinUI examples enter the XAML-owned application
285+
lifecycle with `run_winui_application_staged_async` and keep native layout and
286+
input responsive through the asynchronous app loop.
287287

288288
The default feature set includes RSX authoring and the built-in design system.
289289
The runtime/protocol core is independently buildable without SWC or `rsx_ui`:

docs/architecture.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -178,21 +178,22 @@ driver and event-loop integration; the portable verifier owns only the shared
178178
semantic contract.
179179

180180
The Windows-only `a3s-gui-winui-input-smoke` harness keeps automation outside
181-
the runtime library. It mounts each button-backed semantic role as a real WinUI
182-
Button, confirms that the mounted native role matches the manifest case,
183-
locates and verifies its enabled state through the OS UI Automation tree,
184-
injects mouse and Enter-key input with `SendInput`, injects pen and touch with
185-
`CreateSyntheticPointerDevice` / `InjectSyntheticPointerInput`, and invokes its
186-
assistive `InvokePattern`. Mouse cancellation releases the real XAML pointer
187-
capture after the injected press; pen and touch cancellation inject Windows'
188-
cancelled-up pointer state. The production WinUI message loop records successful,
189-
cancelled, keyed-rerender, and disabled responses. The harness validates all 70
190-
observations for `Button`, `DisclosureSummary`, `Link`, `ImageMapArea`, and
191-
`MenuItem` with the strict manifest verifier while allowing only `ListBoxItem`
192-
and `TreeItem` to remain `MissingObservation`. Its output therefore remains an
193-
explicitly partial run artifact rather than a conformance report. The harness
194-
requires an interactive Windows desktop and the Windows App Runtime 1.7
195-
framework package used by the WinUI backend's dynamic dependency.
181+
the runtime library. It mounts button-backed semantic roles as real WinUI
182+
Buttons and collection items inside real XAML list containers, confirms that
183+
the mounted native role matches the manifest case, and locates and verifies its
184+
enabled state through the OS UI Automation tree. Mouse and Enter-key input use
185+
`SendInput`; pen and touch use `CreateSyntheticPointerDevice` /
186+
`InjectSyntheticPointerInput`; assistive activation uses `InvokePattern` for
187+
buttons and `SelectionItemPattern` for collection items. Mouse cancellation
188+
releases the real XAML pointer capture after the injected press; pen and touch
189+
cancellation inject Windows' cancelled-up pointer state. The production WinUI
190+
message loop records successful, cancelled, keyed-rerender, and disabled
191+
responses. The strict manifest verifier validates all 98 observations for
192+
`Button`, `DisclosureSummary`, `Link`, `ImageMapArea`, `MenuItem`,
193+
`ListBoxItem`, and `TreeItem`, so the output is a complete current WinUI run
194+
artifact. The harness requires an interactive Windows desktop and the Windows
195+
App Runtime 1.7 framework package used by the WinUI backend's dynamic
196+
dependency.
196197

197198
## NativeHost Boundary
198199

docs/react-aria-native.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -341,23 +341,23 @@ just native-input-manifest appkit
341341
just native-input-manifest gtk4
342342
just native-input-manifest winui
343343
just native-input-conformance path/to/evidence.json
344-
just winui-input-smoke path/to/winui-button-backed-smoke.json
344+
just winui-input-smoke path/to/winui-smoke.json
345345
```
346346

347-
The WinUI smoke harness covers the XAML Button-backed `Button`,
348-
`DisclosureSummary`, `Link`, `ImageMapArea`, and `MenuItem` roles. Mouse and
349-
keyboard use Windows `SendInput`, pen and touch use synthetic pointer injection,
350-
and assistive activation uses UI Automation `InvokePattern`. It exercises
347+
The WinUI smoke harness covers XAML Button-backed `Button`,
348+
`DisclosureSummary`, `Link`, `ImageMapArea`, and `MenuItem` roles plus
349+
`ListBoxItem` and `TreeItem` inside real list containers. Mouse and keyboard use
350+
Windows `SendInput`, pen and touch use synthetic pointer injection, and
351+
assistive activation uses UI Automation `InvokePattern` or
352+
`SelectionItemPattern` according to the native control contract. It exercises
351353
successful activation, mouse/pen/touch cancellation, keyed-rerender
352354
cancellation, and disabled input inside the production XAML application
353355
lifecycle. Handled routed pointer events and preview key events feed the same
354356
portable press state machine while the asynchronous dispatcher loop leaves
355-
WinUI layout and input dispatch unblocked.
356-
The strict verifier accepts no semantic defect in the complete 70-case slice,
357-
but the 28 `ListBoxItem` and `TreeItem` WinUI cases remain. The P0 gap is
358-
therefore still open. Native automation drivers still need to execute every
359-
generated case and submit passing run artifacts on real macOS, Linux, and
360-
Windows runners.
357+
WinUI layout and input dispatch unblocked. The strict verifier accepts the
358+
complete 98-case WinUI manifest with no semantic defect. Native automation
359+
drivers still need to submit complete passing run artifacts on real macOS and
360+
Linux runners.
361361

362362
## Known Gaps
363363

@@ -366,7 +366,7 @@ props:
366366

367367
| Priority | Area | Required outcome |
368368
| --- | --- | --- |
369-
| P0 | Native input conformance | Populate the generated V1 manifests with platform-run mouse, pen, touch where applicable, keyboard, assistive activation, disabled, cancellation, and keyed-rerender fixtures for every role currently marked native; then close or retain evidence-backed menu/item exceptions. |
369+
| P0 | Native input conformance | WinUI's complete 98-case V1 manifest passes real OS automation. Populate the AppKit and GTK4 manifests with platform-run mouse, pen, touch where applicable, keyboard, assistive activation, disabled, cancellation, and keyed-rerender fixtures for every role currently marked native; then close or retain evidence-backed menu/item exceptions. |
370370
| P1 | Event propagation | Add platform-run conformance fixtures for conditional `Stop`/`Continue` across nested native controls. |
371371
| P1 | Focus management | Add platform-run conformance fixtures for post-mount `autoFocus`, nested containment, and restoration. |
372372
| P1 | Collections and selection | Add layout-aware page navigation and complete IME/dead-key typeahead conformance. |

docs/roadmap.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ The following foundations are implemented and are not roadmap placeholders:
8787
native evidence, and CI publishes each backend's outstanding matrix
8888
- a Windows OS-input smoke harness that drives real XAML Button-backed
8989
`Button`, `DisclosureSummary`, `Link`, `ImageMapArea`, and `MenuItem` roles
90-
through `SendInput`, synthetic pen/touch injection, and UI Automation,
91-
currently covering all 70 of their cases (70 of 98 required WinUI cases)
90+
plus list-backed `ListBoxItem` and `TreeItem` roles through `SendInput`,
91+
synthetic pen/touch injection, and UI Automation, covering the complete
92+
98-case WinUI manifest
9293

9394
## Delivery Dependency
9495

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ native-input-manifest BACKEND:
327327
native-input-conformance EVIDENCE:
328328
cargo run --locked --quiet --bin a3s-gui-native-input-conformance -- verify "{{ EVIDENCE }}"
329329

330-
# Capture the complete 70-case WinUI button-backed role OS-input smoke artifact
330+
# Capture the complete 98-case WinUI OS-input smoke artifact
331331
winui-input-smoke EVIDENCE:
332332
cargo run --locked --quiet --no-default-features --features winui-native --bin a3s-gui-winui-input-smoke -- "{{ EVIDENCE }}"
333333

0 commit comments

Comments
 (0)