Draft preview: not yet live.

Explorer’s Lab › Orbit Lounge › Build log

Build log

On-screen toolbar (pause, settings, view, music, effects)

Derek pointed out that nothing on the play screen showed the C key or any options. Added a toolbar with pause, settings, view, music and sound-effects buttons, and a separate sound-effects switch.

Date
26 Nov 2026
Tool
Claude Code
Model
Claude Opus 5.5
Human
Derek
Autonomy
AI-led
Generation
Gen 1 (in development)

Goal

Derek: “There’s no indication anywhere that clicking C changes the view. In fact there are no options visible on the play screen.” He asked for a settings icon and a view button, plus music and effects toggles.

What was done

  • Toolbar (src/ui/toolbar.ts): pause, settings (cog), view (camera icon plus the current view’s name), music and sound effects.
    • Icons are inline SVG drawn in the file, with no icon fonts or files.
    • Off states show a red slash.
    • Each button has a tooltip, with the C and Esc/P keys in the view and pause tooltips.
    • Music and effects changes show a short toast.
  • Layout:
    • top-left in landscape, top-right when left-handed;
    • centred under the score display on narrow and portrait screens.
    • The view’s name shows wherever there is room: wide landscape, and always on portrait.
  • Visibility: shown during play and the power-up; hidden behind the title card and menus. It replaces the old lone pause button.
  • Settings during a game now pauses it, with Back returning to the pause menu. Before, Settings from the title had no game to pause.
  • Sound effects switch: a new sfxOn setting, a Settings checkbox and the toolbar button. It silences every effect, including the power-up sounds and the ball roll. The music keeps its own switch.
  • Mute all: turning music or effects on from the toolbar also clears it.
  • Camera: Player, Dynamic and portrait Classic now keep the table below the score display and the centred toolbar. main.ts measures both and passes the result to the scene (setTopReserve).
  • Docs: How to play (new “On-screen buttons” section), the title card hints, project.json controls and DESIGN.md.

What broke / dead ends

  • Cog icon: the first one was a dashed thick ring. At 20 px it read as a blob, so I replaced it with an outlined eight-tooth cog generated from a small function.
  • Focus risk, avoided before it shipped: a clicked button would normally keep keyboard focus, and Space (the plunger) would then press it again. The buttons cancel focus on pointer-down and blur after the click; a test confirms Space no longer re-triggers the view button.

Human interventions

Derek asked for the toolbar after trying the views. No other input.

Verification

  • npm run typecheck passes.
  • Headless Chrome screenshots:
    • desktop 1280×800, plus a left-handed version;
    • phone landscape 844×390 and phone portrait 390×844, with touch.
    • In every layout the toolbar clears the score display, the Launch and Nudge buttons and the table.
  • Behaviour tests:
    • the view button switches the view;
    • Space afterwards doesn’t press it again;
    • the music and effects buttons save musicOn and sfxOn;
    • Settings in a game pauses it (game time unchanged over 0.8 s), Esc returns to the pause menu, and Esc again resumes;
    • the pause button opens the pause menu;
    • with Mute all on, the music button turns music on and clears the mute.
    • No console errors.
  • npm test (15 physics tests), npm run build and npm run check (48 URLs; smoke tests for sniff-trail play and gen0, orbit-lounge play): all pass.
  • Not verified: on a real phone (tap targets are 40 px, a little under the usual 44 px guideline); listening to check that every effect is silent with effects off (checked in code only).

Next steps

  • Try the toolbar on a phone; enlarge the buttons to 44 px if they are fiddly.