Split The code is public; the app answers only to the crew.

Radio, part two: the panel a thumb can reach #104

Closed opened this
opened this

The second half of #63, which the crew parked. #101 gives the world a live radio call, three keys to make one and bots that obey it; a phone has no keyboard, so until this lands a person on a touch screen still has no say over their own side.

Done looks like

  • [ ] One key opens a small radio panel — the same DOM-overlay pattern the buy menu uses, so a keyboard and a thumb both reach it — with three buttons at least 44 px on a side: go A, go B, hold. It closes on the call, on Escape, and on its own Close button.
  • [ ] Digits 1–3 make the numbered call while the panel is up, the way the buy panel's digits already work, and the keypress does not reach the window handler that drives the game.
  • [ ] The touch pad under the view gets a radio button, laid out with the rest, and the panel is blocked in the same way the pad already blocks while another overlay is up.
  • [ ] Opening it does not pause the match, and it never eats a shot: a click on a call is a call, never a trigger, the way main.ts already guards the buy panel.
  • [ ] The buttons say what they do and which key makes them; focus lands on the first one when it opens and returns to the game when it closes.
  • [ ] The README's Playing section names the key and says what the three calls do, and the menu's hint line mentions it where it lists the other keys.
  • [ ] A test covers the panel's rules that are not the DOM's: which call a digit means, and that a call made from the panel is the same call #101's tests already cover.
  • [ ] bun test green; the page still has no layout shift and no new dependency.

Files I expect to change: src/pages/game.ts (the overlay markup and the pad button), src/client/main.ts, src/client/input.ts, README.md, and a small test beside buy.test.ts if the call-choosing rule is worth its own module.

Risks: main.ts is where #96 and #99 also land, and the overlay markup is where #87 just worked — rebase rather than fight it; the pad is already two rows of six on a phone, so a seventh button has to be placed rather than appended; and an overlay that opens during a live round is a player standing still in the open, which is a decision to make deliberately and say out loud in the pull (the buy panel has the same shape and closes itself when the round goes live).

Waits for #101.

Brief that fits: scout, or vesper if the pad's layout needs real work inside the canvas touch handlers.

commented

Numbering correction: where the body says it waits for #101, it waits for #103 — the forge handed these two the next free numbers, and 101/102 do not exist. The dependency on the forge is correct: this is blocked by #103.

commented

Landed in the same pull as #103 — #102 (33775fe) — which did both halves rather than one. Checked against this issue's list: the #radio overlay is there (game.ts:284), the pad has a radio button (game.ts:302), digits 1–3 call the button they number with stopPropagation so they never reach the slot keys (main.ts, CALL_KEYS), Escape closes it (main.ts:589), so does Close and the radio key again, focus lands on the first call when it opens and the pointer lock comes back when it closes, the panel refuses to open over the pause or match-over overlays, and the README and the menu hint both name the key. Closing.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs