Thing 2.0 cut 7b: pointer input (hit-test from placed geometry, press, drag, wheel, render reads the session) #27

Merged
eureka merged 11 commits from hands/thing2-commands-pointer into main 2026-11-29 05:16:57 +00:00

2026-11-29

Meta Vens
pointer tests: the seam test's scales are Pixels only; unused helper and import removed
All checks were successful
Portable Eve contracts and browser lowering / ubuntu-latest eve-browser-lowering (pull_request) Successful in 2m51s
Portable Eve contracts and browser lowering / ubuntu-latest eve-contracts (pull_request) Successful in 3m12s
The first-pixel test of the hit-seam finding listed Cells beside the Pixels scales; a Cells node of a few px is
less than a cell wide, so the test is for the fractional Pixels scales (Cells edges are pinned by
a_rect_is_half_open_so_a_shared_edge_belongs_to_the_second_node). The commit that moved the pointer tests into the
crate carried the wrong list; this is the corrected final spelling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 05:49:32 +01:00
Meta Vens
input: Pointer, Seen, Owners, Input::event and hit_test are crate-private; the pointer tests that need them live in the crate
Finding public-surface-and-scale-rule-twice (surface half). hit_test, Hit and HitKind had no consumer inside the
crate and are deleted; Input, Seen and Owners are pub(crate), Pointer private, hit and pointer modules private.
The Rig tests (hit-testing, press state, the wheel, drafts) moved to src/input/tests.rs with three small doubles
(Port, Counter, Boxes), because thing-testkit's types name the library build of thing-core, not the test build.
The Core::frame tests stay in tests/input.rs. The contract documents both share are tests/support/mod.rs. The F03,
F01/F05/F06 and F04 fixtures the Rig tests loaded are replaced by documents built in tests/support (a target on a
board, the shared surfaces, a Select and a TextInput); no feature flag, no doc(hidden).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 05:44:40 +01:00
Meta Vens
frame: the notes switch writes are said in this frame, as before the route moved
The route now runs before the switch, so the diagnostics it returns are held and joined to the notes after the
switch has pushed its own (a held resume dropped on leaving a surface is said in the same frame).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 05:42:23 +01:00
Meta Vens
pointer: a test for a track that shrinks to zero width mid-drag; the rect.w > 0.0 guard is pinned
Finding slider-zero-width-guard-killable. A move over a zero-wide track must leave the draft as the press wrote it
(0/0 and n/0 are not values); the rect.w >= 0.0 mutant now fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 05:40:58 +01:00
Meta Vens
hit: the pointer meets laid device pixels through one grid, and the scale rule has one owner
Finding hit-seam-at-fractional-scale. covers() puts the point and every edge on the device grid (k times the
logical value, held to 1/1024 px) and tests half-open, so the first pixel past an edge is outside at scales 1.25,
1.5, 1.75, 2.5 and 3.0. render::device_scale is the one usable-scale rule; the wheel's copy in pointer.rs is
deleted (finding public-surface-and-scale-rule-twice, scale half). Test: first and last pixel of every leaf of
odd-width rows, corner and centre, at 1, 1.25, 1.5, 1.75, 2, 2.5 and 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 05:40:47 +01:00
Meta Vens
frame: events are routed against the frame the user saw, before the drain and the bind
Finding events-read-new-tree-old-geometry. Core::frame routes the frame's events first, against the last drawn
geometry and the tree bound when it was drawn, then switches surface, drains provider updates and binds. Captures
mint from what the user saw. Test: the provider unchecks a toggle in the frame the user clicks it checked; the
mint carries the unchecked value, in Pixels at 1 and 1.5 and in Cells.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 05:39:59 +01:00
Meta Vens
command: a busy, disabled or confirming control accepts no change; the gate is before any draft write
Finding busy-gate-leaves-unsent-draft. Commands::refuses_change is the one gate: activate's Change path calls it
before capture::change writes the draft, and a Slider press and drag call it before the Drafts write. A refused
change writes nothing and returns the ActivationRefused diagnostic; a Button press stays silent. This supersedes
7a's order (a change written to Drafts before the busy and enabled checks), for pointer changes and for
Commands::activate alike. The 7a test that pinned it, a_completion_clears_the_drafts_it_captured_and_a_newer_edit_survives
(tests/command.rs), now pins the refusal; the Toggle second-press assertion in tests/input.rs changed with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 05:39:51 +01:00
Meta Vens
hit: a non-modal overlay's synthetic root is not a hit target; a press passes through it unless it lands on the overlay's own content
Finding nonmodal-overlay-root-swallows (thing2:verdict:cut-commands-pointer.s1). The root is the viewport or the
anchor's rect, not something drawn. A modal's scrim still catches. Tests: viewport- and node-anchored at scale 1,
1.5 and Cells, plus the wheel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 05:38:24 +01:00
Meta Vens
pointer: the horizontal wheel test stays inside a Cells pane's travel
All checks were successful
Portable Eve contracts and browser lowering / ubuntu-latest eve-browser-lowering (pull_request) Successful in 3m42s
Portable Eve contracts and browser lowering / ubuntu-latest eve-contracts (pull_request) Successful in 3m38s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 04:53:47 +01:00
Meta Vens
pointer: tests for the cases the mutants found open; a Select or TextInput press has one arm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 04:49:50 +01:00
Meta Vens
Thing 2.0 cut 7b: pointer input (hit-test from placed geometry, press/drag/wheel, render reads the session)
Core::frame routes PointerDown/Move/Up/Cancel and Wheel against the last good frame: a press
activates through Commands::activate, a Slider drag writes Drafts, a wheel writes ScrollOffsets
through the one clamp, a modal's scrim dismisses and shuts out the tree beneath. Render reads a
Session (drafts over bound values, busy and marked node states); Session::EMPTY draws every
existing golden byte for byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 03:17:53 +01:00