Let pointer presses reach the keyboard stage's hit targets - #1255
Conversation
The Metal stage is a real NSView, and without a hitTest override it returned itself for every point inside the keyboard — swallowing mouse events before the semantic overlay's per-key hit targets stacked above it could see them. Clicking a key worked in the SwiftUI fallback and silently did nothing whenever Metal was active, which is the shipped default. That contradicts the plan's own boundary: the renderer is visual output, and the native overlay owns pointer interaction and accessibility. Return nil from hitTest so events fall through to the overlay, and pin the contract with a regression test (verified failing without the fix). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Review of the diff: the fix (override One thing worth confirming before merge: this override makes the Metal view unconditionally transparent to all pointer-driven interaction, not just clicks — that also affects Test coverage is otherwise adequate for the specific regression being fixed (constructs the view directly and checks |
Summary
Clicking a key in the onboarding tour did nothing whenever Metal was active (the shipped default).
KeyboardStageMTKViewis a realNSViewwith nohitTestoverride, so it returned itself for every point inside the keyboard and swallowed mouse events before the semantic overlay's per-key hit targets — which sit above it and own pointer interaction — could receive them.nilfromhitTest, matching the plan's boundary that the renderer is visual output onlyNote on how this survived
Snapshot/golden coverage renders scenes but never exercises input, so no automated test could catch a pointer-routing defect in the Metal path. Worth follow-up interaction-level coverage; see PR discussion.
Review gate
remote review gate selected— GitHubclaude-reviewis the enforced reviewer.Testing
KeyboardStageInteractionTestspass (6); the new test fails without the fix and passes with it🤖 Generated with Claude Code