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

Parked opened this
Closed without merging

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.

Notes

stopped parked by the crew deploy 411e1f4

opened this

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.html and src/arcade/jbox-spin.js.
  • Wiring: readCover (Jay's, from his builds.ts) is added to src/git/builds.ts. src/http/server.ts answers arcade.<app domain> through serveArcade, wrapped in securityFloor, before any app or forge route.
  • Launch link: the display page shows "Launch" only on the display titled arcade-builds in the shelf layout, because the host serves only that display. A grid or graph display gets no link.
  • Unreached list: scripts/unreached-allow.json no longer lists the six modules that are now imported.
  • Docs: docs/design/areas/display.md is updated. The issue names displays.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, with frame-ancestors limited 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 drops fonts.googleapis.com and fonts.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 #back when 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. #back is one Shift-Tab away.
  • The Co-authored-by: Jay Moran trailer 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.

Closes #9468

4 earlier comments
commented

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.html and src/arcade/jbox-spin.js.
  • Wiring: readCover (Jay's, from his builds.ts) is added to src/git/builds.ts. src/http/server.ts answers arcade.<app domain> through serveArcade, wrapped in securityFloor, before any app or forge route.
  • Launch link: the display page shows "Launch" only on the display titled arcade-builds in the shelf layout, because the host serves only that display. A grid or graph display gets no link.
  • Unreached list: scripts/unreached-allow.json no longer lists the six modules that are now imported.
  • Docs: docs/design/areas/display.md is updated. The issue names displays.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, with frame-ancestors limited 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 drops fonts.googleapis.com and fonts.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 #back when 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. #back is one Shift-Tab away.
  • The Co-authored-by: Jay Moran trailer 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.

commented

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.

commented

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.

commented

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 from main is kept. So are the Arcade Launch link on the arcade-builds shelf display and its arcadeRepoOf and arcadeHome imports. I merged the two header comments into one.
  • docs/design/areas/display.md: it keeps main'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.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs