Sandbox mode: keyboard-only entry + synthetic practice events for onboarding tour - #2743
Merged
Merged
Conversation
…ox lessons Wires the onboarding tour's moveFocus/editSequence/targetEvent/nudge steps to programmatic keyboard-only mode entry/exit (reusing the existing keyboardOnlyActions store) and to ephemeral, non-persisted practice events merged into the Week/Day view-model pipeline. Read-only enforcement reuses isGridEventContentReadOnly via a new isSandboxReadOnly flag, following the existing isDemo/demoEventIds pattern. Sandbox events are opt-in per consumer of useDayEventViewModel so they never leak into the Up Next card. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
keyboardOnlyActions.enter()/exit()store API (already a plain, non-gesture-coupled API — no store changes needed). A singleuseEffectcleanup guarantees exit on every path (skip, finish, fork exit, step change, Escape, unmount).isGridEventContentReadOnlyvia a newisSandboxReadOnlyflag (mirrors the existingisDemo/demoEventIdspattern), gated off for every sandbox event except the one built for the "nudge" lesson.useDayEventViewModelgained an opt-inincludeSandboxEventsflag so sandbox events only surface from the day grid itself, not from the sidebar's Up Next card (which also consumes that hook for an independent "today" range) — caught in review.Known follow-up (documented in code + internal brief log)
The nudge lesson's mutation attempt safely no-ops (no error, no toast, nothing persisted) rather than visibly repositioning the practice event, since sandbox events are intentionally never written into the real query cache the mutation pipeline reads. Wiring a visible local reposition would mean touching the shared grid-focus/mutation code this brief was explicitly split out to keep isolated — left as a fast-follow rather than a rushed patch under this PR.
Test plan
bun run type-checkcleanbiome checkclean on touched filesbun run knipcleanuseOnboardingSandboxKeyboardOnly.test.ts) and sandbox event builder/read-only gating (onboarding.sandbox-events.test.ts)🤖 Generated with Claude Code