feat(settings): add slot machine mode easter egg#2853
Open
charlescook-ph wants to merge 2 commits into
Open
Conversation
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
|
React Doctor found 3 issues in 1 file · 3 warnings. 3 warnings
Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "feat(settings): add slot machine mode ea..." | Re-trigger Greptile |
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
Contributor
|
Reviews (2): Last reviewed commit: "fix(slot-machine): track and clear the p..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
SlotMachineLevercomponent (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 checkon all changed files — clean.Automatic notifications
Created with PostHog Code from a Slack thread