Skip to content

Sandbox mode: keyboard-only entry + synthetic practice events for onboarding tour - #2743

Merged
tyler-dane merged 1 commit into
mainfrom
claude/keyboard-education-brief-06-23eb86
Aug 10, 2026
Merged

Sandbox mode: keyboard-only entry + synthetic practice events for onboarding tour#2743
tyler-dane merged 1 commit into
mainfrom
claude/keyboard-education-brief-06-23eb86

Conversation

@tyler-dane

Copy link
Copy Markdown
Contributor

Summary

  • Programmatic keyboard-only mode entry/exit for the tour's moveFocus/editSequence/targetEvent/nudge steps, reusing the existing keyboardOnlyActions.enter()/exit() store API (already a plain, non-gesture-coupled API — no store changes needed). A single useEffect cleanup guarantees exit on every path (skip, finish, fork exit, step change, Escape, unmount).
  • Ephemeral, non-persisted practice events for those same steps, merged into the Week/Day view-model pipeline right before grid consumption — never written to IndexedDB or routed through the mutation pipeline. Read-only enforcement reuses isGridEventContentReadOnly via a new isSandboxReadOnly flag (mirrors the existing isDemo/demoEventIds pattern), gated off for every sandbox event except the one built for the "nudge" lesson.
  • useDayEventViewModel gained an opt-in includeSandboxEvents flag 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-check clean
  • biome check clean on touched files
  • bun run knip clean
  • New unit tests: exit-path audit (useOnboardingSandboxKeyboardOnly.test.ts) and sandbox event builder/read-only gating (onboarding.sandbox-events.test.ts)
  • Full targeted suite (OnboardingTour, event-query hooks, Up Next, Day view) green — 166 pass
  • Independent review pass (code-reviewer agent) — found 2 real issues, both fixed (Up Next leak scoped out; nudge no-op documented as a safe, known limitation)
  • e2e for a full lesson with mouse disabled — not added in this PR, flagged for follow-up

🤖 Generated with Claude Code

…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>
@tyler-dane
tyler-dane merged commit 86e0787 into main Aug 10, 2026
20 checks passed
@tyler-dane
tyler-dane deleted the claude/keyboard-education-brief-06-23eb86 branch August 10, 2026 20:28
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