Make the framebuffer demos playable on touch devices - #1252
Open
mho22 wants to merge 1 commit into
Open
Conversation
Contributor
Phase B-1 matrix build status —
|
| Package | Arch | Status | Sha |
|---|---|---|---|
| shell | wasm32 | failed | — |
| lamp | wasm32 | failed | — |
| nginx-php-vfs | wasm32 | failed | — |
| nginx-vfs | wasm32 | failed | — |
| node-vfs | wasm32 | failed | — |
| wordpress | wasm32 | failed | — |
Auto-generated; replaced on each push. Raw data in the publish-status workflow artifact.
mho22
marked this pull request as ready for review
August 12, 2026 14:24
Keyboard-driven framebuffer demos were unusable on phones and tablets: fbDOOM needs a keyboard, the modeset demo only listened for mouse events, and a tap could strand the browser in pointer-lock mode with no Esc key to leave it. The launch pane and theme popup also clipped or trapped scrolling on small screens. Add an on-screen touch overlay (d-pad, FIRE, MENU) gated by a new presentation.touchControls demo-config field, make a tap on the fbDOOM canvas send Enter and Space so menus select and doors open, drive the modeset demo from pointer events so touch acts as a left-button mouse, ignore pointer-capture requests from touch input, and fix the small-screen layout of the launch pane, theme popup, and dock. Bump the seven image-package revisions that declare demo-config.ts as a build input, record the touch-enabled demo config digest in the lazy-shell artifact lock, and regenerate the program index so every row matches the committed tree.
mho22
force-pushed
the
touch/framebuffer-demo-touch-controls
branch
from
August 13, 2026 11:27
7ee429f to
66db0d0
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.
Why
The framebuffer demos assume a desktop. fbDOOM is keyboard-driven, so on a phone or tablet there is no way to move, shoot, or even leave the demo attract loop. The modeset drawing demo listened only for mouse events, so a finger could not draw. Worse, tapping the fbDOOM canvas requested browser pointer lock; on a touch device there is no Esc key to release it, so a tap could strand the user in locked mode. Small screens had their own problems: the Launch New Machine pane trapped vertical scrolling inside the machines table, the theme popup clipped its lower entries so Dark mode was unreachable, and the dock could scroll its left edge out of reach.
What changed
apps/browser-demos/pages/kandelo/panes/TouchControls.tsx): a keyboard-shaped d-pad bottom-left, a FIRE button (LeftCtrl) bottom-right, and a MENU button (Esc) top-left. Buttons send the same Linux MEDIUMRAW bytes as the physical keyboard path, with a minimum 50 ms hold so clients that latch key state once per tic never miss a press.presentation.touchControlsboolean carried through the demo-config pipeline (web-libs/kandelo-session), set on the doom profile in the three homebrew demo JSON sources and the builtin fallback, and shown only on coarse-pointer devices while a process owns the framebuffer.host/src/framebuffer/browser-controls.ts, so a tap can never strand a touch user in pointer-lock mode, and the pointer-lock rejection thrown by touch-only platforms is swallowed.web-libs/kandelo-session/src/demo-config.tsas a build input get revision bumps (shell moves to canonical revision 24), the touch-enabled demo config digest is recorded in the lazy-shell artifact lock, andpackages/registry/program-packages.jsonis regenerated against the current main tree so cached archives without the new field are rejected.docs-site/guide/vfs-images.mddocumentspresentation.touchControls.Validation
cargo xtask build-deps program-index-checkandprogram-index-context-checkpass viascripts/dev-shell.sh: every row of the regenerated index matches the committed tree.scripts/dev-shell.shacross the four affected suites:host/test/shell-vfs-build.test.ts(revision pins),host/test/shell-lazy-archive-inputs.test.ts,web-libs/kandelo-session/test/kandelo-session.test.ts(including the newtouchControlsfixture assertions), andtests/package-system/source-rootfs-shell-bridge.test.ts(the doom profile carriestouchControls: truein both JSON sources)."touchControls": true../run.sh browser: overlay layout portrait and landscape, d-pad movement, FIRE, MENU, tap-to-use on doors, tap-to-select in menus, theme popup reaching Dark mode, and launch-pane scrolling.scripts/homebrew-main-shell-image-contract.ts(executes inside the package flow against a built image), conformance suites and benchmarks (no kernel, syscall, or hot-path changes), and Playwright.Known unrelated failure:
exact-linux-contractalso fails on main because upstream Homebrew bumpedca-certificatesto cacert-2026-08-13 and the checked-inhomebrew/homebrew-native-compatibility-lock.jsonis behind; the lock refresh belongs in its own change on main.