Skip to content

feat(editor): wire tempo map command controls - #75

Merged
byrongamatos merged 2 commits into
mainfrom
feat/editor-tempo-command-controls
Jul 5, 2026
Merged

feat(editor): wire tempo map command controls#75
byrongamatos merged 2 commits into
mainfrom
feat/editor-tempo-command-controls

Conversation

@ChrisBeWithYou

@ChrisBeWithYou ChrisBeWithYou commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add Tempo Map BPM/insert/delete commands to the shortcut command registry
  • route FeedBack and EOF shortcut profiles through Tempo Map-specific command IDs when Tempo Map mode is active
  • keep note-mode bindings unchanged and cover the mode split in shortcut tests

Validation

  • node --check screen.js
  • node tests\eof_shortcuts.test.js
  • node tests\tempo_sync_inspector.test.js
  • node tests\tempo_map_guidance.test.js
  • node tests\tempo_map_bpm.test.js
  • node tests\tempo_map_timesig.test.js
  • node tests\measure_readout.test.js
  • git diff --cached --check
  • staged public-term guardrail scan

Summary by CodeRabbit

  • New Features

    • Added new Tempo Map keyboard shortcuts to set BPM, insert a sync point, and delete the selected sync point.
    • Shortcut behavior now changes based on the active mode, so the same keys can trigger different actions in Tempo Map vs note editing.
  • Bug Fixes

    • Improved anchor navigation to use the current anchor list order and timing for more reliable movement.
  • Tests

    • Expanded shortcut coverage to verify Tempo Map labels and mode-specific key mappings.

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 550e2d97-0c02-4812-9fce-ebe88bb2b96d

📥 Commits

Reviewing files that changed from the base of the PR and between d96eebb and 6992806.

📒 Files selected for processing (2)
  • screen.js
  • tests/eof_shortcuts.test.js

📝 Walkthrough

Walkthrough

This PR adds three Tempo Map shortcut commands, makes the EOF and Feedback key mappers mode-aware, wires the new handlers into command dispatch, changes anchor navigation source, and updates shortcut mapping tests.

Changes

Tempo Map shortcuts and anchor navigation

Layer / File(s) Summary
Tempo Map command list and mode-aware key mappers
screen.js
Adds three shortcut command entries and refactors _editorEofCommandForKeyPure and _editorFeedbackCommandForKeyPure to accept a mode argument and resolve Tempo Map keys.
Tempo Map command handlers and dispatch wiring
screen.js
Implements the Tempo Map handlers with guards, adds command runner cases, and updates EOF/Feedback dispatch to pass the active mode.
Anchor navigation source change
screen.js
Changes anchor jump logic to derive candidate times from _readAnchorSnapshot(arr).list instead of _anchorProjection(arr).
Tests for Tempo Map shortcut mapping
tests/eof_shortcuts.test.js
Adds assertions for Tempo Map key labels and new tests for mode-specific key-to-command mapping in EOF and Feedback modes.

Estimated code review effort: 2 (Simple) | ~12 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Dispatch as EOF/Feedback Dispatch
  participant Mapper as CommandForKeyPure
  participant Runner as _editorRunEofCommand
  participant Handler as Tempo Map Handler

  User->>Dispatch: press key (b, i, Delete, etc.)
  Dispatch->>Mapper: resolve key with mode='tempoMap'
  Mapper-->>Dispatch: tempoSetBpm / tempoInsertSync / tempoDeleteSync
  Dispatch->>Runner: run command id
  Runner->>Handler: invoke matching Tempo Map handler
  Handler->>Handler: check S.tempoMapMode and S.tempoSel
  Handler-->>Runner: update tempo sync point state
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/editor-tempo-command-controls

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.44.1)
screen.js

ast-grep timed out on this file


Comment @coderabbitai help to get the list of available commands.

@byrongamatos
byrongamatos force-pushed the feat/editor-tempo-sync-actions branch from d71ce10 to adc8c77 Compare July 5, 2026 20:19
@ChrisBeWithYou
ChrisBeWithYou marked this pull request as ready for review July 5, 2026 21:44
ChrisBeWithYou and others added 2 commits July 5, 2026 23:57
prevAnchor/nextAnchor (Ctrl+Alt+Left/Right, and the Shortcuts panel buttons
this PR wires) threw ReferenceError: _anchorProjection is not defined — the
anchor list comes from _readAnchorSnapshot(arr).list ({time,...} items), not a
non-existent _anchorProjection returning {anchor:{time}}. Pre-existing on main;
fixed here since this PR surfaces the commands.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@byrongamatos
byrongamatos changed the base branch from feat/editor-tempo-sync-actions to main July 5, 2026 21:58
@byrongamatos
byrongamatos force-pushed the feat/editor-tempo-command-controls branch from a758fb4 to 6992806 Compare July 5, 2026 21:58
@byrongamatos
byrongamatos merged commit 888bee6 into main Jul 5, 2026
1 check was pending
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.

2 participants