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

Migrated from github.com/amirmushichge/pixel-plays

Add Cloakroom: the playable page and its place in the catalogue, on the rules already in `cloakroom/cloak.js` #123

Merged opened this

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

Merged

Cloakroom now has a playable page at /cloakroom/, listed in the catalogue. serve.test.mjs, the Cloakroom rules tests and playtest.test.mjs pass (258 tests). I did not run the full suite or scripts/design-lint.ts.

Notes

shipped production is serving it deploy ab54f53

opened this

Cloakroom now has a playable page at /cloakroom/, listed in the catalogue. serve.test.mjs, the Cloakroom rules tests and playtest.test.mjs pass (258 tests). I did not run the full suite or scripts/design-lint.ts. scripts/gate.ts doesn't exist in this clone. bun x tsc --noEmit printed only its help text and no errors, so I'm not counting it as a clean check.

  • Page: cloakroom/index.html draws the game and plays it only through cloakroom/cloak.js. Tapping a coat turns its tag. Arrow keys move a focus ring and Space or Enter turns. The HUD and end line show what the rules report. Only the coat sway and the light under the door move, and both stop under prefers-reduced-motion.
  • Catalogue: the GAMES entry in shell.js, the matching <li> in index.html, the README Games table row, the no-music list and the ambient-motion line all say Cloakroom. bun scripts/og.mjs produced og/cloakroom.png and the share tags; the run also changed og/home.png.
  • Tests:

- rounds.mjs has a scripted round that turns mismatched pairs until the loss line, "lost: too many mismatches". - serve.test.mjs asserts /cloakroom/ and /cloakroom/cloak.js answer 200.

  • Not done: no new game rules in the page, no .mp3, and no changes to other games.

Closes #108

2 earlier comments
commented

Cloakroom now has a playable page at /cloakroom/, listed in the catalogue. serve.test.mjs, the Cloakroom rules tests and playtest.test.mjs pass (258 tests). I did not run the full suite or scripts/design-lint.ts. scripts/gate.ts doesn't exist in this clone. bun x tsc --noEmit printed only its help text and no errors, so I'm not counting it as a clean check.

  • Page: cloakroom/index.html draws the game and plays it only through cloakroom/cloak.js. Tapping a coat turns its tag. Arrow keys move a focus ring and Space or Enter turns. The HUD and end line show what the rules report. Only the coat sway and the light under the door move, and both stop under prefers-reduced-motion.
  • Catalogue: the GAMES entry in shell.js, the matching <li> in index.html, the README Games table row, the no-music list and the ambient-motion line all say Cloakroom. bun scripts/og.mjs produced og/cloakroom.png and the share tags; the run also changed og/home.png.
  • Tests:

- rounds.mjs has a scripted round that turns mismatched pairs until the loss line, "lost: too many mismatches". - serve.test.mjs asserts /cloakroom/ and /cloakroom/cloak.js answer 200.

  • Not done: no new game rules in the page, no .mp3, and no changes to other games.
commented

The preview failure came from a flaky test, not from Cloakroom. I've pushed a fix. I couldn't reproduce the deploy run itself: the full 788-test suite hasn't been run here since the fix.

Cause: every game page and its track is served in serve.test.mjs failed intermittently. About one run in six showed Malformed_HTTP_Response on a GET right after the test's HEAD request for an .mp3. It never touched Cloakroom's files, and the test passed on its own the first time I ran it.

Fix: in serve.mjs, a HEAD request for a static file now ends with no body. Before, the full file body was passed to res.end(). After the change, 45 isolated runs of that test had no failures. serve.test.mjs plus the Cloakroom tests pass, 66 in total. I don't know that this was the exact cause. The evidence is the drop from roughly one failure in six to none in 45.

Branch: I rebased on main before pushing, which left the branch diverged from the earlier push. A normal push was rejected and force pushes are refused, so I merged the earlier push back in. The branch history now has a merge commit.

commented

I merged main into the branch, resolved both conflicts and pushed (f734684). serve.test.mjs plus the Cloakroom and Egg Basket tests pass (86 tests). I did not run the full suite here, and the forge's check on this push hasn't come back yet.

  • README.md: two lines conflicted, the no-music game list and the ambient-motion line. I took main's wording, which adds Egg Basket, and added Cloakroom back to both lines. The Games table row merged without trouble.
  • og/home.png: I took main's copy and ran bun scripts/og.mjs again so the home grid includes both Egg Basket and Cloakroom. og/cloakroom.png was unchanged.
Approved

Cloakroom is playable at /cloakroom/ (200 on the preview) and reachable from the home list and the game menu. It plays only through cloak.js, which has its own tests. The page works with a tap or the keyboard, has a visible focus ring, a live status line and a mute button, and the number and colour on a turned tag mean it plays without sound or colour alone. The share card, README row and no-music list are updated, and the scripted round in rounds.mjs reaches the loss line. Two things I would do next: (1) add a short <noscript> line to cloakroom/index.html, since with JavaScript off the page is a blank canvas (the sibling games do the same, so do it for all of them); (2) give the mute button a 44px minimum hit area on a 360px phone, because the 10px padding with a negative margin leaves a small target. The serve.mjs HEAD change is unrelated to the issue but fixes the flaky test, and I accept it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs