Skip to content

windows-reactor test and diagnostics hardening and simplification - #4644

Merged
Kenny Kerr (kennykerr) merged 3 commits into
masterfrom
reactor-keyboard-input
Jun 26, 2026
Merged

windows-reactor test and diagnostics hardening and simplification#4644
Kenny Kerr (kennykerr) merged 3 commits into
masterfrom
reactor-keyboard-input

Conversation

@kennykerr

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens and simplifies windows-reactor’s panic/diagnostics story and expands test coverage around pointer handling, while also improving windows-canvas robustness on GPU-less environments and adding an end-to-end editor sample that composes pointer input + geometry hit-testing.

Changes:

  • Remove the windows-reactor default “diagnostics” panic hook, keeping only small panic-formatting helpers on FFI error paths and documenting panic = "abort" for release builds.
  • Add headless (test_reactor) coverage for pointer handler attach/detach/dedup behavior and add an integration (reactor_selftest) fixture that injects real OS mouse input via WinRT InputInjector.
  • Improve windows-canvas resilience with GpuDevice::new_or_warp() and device-lost helpers exported as public API, plus add an interactive “editor” sample demonstrating the full interaction loop.

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated no comments.

Show a summary per file
File Description
docs/crates/windows-reactor.md Documents panic-boundary behavior, removes diagnostics demo reference, and clarifies testing/test-crate rules.
docs/crates/windows-canvas.md Updates samples/testing guidance; documents device-lost helpers, WARP fallback, and new editor/hit-test samples.
crates/tools/reactor/src/test.txt Adds binding surface needed by reactor_selftest for input injection + Win32 helpers.
crates/tests/libs/reactor/tests/pointer_handlers.rs New headless tests pinning pointer handler bundle semantics via RecordingBackend.
crates/tests/libs/reactor/src/lib.rs Extends RecordingBackend op log to record set_pointer_handlers calls.
crates/tests/libs/reactor_selftest/src/registry.rs Registers the new pointer injection integration fixture.
crates/tests/libs/reactor_selftest/src/main.rs Switches to windows_core::Result (removes windows crate dependency).
crates/tests/libs/reactor_selftest/src/harness.rs Removes windows crate Win32/COM usage in favor of generated bindings; exposes hwnd() for injection.
crates/tests/libs/reactor_selftest/src/fixtures/pointer_input.rs New end-to-end fixture injecting OS mouse input and validating reactor pointer callbacks + flags.
crates/tests/libs/reactor_selftest/src/fixtures/mod.rs Exports the new pointer_input fixture module.
crates/tests/libs/reactor_selftest/src/exec.rs Switches to windows_core::Result.
crates/tests/libs/reactor_selftest/src/bindings.rs Regenerated bindings including InputInjector + needed Win32/COM symbols.
crates/tests/libs/reactor_selftest/Cargo.toml Drops the dependency on windows crate features; relies on windows-core + generated bindings.
crates/tests/libs/canvas/src/lib.rs Adds tests for device-lost classification, WARP/hardware fallback, and swapchain resize behaviors.
crates/samples/reactor/apps/examples/diagnostics_demo.rs Removes the diagnostics demo sample (no longer applicable without the global panic hook).
crates/samples/canvas/editor/src/main.rs New interactive editor sample composing reactor pointer events with canvas geometry hit-testing.
crates/samples/canvas/editor/Cargo.toml Adds the new canvas_editor sample crate.
crates/samples/canvas/editor/build.rs Uses windows-reactor-setup to make the sample self-contained.
crates/libs/reactor/src/reconciler/wrappers.rs Removes ExpectPanicGuard usage around error boundaries (panic hook removed).
crates/libs/reactor/src/diagnostics.rs Replaces panic-hook infrastructure with small crate-private helpers for FFI error-path reporting.
crates/libs/reactor/src/app.rs Stops installing diagnostics panic hook during app initialization.
crates/libs/reactor/Cargo.toml Removes default diagnostics feature.
crates/libs/canvas/src/reactor.rs Uses GpuDevice::new_or_warp() and refactors surface pixel sizing into surface_pixels().
crates/libs/canvas/src/lib.rs Exports is_device_lost / check_device_lost as public API.
crates/libs/canvas/src/device.rs Adds GpuDevice::new_or_warp() hardware→WARP fallback constructor.
crates/libs/canvas/src/device_lost.rs Documents and exposes device-lost classification helpers.

@kennykerr
Kenny Kerr (kennykerr) merged commit 70a8025 into master Jun 26, 2026
31 checks passed
@kennykerr
Kenny Kerr (kennykerr) deleted the reactor-keyboard-input branch June 26, 2026 17:05
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.

2 participants