Public: anyone can read this; the crew can change it.
A display launches into the arcade host, playable by keyboard and on a phone #9554
A display now launches into the Arcade host: the display page has a "Launch" link, and the host lists the display's carts and answers with its own CSP plus the floor headers.
stopped parked by the crew deploy 411e1f4
4 earlier comments
A display now launches into the Arcade host: the display page has a "Launch" link, and the host lists the display's carts and answers with its own CSP plus the floor headers. The new test/arcade-host.test.ts (4 tests) passes, as do tsc --noEmit, design-lint, gate and a hand-picked set of related tests (unreached, display, arcade, host, security-floor, builds). The full suite was not run here; fast.ts said the diff was too broad to name tests. I did not look at the preview, and I did not call the keep_plan tool.
What moved where
- Ported from
origin/incoming/jay-main:src/display/launch.ts,src/arcade/host.ts,src/arcade/snapshot.ts,src/arcade/arcade.htmlandsrc/arcade/jbox-spin.js. - Wiring:
readCover(Jay's, from hisbuilds.ts) is added tosrc/git/builds.ts.src/http/server.tsanswersarcade.<app domain>throughserveArcade, wrapped insecurityFloor, before any app or forge route. - Launch link: the display page shows "Launch" only on the display titled
arcade-buildsin the shelf layout, because the host serves only that display. A grid or graph display gets no link. - Unreached list:
scripts/unreached-allow.jsonno longer lists the six modules that are now imported. - Docs:
docs/design/areas/display.mdis updated. The issue namesdisplays.md, which does not exist. - Third-party code: carts play on the Arcade's own origin, so a cart cannot reach the forge's cookies; the forge sets no
Domain=cookie. Carts are served read-only, withframe-ancestorslimited to the Arcade and the forge.
Changes to Jay's files (host and page only)
- Fonts: the Google Fonts links are gone from
arcade.html, and the CSP dropsfonts.googleapis.comandfonts.gstatic.com(font-src 'none'). The pixel and Bungee fonts now fall back to system fonts. - Reaching off-front carts: every cart is focusable, and there are PREV and NEXT buttons.
- Phone hint: a "TAP A CART…" hint replaces "Z X BUILD" under
(hover: none), and the footer text is now--ink, which has better contrast than the old dim colour. - Focus: focus moves to
#backwhen the player opens and to the cart when it closes. - Noscript: a line says the Arcade needs JavaScript.
Left alone:
- After the cart boots, focus still moves into the game frame, as before. Otherwise a keyboard player could not control the game.
#backis one Shift-Tab away. - The
Co-authored-by: Jay Morantrailer uses the placeholder[email protected], as #9217 did, so it needs correcting at merge.
To try: bun test test/arcade-host.test.ts. To see a launched display on the preview, open /<owner>/<display>/display on the preview URL for this pull (URL not known to me yet) and click Launch. The display must be titled arcade-builds and owned by a site admin.
The preview deploy itself didn't fail. The log ends ready and done, and /healthz on the preview answered 200. "No tests declared, none run" is a note about the deploy step, not a test failure, and forge.json still declares only check.
What was red was bun scripts/gate.ts. Its "say how to try it on the preview" rule needs a commit message with a Try: line, because this pull touches src/http/server.ts and src/web/pages/display.ts. I didn't catch it on the first push, because I only ran the gate with its output cut to the last lines.
I've added an empty commit with that line (3d2bef88) and pushed it. The gate now exits 0. I haven't re-run tsc or the tests since, but no code changed.
Try it: on the preview, open /<owner>/<display>/display for a display titled arcade-builds and press Launch. Everything else in the pull is as in the earlier description: the Arcade host, its CSP with no third-party fonts, and the keyboard and phone fixes.
I removed the two hollow-work allowances the check failed on and pushed (9748ef49).
scripts/hollow-allow.ts listed demoDefaults and demoFactsAt in src/actions/pin_demos.ts as unreached, waiting on #9208. The Arcade host now reaches both through src/display/items.ts, so scripts/hollow.ts flagged the entries as stale. ALLOWED is now empty.
Locally bun scripts/hollow.ts reports no hollow work, and scripts/gate.ts and tsc --noEmit are clean. Of the hollow-related test files, test/hollow.test.ts and test/hollow-cli.test.ts pass. I did not run the full suite, so the forge's check on this push is the final verdict.
Try it: on the preview, open /<owner>/<display>/display for a display titled arcade-builds and press Launch.
I merged main into the branch, resolved the two conflicts, and pushed. tsc, scripts/gate.ts and scripts/design-lint.ts came back clean. The 51 display and Arcade tests I ran pass. I did not run the full suite, so the forge's check on this push is the first run of it.
src/web/pages/display.ts: it now has both sides. The writer's choose-builds form frommainis kept. So are the Arcade Launch link on thearcade-buildsshelf display and itsarcadeRepoOfandarcadeHomeimports. I merged the two header comments into one.docs/design/areas/display.md: it keepsmain's wording (covers, the player and editing the title still wait), the writers' form paragraph, and my paragraph on Launch and the host page.
No other files conflicted. Git auto-merged scripts/unreached-allow.json and src/http/server.ts.
Parked by the crew: the check stayed red through 2 automatic tries
A display now launches into the Arcade host: the display page has a "Launch" link, and the host lists the display's carts and answers with its own CSP plus the floor headers. The new
test/arcade-host.test.ts(4 tests) passes, as dotsc --noEmit,design-lint,gateand a hand-picked set of related tests (unreached, display, arcade, host, security-floor, builds). The full suite was not run here;fast.tssaid the diff was too broad to name tests. I did not look at the preview, and I did not call thekeep_plantool.What moved where
origin/incoming/jay-main:src/display/launch.ts,src/arcade/host.ts,src/arcade/snapshot.ts,src/arcade/arcade.htmlandsrc/arcade/jbox-spin.js.readCover(Jay's, from hisbuilds.ts) is added tosrc/git/builds.ts.src/http/server.tsanswersarcade.<app domain>throughserveArcade, wrapped insecurityFloor, before any app or forge route.arcade-buildsin the shelf layout, because the host serves only that display. A grid or graph display gets no link.scripts/unreached-allow.jsonno longer lists the six modules that are now imported.docs/design/areas/display.mdis updated. The issue namesdisplays.md, which does not exist.Domain=cookie. Carts are served read-only, withframe-ancestorslimited to the Arcade and the forge.Changes to Jay's files (host and page only)
arcade.html, and the CSP dropsfonts.googleapis.comandfonts.gstatic.com(font-src 'none'). The pixel and Bungee fonts now fall back to system fonts.(hover: none), and the footer text is now--ink, which has better contrast than the old dim colour.#backwhen the player opens and to the cart when it closes.Left alone:
#backis one Shift-Tab away.Co-authored-by: Jay Morantrailer uses the placeholder[email protected], as #9217 did, so it needs correcting at merge.To try:
bun test test/arcade-host.test.ts. To see a launched display on the preview, open/<owner>/<display>/displayon the preview URL for this pull (URL not known to me yet) and click Launch. The display must be titledarcade-buildsand owned by a site admin.Closes #9468