Skip to content

feat(osk): TextField — the editable activation semantic - #210

Merged
doodlewind merged 1 commit into
mainfrom
feat/text-field
Aug 3, 2026
Merged

feat(osk): TextField — the editable activation semantic#210
doodlewind merged 1 commit into
mainfrom
feat/text-field

Conversation

@doodlewind

Copy link
Copy Markdown
Collaborator

Phase 2, change B (after #209). The hardware-day gap: tapping the search field did nothing, because "summon the keyboard" was a button binding in app code rather than a semantic the platform owns.

What changes

import { TextField } from "@pocketjs/framework/osk";

<TextField value={query()} onInput={setQuery} onSubmit={search} placeholder="TYPE A QUERY" />

Any modality's activation — touch tap (via the #209 hit fact), d-pad CIRCLE, cursor click, one pressNode pipeline — opens the system OSK bound to the field. Commit fires onSubmit and closes. Zero osk plumbing in apps; ref exposes the controller for shortcut buttons (△).

  • osk-controller.ts: the editing session extracted JSX-free (verbatim createOsk) so its caret/commit/cancel contract is directly unit-tested (7 cases, plain + browser, registered in the canonical chain)
  • TextField in osk.tsx: field box + overlay-Portal-docked panel (hitPass from feat(input): touch hit facts — bounds hits resolved by the host, carried per contact #209 makes this composition work)
  • Existing createOsk/<Osk> placement-controlled usage (apps/im) unchanged

Note

The tap→type→search integration lands as pocket-youtube sim journeys in the adoption PR (the JSX view layer is compiled, not bun-test-importable — the established boundary). One pre-existing environmental failure on this machine (symbian-runtime, macOS provenance holding a freshly linked test executable — fails identically on clean main) is unrelated.

🤖 Generated with Claude Code

Tapping a text field did nothing (the hardware-day finding): the OSK was
button-summoned app glue, not a semantic. The field and its keyboard are one
vertical, so both now live in the osk module:

- osk-controller.ts: the editing session extracted JSX-free (createOsk,
  verbatim) — bun test imports it directly, and the caret/commit/cancel
  contract gets its own unit suite (registered in the canonical chain).
- TextField (osk.tsx): a Focusable whose ACTIVATION — touch tap via the hit
  fact, d-pad CIRCLE, cursor click, one pressNode pipeline — summons the
  system OSK bound to `value`/`onInput`; commit fires `onSubmit` and closes.
  The panel docks through the overlay Portal (hitPass keeps the empty layer
  transparent to bounds facts; the panel itself claims normally) with the
  OSK's own button+gesture modality. `ref` exposes the controller for
  shortcut keys (a △ binding calls `ref.open()`).

The tap→type→search integration is pinned at the app level by the
pocket-youtube sim journeys (the framework's JSX view layer is compiled, not
bun-test-importable — the established boundary).

Validated: osk-controller 7 (plain AND browser), im-sim 11, canonical chain
(one pre-existing environmental failure: symbian-runtime's freshly linked
executable is being held by macOS provenance on this machine — fails
identically on the clean baseline, tracked separately), 52 web goldens
byte-exact.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@doodlewind
doodlewind marked this pull request as ready for review August 3, 2026 07:52
@doodlewind
doodlewind merged commit f5a8e03 into main Aug 3, 2026
@doodlewind
doodlewind deleted the feat/text-field branch August 3, 2026 07: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