Skip to content

feat(app): modern mobile UX on the framework touch stack + vita target#2

Draft
doodlewind wants to merge 2 commits into
feat/tcp-transportfrom
feat/vita-app-ux
Draft

feat(app): modern mobile UX on the framework touch stack + vita target#2
doodlewind wants to merge 2 commits into
feat/tcp-transportfrom
feat/vita-app-ux

Conversation

@doodlewind

Copy link
Copy Markdown
Contributor

Part 2/2 of Vita support (stacked on #1). The app becomes a modern-mobile YouTube on the Vita while staying byte-familiar on the PSP.

Browse — one list, layered input

@pocketjs/framework/virtual-list replaces the materialize-everything <For>: only the visible slice mounts (less memory on both consoles), touch pan/fling + tap-to-play where contacts exist, d-pad row walk through the framework focus manager everywhere. PSP flow preserved: LOAD MORE keeps its explicit ○ (near-end auto-fetch is hasFeature("input.touch")-gated), fresh searches focus row 0 so ○ plays the first result immediately.

Player — the touch layer

gesture action
tap toggle HUD
double-tap left/right third seek ∓/±10 s
double-tap center pause/resume
drag the bottom strip scrub with live bar+clock preview, one seek at release
downward fling back to results

All inert on PSP (touches() empty); the button map is untouched.

Vita target

pocket.json enhances input.touch/input.cursor/input.analog.left; hello.device.target drives the host's 512×256@24fps/44.1kHz profile; bun run vitadist/vita/main.vpk against the stock pocketjs-vita host (WiFi svc + RAM plane + audio live in the host library — no app-local crate).

Framework fixes found shipping this (upstream, in the pin)

  • VirtualList viewport width-0 inside flex-ROW parents → paints nothing (mock hosts have no layout; found via real-core hitTest probe) → width: SIZE_FULL default.
  • Handle methods leaked props subscriptions into caller effects (focusRow-on-search re-fired per append) → untracked.

Tests

Two new sim journeys: the full touch path (tap row → play → double-tap pause → scrub lands within 20 s of the finger → swipe back, exact effect-command sequence asserted) and fling-never-taps. All 9 pre-existing journeys green unchanged. Both targets build.

Remaining follow-ups: HD split cards for density-2 (cardHD), real-hardware checklist (pocketjs docs/SVC-VITA.md).

🤖 Generated with Claude Code

doodlewind and others added 2 commits July 23, 2026 21:08
The browse screen moves from a materialize-everything <For> with a manual
focus signal to @pocketjs/framework/virtual-list: only the visible slice
mounts (less memory than before on BOTH consoles), touch pans/flings and
taps rows where the host delivers contacts, the d-pad walks rows through
the framework focus manager everywhere (PSP UX unchanged — the LOAD MORE
sentinel keeps its explicit ○; near-end auto-fetch is feature-gated to
input.touch builds), and a fresh search focuses row 0 so ○ still plays the
first result immediately.

The player grows the touch layer: tap toggles the HUD, double-tap the
left/right third seeks ±10 s and the center toggles pause, dragging the
bottom strip scrubs with live bar/clock preview and one seek at release,
and a decisive downward fling leaves the player. All of it rides
@pocketjs/framework/gesture — on PSP touches() is empty and every path is
inert; the button map is untouched.

Vita target: pocket.json enhances input.touch/input.cursor/
input.analog.left (requires unchanged — PSP admission intact), hello now
carries device:{target} for the host's stream-profile negotiation, and
`bun run vita` builds dist/vita/main.vpk through the vendored pocket
pipeline against the STOCK pocketjs-vita host (WiFi svc + RAM video plane
+ audio ship in the host library — no app-local vita crate needed).
check:platforms now admits both targets.

Shipping this surfaced two framework bugs, fixed upstream in the vendored
pin: VirtualList viewports defaulting to width 0 inside flex-ROW parents
(paints nothing; mock hosts have no layout — found with a real-core hitTest
probe) and handle methods leaking props subscriptions into caller effects
(focusRow-on-search re-fired per append and yanked focus to the top).

Tests: two new sim journeys — the full touch path (tap row -> play ->
double-tap pause -> scrub to a position -> swipe back, asserting the exact
effect-command sequence and the scrub position) and fling-never-taps; all
nine existing journeys (d-pad, OSK chords, OSK touch typing, load-more
retirement) pass on the VirtualList browse unchanged. Both targets build:
dist/vita/main.vpk + dist/EBOOT.PBP.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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