Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
the picker above the game needs to be better for all the games we have now #100
Merged 34d 0h ago, live in production
The game menu above each game now stays usable with all 35 games. It's pushed, but I didn't see a full green run. playtest.test.mjs and serve.test.mjs hit my 120-second timeout and I moved on without checking their result.
-
Reviews
Changes requested — before the latest pushThe grouped, scrolling menu with a find box fits the issue, and the served page loads shell.js. Nothing here touches identity, writes or the terminal, so the security items do not apply. Three things to fix in one round:
- Screen readers lose the grouping (shell.js:118). The kind headings are aria-hidden, so a screen-reader user hears one flat list of 30+ links. The "Soon" heading is not hidden, so the two are also inconsistent. Fix: make each group a real group, either a nested ul with role=group and aria-label=kind, or heading rows with role=presentation removed and aria-hidden dropped.
- The new test does not cover the new behaviour (shell.test.mjs). It checks that the search box exists and that titles appear. It would still pass if typing in the box did nothing. Add tests that set find.value, dispatch input, and assert: non-matching items and empty kind headings are hidden, "No game matches" shows for a nonsense query, and clearing the query restores everything. Also assert the Soon games are not links, and that opening the menu marks the current game with aria-current.
- It was never run in a browser. The pull says the menu was not opened, and on a 360px phone the on-screen keyboard shrinks the viewport, which is the main risk for the 70dvh cap and the search box. Run it at 360px width (with the keyboard up if you can), confirm the box and the first results stay visible, and say so in the description. Typing in the box must not close the menu on pointerdown.
Smaller: the
list.querySelector?.andscrollIntoView?.guards exist only to satisfy the test stub. Make the stub provide those methods rather than shaping production code around it.Changes requested — before the latest pushThe grouped, scrolling menu with a find box fits the issue, and the security items do not apply (no identity, writes or terminal here). One thing to fix first, plus two smaller ones.
- Typing in the find box reaches the game. 34 game pages listen for keydown on document or window, and the find input does not stop its key events from bubbling. So letters, Space and arrow keys typed to search also steer or act on the running game. A game that calls preventDefault on Space or the arrows will also swallow a space in a query such as "Soapbox Derby". Fix: add a keydown listener on #pp-find that calls e.stopPropagation(), except for Escape, which must still reach the menu's close handler at shell.js:116. Add a test: dispatch a keydown on find and assert a document-level listener does not see it, while Escape still closes the menu.
- The README (line 67) says shell.js provides the game menu but does not mention the find box or the kind groups. Add one line on how to use them.
- Nobody has opened this in a browser. The 360px width with the keyboard up is still unchecked. This is not blocking, but say so in the description.
ApprovedEarlier asks: (1) keys typed in the find box reaching the game — met: keydown/keyup/keypress stop at #pp-find except Escape, with a test that a document listener sees nothing and Escape still closes the menu. (2) README line on groups and find box — met. (3) say the browser check is open — met in the description. The preview serves the new shell.js and /balote/ answers 200. Next, two things: Non-blocking: have someone open the menu on a real 360px phone with the keyboard up and confirm the find row and first results stay visible. Non-blocking: add arrow-key movement from the find box into the list, so keyboard users do not have to Tab past it.
-
Checks
shipped production is serving it deploy 7b8dc66
-
History
- Menu: keys typed in the find box stay out of the game; README says how to find a game (#98) bbca7eb
- Menu: kinds are labelled groups, find box stays pinned, tests drive the search (#98) ed23128
- Take main's scripted rounds; mine duplicated them (#98) aee070f
- Merge main into the picker pull (#98) 52680c0
- Fix the red check: scripted rounds for four games, page tests read through the playtest scope, no-select CSS on Firefly Jar (#98) a5ad774
- Add Sheepdog: guide the flock through the gate and into the pen before the light goes (#93) 6f1ec61
- Game menu: group by kind, scroll within the viewport, add a find box (#98) 56a545d
- Add Firefly Jar: tap the glowing fireflies into a jar on a summer night before the moths put the lantern out (#90) 6db3d65
- From the app: pressing and holding i. mobile keeps highlighting and adding the iphone magni... (#89) de8d11a
- Playtests: a scripted round per game that reaches a win or a loss (#70) 89b614c
- Add Soapbox Derby: steer a wooden cart down a cobbled hill between the hay bales (#80) 4512fea
- Add Signal Box: repeat the lever sequence to route each train through a country junction (#79) 6436bd8
- Add Espresso Bar: pour each coffee to the line as cups slide past under the spout (#71) 50e7872
- Add Wood Split: split logs on a chopping block by bringing the axe down on the crack (#67) 553ae24
- Add Goalkeeper: dive left or right to save ten penalties in a village football ground (#75) 8b54ed6
- Add Bell Tower: ring the peal back on four bells, one bell longer each round (#69) 8a3ca29
- Add Archery: ten arrows at a straw target, reading the wind off a pennant (#64) 8327827
- Add Tram Line: drive a city tram and stop each door on the yellow mark (#63) cf817a1
- Add Tightrope: walk a wire between two rooftops, leaning to keep your balance in the wind (#60) 93e1bbc
- games need to have a much higher playability standard. tests that actually pl… (#49) 8c0d92c
4 earlier comments
The game menu above each game now stays usable with all 35 games. It's pushed, but I didn't see a full green run. playtest.test.mjs and serve.test.mjs hit my 120-second timeout and I moved on without checking their result. bun test shell.test.mjs passes (7 tests, including a new one). I only ran bun x tsc --noEmit and it printed nothing but a help link, so I can't call it a pass; the repo has no tsconfig.json or package.json. I didn't open the menu in a browser.
What changed (shell.js)
- Grouping: games are listed under their kind (Throwing, Timing, Catching and so on), in the order the kinds first appear in
GAMES. Games markedsoonstill sit in a "Soon" group at the end, unlinked. - Scrolling: the list used to run off the screen. It now caps at about 70% of the viewport height (at most 480px) and scrolls on its own.
- Find box: a "Find a game" search box at the top filters the list as you type, using the same word matching as the home page's
filterGames. Kind headings with no match hide, and "No game matches" shows when nothing is left. - Current game: opening the menu scrolls the game you're on into view.
What I chose not to do: no keyboard arrow navigation inside the list, and no per-game accent colours or blurbs in the menu. The links, Tab order and Escape-to-close are unchanged.
To try it: open any game, e.g. /balote/, and tap the title at the top centre.
New test: the menu holds the search box, every kind heading, and every playable game.
🤖 Generated with Claude Code
The ten failures are fixed and pushed. The cause was four games (Espresso Bar, Firefly Jar, Signal Box, Soapbox Derby) that landed without the test scaffolding, not the game-menu change in #98. I ran playtest.test.mjs for the scripted rounds, the Signal Box, Soapbox Derby, Firefly Jar and Espresso Bar game tests plus shell.test.mjs, and the one serve.test.mjs no-select check. Each passed. I did not run the full suite; the forge runs it on this push. This repo has no package.json, tsconfig.json or scripts/gate.ts, so there was no type check or gate to run.
- Missing scripted rounds: I added a round to
rounds.mjsfor each of the four games, so "every game has a scripted round" passes again. Each script plays the game properly and reaches an outcome that an untouched game doesn't:- Espresso Bar: pours to the painted line and finishes all twenty cups.
- Firefly Jar: taps the glowing fireflies, so the jar ends with a nonzero count.
- Soapbox Derby: steers through the middle of each gate gap and reaches the banner.
- Signal Box: routes two trains correctly, then pulls wrong levers until the third train is lost. A correct run never ends on its own, so the script has to end in a loss line.
- Page tests: the Soapbox Derby and Signal Box page tests read the game's state through the old
vm.runInContext, which can no longer see the page's variables. They now useg.read(...), which is the only change to those tests and fixes their four failures. - Firefly Jar: its page lacked the rule that turns off text selection and the iOS touch callout, so I added it. This fixes the "every game page turns off text selection" failure.
The #98 menu change is untouched.
Sheepdog (#93) is on main but not on this branch. If it lacks a scripted round, it will fail the same check after the merge.
I merged main into the branch and pushed; the only conflict was firefly-jar/index.html.
- Conflict:
mainhad already made the same fix to the Firefly Jar page, merging the no-select rule into itshtml, bodyline. I tookmain's version. - Rounds:
mainhad also added scripted rounds for Espresso Bar, Firefly Jar, Signal Box and Soapbox Derby. Mine would have duplicated those entries, so I dropped them androunds.mjsnow matchesmain. - Left in the branch: the page-test fixes for Soapbox Derby and Signal Box, and the game menu change from #98. The pull now differs from
mainonly inshell.jsandshell.test.mjs. - Tests: I re-ran
shell.test.mjsand the Soapbox Derby, Signal Box and Firefly Jar tests, and all passed. I did not re-run the full suite or the other tests; the forge runs it on this push.
I fixed all three review points except the browser run, which I couldn't do. I changed shell.js and shell.test.mjs, and shell.test.mjs now passes (11 tests, including the new menu ones).
- Grouping for screen readers (
shell.js):- Each kind is now its own
ulwithrole="group"andaria-labelset to the kind. - The visible heading stays
aria-hiddenbecause the group label already announces it. - "Soon" is built the same way, so the two are consistent.
- Each kind is now its own
- Tests (
shell.test.mjs):- The test stub now keeps a small element tree, with
querySelector,contains,scrollIntoViewand event dispatch. That replaced the?.guards in production code (list.querySelector?.andscrollIntoView?.). - New tests set
find.valueand dispatchinput, then check:- Non-matching items and kinds left empty are hidden.
- A nonsense query shows "No game matches", and clearing it restores everything.
- Soon games are
spans, not links. - Opening the menu marks the current game with
aria-currentand scrolls it into view. - A pointerdown on the find box doesn't close the menu; one outside it does.
- The test stub now keeps a small element tree, with
- 360px phone:
- Not run. Chromium exists here but aborts at startup in this sandbox, because it can't create its socket and its profile directory is read-only. I did not open the menu in a browser, so I can't confirm the box and first results stay visible with the keyboard up.
- Pinned find box: the find row is now
position: sticky; top: 0, so it can't scroll out of the list. - Input font size: the input is at least 16px, so iOS doesn't zoom when it's focused.
- Please check: a person with a phone should open the menu on the preview at 360px.
The scripts in scripts/ don't include design-lint.ts in this clone, so I did not run it.
The game menu (the picker above every game) now lists the games under their kind, scrolls within the screen, and has a find box. Keys typed in the box no longer reach the running game.
What changed:
- Find box: stops
keydown,keyupandkeypressfrom reaching the page, so letters, Space and the arrows don't steer or act on the game, and a game that callspreventDefaulton Space can't swallow the space in "Soapbox Derby". Escape still reaches the menu's close handler. - Menu structure: each kind is a nested
ulwithrole="group"andaria-labelset to the kind, so screen readers announce the grouping. Games not made yet sit last under "Soon", as plain labels rather than links. - Search: typing hides games that don't match and kinds left empty. A query that matches nothing shows "No game matches", and clearing it restores the whole list.
- Opening the menu scrolls the current game (marked
aria-current="page") into view. - Phone layout: the find row stays pinned at the top of the list, and the input is at least 16px so iOS doesn't zoom on focus.
- README: the
shell.jsline now says how to use the kind groups and the find box.
Tests: in shell.test.mjs, the stub DOM now keeps a real element tree with querySelector, contains, scrollIntoView and bubbling events. That let me drop the ?. guards production code had only for the stub. New tests cover:
- the labelled groups
- hiding as you type
- the empty state and restoring on clear
- Soon games not being links
aria-currentand the scroll on open- a pointerdown on the find box not closing the menu, and one outside closing it
- keys typed in the box not reaching a listener on the document, while Escape still closes the menu (this test fails without the fix)
All 12 tests in shell.test.mjs pass.
Not run:
- Browser check: nobody has opened this in a browser yet. Chromium is installed in my sandbox but aborts at startup there, so the 360px-wide check with the on-screen keyboard up is still open. It needs a look on the preview from a real phone.
- Design lint:
scripts/design-lint.tsdoesn't exist in this repository, so I didn't run it.
To try it: open any game on the preview, tap the menu, type "tr" in the find box and check the game stays still, then press Escape.
🤖 Generated with Claude Code
The game menu above each game now stays usable with all 35 games. It's pushed, but I didn't see a full green run.
playtest.test.mjsandserve.test.mjshit my 120-second timeout and I moved on without checking their result.bun test shell.test.mjspasses (7 tests, including a new one). I only ranbun x tsc --noEmitand it printed nothing but a help link, so I can't call it a pass; the repo has notsconfig.jsonorpackage.json. I didn't open the menu in a browser.What changed (
shell.js)GAMES. Games markedsoonstill sit in a "Soon" group at the end, unlinked.filterGames. Kind headings with no match hide, and "No game matches" shows when nothing is left.What I chose not to do: no keyboard arrow navigation inside the list, and no per-game accent colours or blurbs in the menu. The links, Tab order and Escape-to-close are unchanged.
To try it: open any game, e.g.
/balote/, and tap the title at the top centre.New test: the menu holds the search box, every kind heading, and every playable game.
🤖 Generated with Claude Code
Closes #98