Skip to content

feat(web): billiards easter egg on a triple-click of the Ari Code logo - #44

Merged
michischuerm merged 6 commits into
livemapfrom
jarvis/billiards
Nov 26, 2026
Merged

michischuerm merged 6 commits into
livemapfrom
jarvis/billiards

Conversation

@michischuerm

Copy link
Copy Markdown
Contributor

An easter egg for Ari Code: triple-click the Ari Code logo (top left) and a billiards table opens over the app. A single click still goes home. Esc or the × closes it.

What it is

A solo 8-ball time race on a portrait 9:16 table, played with mouse or trackpad.

  • Rules: pot the other 14 balls in any order, then call a pocket and sink the 8. The break is free, and the clock starts once it settles.
  • Penalties: fouls add seconds. A scratch costs +10 s, hitting no ball costs +5 s (the first miss in a game is free), and the 8 going in early, in the wrong pocket or together with the cue ball costs +15 s and puts it back on its spot.
  • Controls: move to aim, hold to charge, release to shoot. Shift aims finer. The dotted aim line bounces off cushions with the same maths as the ball, and while you charge it only reaches as far as that power rolls.
  • Daily rack: everyone gets the same rack each day, switching at midnight Zürich time. Two power-up rings per rack:
    • Wand: the first ball you hit drops.
    • Golden cue: 3 shots with the full trajectory shown.
    • Glow cue: the cue ball bursts through up to 3 balls and drops them.
  • Results: each Mac keeps its own runs and today's best. Medals are awarded by time, and they unlock stick skins (Ari, Copper, Chrome, Ember).
  • Agent notes: while you play, a pinned paper note and a soft bell tell you when one of your threads finishes or needs you. "Open" takes you straight to the thread.
  • Look: a pool hall at night. There's a lamp over the table, a brass scoreboard, chalk tallies and callouts, and the cloth remembers where balls rolled. Balls are shaded per pixel and roll in 3D, and every sound is synthesised.

How it's built

  • Lazy-loaded. All of it sits in apps/web/src/components/billiards/ and loads only on the triple-click, so app start is unchanged.
  • Small upstream change. The only upstream file touched is SidebarChrome.tsx: an onClick that opens the game when event.detail >= 3, plus the lazy overlay.
  • Plain Canvas 2D. No engine and no assets. The physics is deterministic (fixed 1/480 s steps), which is what makes the daily rack fair.
  • Storage. Runs and the chosen skin live in localStorage (ari-billiards-runs, ari-billiards-skin). Nothing leaves the machine yet.
  • Translations. All user-facing text is wrapped and translated in the 10 web locales. I added only our own keys and didn't regenerate the catalogs. i18n:check still reports the two Flag sections keys from the follow-up on feat(web): group flagged threads into sidebar sections with a colour rail #43, which were already missing before this PR.

Checks

  • vp run check:changed: format, knip, typecheck (42 packages) and react compiler pass.
  • 31 new tests cover physics, rules, fouls, power-ups, aim prediction against the real simulation, the daily seed, medals, skins and thread alerts.
  • Pre-existing failures, none in files this PR touches:
    • Lint flags untranslated copy in other fork files (TeamThreads, SidebarFlagFilter, AriAttention, mergeShout, mobile AriProvenanceBadge).
    • 4 packages/ssh tunnel tests fail on macOS (shasum/gzip).
  • Played on the dev build across several rounds of feedback.

Not in this PR

  • A team leaderboard. The Ari games score API needs two small changes first: a lower-is-better ranking per game and a per-day board. A separate message covers those.
  • Medal times are first guesses: gold under 2:30, silver under 3:30, bronze under 5:00. They'll be tuned once there are real runs.

🤖 Generated with Claude Code

@michischuerm
michischuerm merged commit b46632a into livemap Nov 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant