Skip to content

feat(input): add versioned real pointer frames - #234

Open
7086cmd wants to merge 1 commit into
pocket-stack:mainfrom
7086cmd:codex/pointer-frame-input
Open

feat(input): add versioned real pointer frames#234
7086cmd wants to merge 1 commit into
pocket-stack:mainfrom
7086cmd:codex/pointer-frame-input

Conversation

@7086cmd

@7086cmd 7086cmd commented Aug 6, 2026

Copy link
Copy Markdown

Summary

Reworks real mouse/trackpad input from current main so input.pointer has a framework-owned path for absolute hover, focus, press, drag, release, cancellation, and onPress.

  • keeps touch hit facts in frame argument 4 and introduces one versioned, append-only frame-input payload in argument 5
  • represents pointer input as ordered move/down/up/leave/cancel edges with full JS-number coordinates, preserving a down+up fast click in one tick
  • records and restores the exact frame-input payload in tape v3 while scrubbing live pointer input during replay
  • keeps real-pointer interaction separate from the input.cursor virtual sprite and reads the live viewport on each pointer event
  • wires the same behavior through Solid, Vue Vapor, and Octane
  • replaces note-widget's private svc mouse messages and synthesized CIRCLE input with pocket-mod::Guest::frame_with_input

Semantics

Primary down captures the hovered focusable. Dragging away clears active:; re-entering restores it; release fires onPress only over the captured target. Leave clears hover while retaining capture for re-entry, and cancel/blur clears capture without firing. Window drag/resize claims now publish cancellation instead of leaving a false pressed edge.

The Note app consumes pointerEvents() only for caret placement and drag selection. Chrome activation stays entirely inside the framework's focus/onPress path.

Validation

  • bun run test — 12/12 stages green, including new Solid/Vue Vapor/Octane pointer parity coverage
  • bun run tape:check — 180 golden frames match
  • bunx tsc --noEmit
  • bun tools/build.ts note-main --density=2
  • cargo test -p pocket-mod -p pocket3d -p pocket-widget --lib in the repository Linux container — 32 tests pass
  • cargo check -p note-widget in the repository Linux container

Refs #59. Replaces the input boundaries explored in #229.

@7086cmd
7086cmd marked this pull request as ready for review August 7, 2026 05:52
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