Skip to content

feat(input): global shortcuts → shared keyboard-events saga#507

Draft
rulkens wants to merge 7 commits into
mainfrom
keyboard-events-saga
Draft

feat(input): global shortcuts → shared keyboard-events saga#507
rulkens wants to merge 7 commits into
mainfrom
keyboard-events-saga

Conversation

@rulkens

@rulkens rulkens commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Promotes the app's global keyboard shortcuts from the useKeyboardShortcuts React hook (a keydown if-chain) to one declarative KEYBOARD_SHORTCUTS map + a shared always-on watchKeyboardEventsSaga, and folds the tour keys (//Space) onto the same path. One keyboard mechanism, one data table, sagas driving intent.

Spec: docs/superpowers/specs/2026-07-23-keyboard-events-saga-design.md. Plan: docs/superpowers/plans/2026-07-23-keyboard-events-saga.md.

Executing via subagent-driven development. Draft — landing task-by-task with per-task review; will mark ready after the full-branch review + /feature-done.

Progress:

  • Task 1 — prep: map-driven createKeyboardListener + getState in saga context + tour-saga migration
  • Task 2 — stepRate util
  • Task 3 — logCameraState command action + ReconcileEffects wire
  • Task 4 — KEYBOARD_SHORTCUTS map + SHORTCUTS_BY_KEY
  • Task 5 — watchKeyboardEventsSaga (+ logCameraState arm)
  • Task 6 — atomic cutover + deletions
  • Task 7 — manual key sweep (user)

🤖 Generated with Claude Code

rulkens and others added 7 commits July 23, 2026 13:55
Design for promoting useKeyboardShortcuts + watchTourKeyboardSaga to one
declarative KEYBOARD_SHORTCUTS map + a shared always-on watchKeyboardEventsSaga,
with the l dev key becoming a logCameraState command action. Includes the
Ground preparation section (createKeyboardListener reshape + getState-in-context
as prep-first). Removes the backlog item (index line + detail file) it picks up.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7-task TDD plan for the shared keyboard-events saga (prep-first: reshape
createKeyboardListener + getState-in-context + tour migration; then stepRate,
logCameraState action, KEYBOARD_SHORTCUTS map, watchKeyboardEventsSaga, atomic
cutover + deletions, verification). Contract-code only per plan-style.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… context

Reshape createKeyboardListener onto a declarative KeyboardShortcut[] plus a
getState reader: each shortcut owns its keys and preventDefault policy (static
or a live-state predicate), and the filter now also guards contentEditable
targets. Seed the store's getState into saga context so store-reading seams can
resolve predicates inside the DOM tick. Migrate watchTourKeyboardSaga onto the
new signature with behaviour identical (three static-preventDefault entries).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Route the 'l' key's engine-imperative camera-state log through a
reducer-less command action, so the shortcut map stays uniform. The new
camera/logCameraState action mirrors goHome; the reconcile effect bag
gains a logCameraState closure delegating to the existing engine helper.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
skymap c2568c2 Commit Preview URL

Branch Preview URL
Jul 24 2026, 09:04 PM

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