Skip to content

feat(editor): add tempo map toggle command - #77

Merged
byrongamatos merged 1 commit into
mainfrom
feat/editor-tempo-toggle-command
Jul 5, 2026
Merged

feat(editor): add tempo map toggle command#77
byrongamatos merged 1 commit into
mainfrom
feat/editor-tempo-toggle-command

Conversation

@ChrisBeWithYou

@ChrisBeWithYou ChrisBeWithYou commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an enter/exit Tempo Map command to the shortcut command registry
  • route FeedBack T through the shared Tempo Map toggle while preserving EOF note-mode T for tap
  • reuse one toggle function for the toolbar button and shortcut command

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 a keyboard shortcut to enter or exit Tempo Map mode with T.
    • Tempo Map mode now updates consistently across keyboard and toolbar controls.
  • Bug Fixes

    • Improved mode switching so Tempo Map and drum editing stay in sync.
    • Clearing and refreshing selections now happens automatically when switching modes.

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@byrongamatos, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 34 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 59416611-ffa6-4d56-a8e8-32b420d64cb7

📥 Commits

Reviewing files that changed from the base of the PR and between 888bee6 and 6282c5b.

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

Walkthrough

Adds a "toggleTempoMap" editor shortcut bound to the "T" key, updates EOF and FeedBack keyboard dispatch and command execution to handle it, introduces a shared _editorToggleTempoMapMode() helper used by both the shortcut and toolbar button, and extends test assertions to cover the new mappings.

Changes

Toggle Tempo Map shortcut and mode helper

Layer / File(s) Summary
Shortcut command and dispatch mapping
screen.js
Adds toggleTempoMap to the shortcut command list with a T key label, and updates EOF and FeedBack shortcut dispatch so plain "t" maps to toggleTempoMap, including special handling when already in Tempo Map mode.
Execution wiring and toggle helper
screen.js
Adds the toggleTempoMap case to the command execution switch, introduces _editorToggleTempoMapMode() to centralize toggling of S.tempoMapMode (finalizing drags, resetting selection/hover, excluding drum edit mode, refreshing controls, redrawing, updating status), and refactors the Tempo Map toolbar button to call this helper instead of duplicating logic.
Shortcut mapping test coverage
tests/eof_shortcuts.test.js
Adds assertions verifying toggleTempoMap key labels ("T (Tempo Map)" for EOF, "T" for Feedback) and confirms "t" maps to toggleTempoMap across Feedback Native and EOF Tempo Map mode tests, including toggleTap behavior outside Tempo Map mode.

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

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ShortcutDispatch
  participant CommandSwitch
  participant EditorToggleTempoMapMode

  User->>ShortcutDispatch: press "t"
  ShortcutDispatch->>CommandSwitch: toggleTempoMap
  CommandSwitch->>EditorToggleTempoMapMode: _editorToggleTempoMapMode()
  EditorToggleTempoMapMode->>EditorToggleTempoMapMode: finalize drag, toggle tempoMapMode, reset selection
  EditorToggleTempoMapMode->>User: refresh buttons, redraw, update status
Loading
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/editor-tempo-toggle-command

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

@ChrisBeWithYou
ChrisBeWithYou marked this pull request as ready for review July 5, 2026 21:44
@byrongamatos
byrongamatos force-pushed the feat/editor-tempo-command-controls branch from a758fb4 to 6992806 Compare July 5, 2026 21:58
@byrongamatos
byrongamatos force-pushed the feat/editor-tempo-toggle-command branch from 372a7ea to 6282c5b Compare July 5, 2026 21:59
@byrongamatos
byrongamatos changed the base branch from feat/editor-tempo-command-controls to main July 5, 2026 21:59
@byrongamatos
byrongamatos merged commit b6fda60 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