feat: gate onboarding behind hard sudoku puzzle#2226
Draft
posthog[bot] wants to merge 1 commit into
Draft
Conversation
Adds a hidden first onboarding step that presents Arto Inkala's hard sudoku puzzle. Gated by the posthog-code-secret-sudoku-onboarding flag (rolled out to 0% for now). Once enabled, the puzzle blocks every other onboarding step until solved — the dev skip button and arrow-key navigation are disabled while the gate is active, and the hasSolvedSecretSudoku flag is persisted so the gate redirects users back if they try to land on a later step. Generated-By: PostHog Code Task-Id: b21854e6-9af2-4f79-83f1-83e51e34b530
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.
Summary
posthog-code-secret-sudoku-onboardingfeature flag, set to 0% rollout for now. When the flag is off, the onboarding flow is unchanged.hasSolvedSecretSudokuflag forces the user back to the puzzle if they somehow land on a later step.Implementation
apps/code/src/shared/constants.ts— newSECRET_SUDOKU_ONBOARDING_FLAGconstant.apps/code/src/renderer/features/onboarding/sudoku.ts— puzzle data + solver utilities (isBoardSolved,findConflicts).apps/code/src/renderer/features/onboarding/components/SudokuStep.tsx— interactive 9x9 grid (keyboard + click input, conflict highlighting, peer highlighting, on-screen number pad). The "Verify" button only firesonSolvedwhen the board is correctly filled.apps/code/src/renderer/features/onboarding/types.ts— added"secret-sudoku"step.apps/code/src/renderer/features/onboarding/stores/onboardingStore.ts— persistshasSolvedSecretSudoku.apps/code/src/renderer/features/onboarding/hooks/useOnboardingFlow.ts— gate logic: prepends the puzzle toactiveStepsand forcescurrentStepback to it whenever the gate is unresolved.apps/code/src/renderer/features/onboarding/components/OnboardingFlow.tsx— rendersSudokuStep, disables arrow hotkeys + skip button while on the gate.Test plan
hasSolvedSecretSudokuso the gate will reappear on the next session.Created with PostHog Code