Public: anyone can read this; the crew can change it.

forked from trevato/cs

The support line moves behind the door, and the panel becomes the shell's #373

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The support line now comes through the engine's door, and the shell renders its panel. `/` renders byte-for-byte what it did before: I compared `gamePage` output before and after. `bun run test` passes (typecheck plus 1513 tests), and the app boots with `/` answering 200.

shipped production is serving it deploy ae07c2d

opened this

The support line now comes through the engine's door, and the shell renders its panel. / renders byte-for-byte what it did before: I compared gamePage output before and after. bun run test passes (typecheck plus 1513 tests), and the app boots with / answering 200.

What moved

  • The module: src/client/support.ts and its test are now src/engine/support.ts and src/engine/support.test.ts, with every assertion unchanged.
  • The door: src/engine/index.ts exports supportLine, Facts, Running, NO_PICTURE and NO_PICTURE_SAYS, with a docstring like its neighbours'. browserOf stays inside the module, so only its test can reach it.
  • Running is unchanged. None of its six members names a game's concept (pointer, keys, fullscreen, hz, frameMs, failure), and all of them stay optional.
  • Surface and guide: surface.json is regenerated at 0.11.0, a minor bump because names were only added. boundary.test.ts lists the new group. GUIDE.md gains a ### support section with its measured weight, a seam-table row, and the updated whole-door weight (50.1 kB raw, 20.1 kB gzipped).
  • The panel: the <details>, summary, sentence, #supportline and copy button now live in src/pages/shell.ts as SUPPORT. An overlay asks for it with support: true, and it is rendered at the foot of that overlay. The shooter's menu asks for it; the 404 and 500 don't, and get no element. No CSS moved, so the CSP hash is untouched.
  • The shooter: src/client/main.ts and main.test.ts import from the door. The same ids (support, supportline, copysupport) render in the same place.

Two edits beyond the move

  • A reworded comment. boundary.test.ts read the comment text from "Play did nothing" as an import and failed, so I reworded it.
  • NO_PICTURE_SAYS is one long literal, where it was a sum of string literals. The value is identical. The minifier kept the sum even when nothing used it, which added about 400 B to every bundle that imports the door, the range's included.

Tests added

  • shell.test.ts: the exact ids when an overlay asks for the panel, and no element when it doesn't, including on the 404 and 500.
  • game.test.ts: each id appears once, inside the menu overlay.
  • The range's and example's bundle tests: each reads its built file and asserts none of the support text is in it. I checked that these fail with the old concatenated form.

Bundle sizes (bytes, raw / gzip level 9), main → this branch

BundleBeforeAfter
app126260 / 49142126257 / 49220
range40816 / 1693340816 / 16933 (identical)
example25004 / 1063125004 / 10632

The shooter's +78 B gzipped comes from its modules landing in a different order.

Not done: /range and /example still don't ask for the panel, and no visitor-visible change was made. Adding it to either is one support: true on its overlay plus the gathering in its entry, which is a follow-up.

To try it: open the preview's /, open the menu's "What this browser is doing", and copy the line. /range and /example are unchanged.

🤖 Generated with Claude Code

Closes #344

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs