Skip to content

feat(settings): add slot machine mode easter egg#2853

Open
charlescook-ph wants to merge 2 commits into
mainfrom
posthog-code/slot-machine-mode
Open

feat(settings): add slot machine mode easter egg#2853
charlescook-ph wants to merge 2 commits into
mainfrom
posthog-code/slot-machine-mode

Conversation

@charlescook-ph

Copy link
Copy Markdown
Contributor

Problem

Andy asked for a slot machine handle in the PostHog Code UI when running tasks. Charles wanted it shipped as a fun settings easter egg.

Changes

  • New Slot machine mode toggle in the Fun section of General settings (off by default, persisted alongside Hedgehog mode).
  • When enabled, a tiny slot machine renders next to the generating indicator in the session footer while a task is actively running. The reels spin for the duration of the run, and you can pull the lever for an extra spin. Three hedgehogs 🦔🦔🦔 is the jackpot.
  • Self-contained SlotMachineLever component (framer-motion for the lever pull + reel jitter); self-gates on the setting so it has zero effect unless opted in.

How did you test this?

  • pnpm --filter @posthog/ui typecheck — passes.
  • biome check on all changed files — clean.
  • Did not drive the running app to watch the animation live.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code from a Slack thread

Adds a "Slot machine mode" toggle to the Fun section of General settings.
When on, a tiny slot machine appears next to the generating indicator while a
task is actively running: the reels spin during the run and you can pull the
lever for an extra spin. Three hedgehogs is the jackpot.

Gated entirely behind the persisted `slotMachineMode` setting (off by default),
so it has no effect unless a user opts in.

Generated-By: PostHog Code
Task-Id: 283452c2-1d5c-4d3e-a6f0-930bf1e572c8
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

React Doctor found 3 issues in 1 file · 3 warnings.

3 warnings

src/features/sessions/components/SlotMachineLever.tsx

Reviewed by React Doctor for commit 41ecd10.

@greptile-apps

greptile-apps Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "feat(settings): add slot machine mode ea..." | Re-trigger Greptile

Comment thread packages/ui/src/features/sessions/components/SlotMachineLever.tsx
Store the pull-spin setTimeout in a ref so it's cleared on the next pull and
on unmount. Fixes two issues flagged in review: rapid clicks no longer stop the
reels prematurely (the timer restarts on each press), and a pending timer no
longer fires against stale state after the component unmounts.

Generated-By: PostHog Code
Task-Id: 283452c2-1d5c-4d3e-a6f0-930bf1e572c8
@andrewm4894 andrewm4894 marked this pull request as ready for review June 23, 2026 12:28
@andrewm4894 andrewm4894 self-assigned this Jun 23, 2026
@greptile-apps

greptile-apps Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "fix(slot-machine): track and clear the p..." | Re-trigger Greptile

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.

2 participants