feat(e2e): scripted touch input + the first touch goldens#167
Draft
doodlewind wants to merge 1 commit into
Draft
feat(e2e): scripted touch input + the first touch goldens#167doodlewind wants to merge 1 commit into
doodlewind wants to merge 1 commit into
Conversation
doodlewind
force-pushed
the
feat/touch-goldens
branch
from
July 23, 2026 12:50
2f0e92b to
c4b94c1
Compare
doodlewind
force-pushed
the
feat/osk-touch-model
branch
from
July 23, 2026 12:50
2e6921f to
cd3d2ee
Compare
doodlewind
force-pushed
the
feat/touch-goldens
branch
from
July 23, 2026 12:55
c4b94c1 to
247d666
Compare
doodlewind
force-pushed
the
feat/osk-touch-model
branch
from
July 23, 2026 12:55
cd3d2ee to
095d242
Compare
Golden capture was button-only: the Vita capture host hard-coded
TouchSnapshot::EMPTY, so nothing touch-driven could ever be pinned by a
golden. This adds a scripted touch channel through every capture layer:
- GoldenSpec grows touch(frame) -> contacts and an `app` field (several
specs can exercise one bundle; golden files keep the spec's own name).
encodeTouchInput() emits the level-triggered compact script
("frame:id,x,y[+id,x,y];frame:-"), "" for touch-free specs so button-only
builds stay byte-identical.
- hosts/vita: POCKETJS_CAPTURE_TOUCH baked via build.rs like the button
script; scripted_touches() parses it with the scripted_buttons threshold
convention and feeds TouchSnapshot::from_logical — replacing the
hard-coded EMPTY.
- tests/golden.ts (wasm oracle) passes the packed contacts as the third
frame argument, so web and Vita goldens run the same touch tape.
- tools/vita.ts passes the env through; tests/e2e/vita3k.ts encodes and
builds per spec.
First touch spec: "im-touch" (bundle im-main) — a finger lands on 'h' and
HOLDS (f124 captures the pressed-key active: variant, a state no button
tape can show), release commits, a tap types 'i', START sends. Goldens:
web (480x272 oracle) and Vita3K (960x544 native density, real QuickJS +
frame loop) — 3/3 passed on first capture; all 49 existing web goldens
pass unchanged.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
doodlewind
force-pushed
the
feat/touch-goldens
branch
from
July 23, 2026 13:04
247d666 to
ab36340
Compare
doodlewind
force-pushed
the
feat/osk-touch-model
branch
from
July 23, 2026 13:04
095d242 to
0025104
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 6/6 of the touch-input series (stacked on #166).
What
Scripted touch through every capture layer, closing the loop opened in #161–#166:
GoldenSpec.touch?(frame)+appfield (multiple specs per bundle);encodeTouchInput()emits the level-triggered compact script (frame:id,x,y[+…];frame:-),""for touch-free specs — button-only capture builds stay byte-identical.hosts/vita:POCKETJS_CAPTURE_TOUCHbaked by build.rs;scripted_touches()(threshold convention ofscripted_buttons) feedsTouchSnapshot::from_logical, replacing the hard-codedEMPTYat the frame loop.tests/golden.ts: the wasm oracle passes packed contacts as the third frame argument — web and Vita goldens replay the same touch tape.tools/vita.tsenv pass-through;tests/e2e/vita3k.tsencodes per spec.The first touch golden
im-touch(bundleim-main): finger lands on h and holds — f124 pins the pressed-keyactive:variant, a state no button tape could ever capture — release commits (the #166 press model), tap types i, START sends.Results: Vita3K e2e 3/3 on first capture (960×544 native density, real QuickJS + input loop, CPU-oracle pixels); wasm oracle wrote the web goldens and all 49 pre-existing web goldens pass unchanged — zero regression across the whole 6-PR touch stack.
🤖 Generated with Claude Code