Skip to content

feat(demo): add a runnable NAP-GAMEPAD controller tester - #299

Draft
dskvr wants to merge 3 commits into
mainfrom
feat/gamepad-test-napplet
Draft

dskvr wants to merge 3 commits into
mainfrom
feat/gamepad-test-napplet

Conversation

@dskvr

@dskvr dskvr commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Adds a runnable controller tester for the GAMEPAD runtime merged in #297. Connect a controller, click Focus, inspect axes/button pressure, then move focus away while holding a control: values and timestamps must become neutral while connection metadata remains.

The private @demo/gamepad-test app builds to one content-addressed HTML file. It shows live readings, received snapshots, and observed live/neutral transitions without reading native devices or implementing transport. pnpm --filter @demo/gamepad-test dev starts this checkout's Paja at http://127.0.0.1:5187 after pnpm build. The README covers hardware steps and two-window testing.

Protocol authority: napplet/naps PR 108 at 0b28f77e3dfa0f07dd7c0f9d61a7090ee99f3a5e, naps/NAP-GAMEPAD.md; NAP-THEME at d73f6f9480dcec1d75712cf4eafbe70337fe1e42; NIP-5D PR 2303 at 020cb8b33a9e4c6b8ca4b2f9d0ed0a67843b68f7. The demo conforms to the proposed snapshot API. Kehto ships the injected API, while its SDK wrapper remains pending in napplet/web#242; this example uses that exact injected surface and records the temporary package gap. No new wire protocol is introduced.

Validation:

  • Build: 33 tasks; type-check: 19 tasks; docs gate passed.
  • Unit suite: 2,116 tests passed with four workers. The initial unconstrained run reported two asynchronous errors in existing transport tests; bounded reruns passed.
  • Full browser suite: 126 passed; final focused run: seven passed, including two-frame focus isolation, native API denial, disconnect/reconnect, blocked/unavailable/absent states, and listener teardown.
  • Four frame sizes (200x160, 320x560, 900x600, 2400x1200), both light/dark themes: overflow checks and screenshot inspection passed.
  • App verify and generic conformance passed. Generic conformance has six skips and predates GAMEPAD; dedicated artifact/browser tests establish the relevant behavior.
  • Real Paja smoke passed with no physical controller, plus live/neutral input from a deterministic host-native reader sample in an automated browser page. Physical USB/Bluetooth testing remains manual.
  • AI-slop: changed files 100/100, no findings; full repository 95/100 from five existing complexity findings in untouched files. Config unchanged.

No published package output changed, so no changeset. No protocol implementation, native compatibility replacement, haptics, deployment, or package publication is included.

dskvr and others added 3 commits October 12, 2026 22:10
Exercise the merged GAMEPAD runtime with live readings, observed focus isolation, and a portable single-file artifact.

Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
@dskvr
dskvr marked this pull request as draft October 13, 2026 16:43

This branch has not been deployed

No deployments
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