Skip to content

feat(editor): the EOF profile's wheel adjusts sustain and fret — the mouse half of the EOF port - #347

Merged
ChrisBeWithYou merged 2 commits into
mainfrom
feat/eof-mouse-grammar
Jul 22, 2026
Merged

feat(editor): the EOF profile's wheel adjusts sustain and fret — the mouse half of the EOF port#347
ChrisBeWithYou merged 2 commits into
mainfrom
feat/eof-mouse-grammar

Conversation

@ChrisBeWithYou

@ChrisBeWithYou ChrisBeWithYou commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What

PR 2 of the shortcut-profile accuracy effort (policy: EOF-PROFILE-POLICY.md; PR 1 = #346). EOF's wheel is a note-entry verb: the reference keyset binds the scroll wheel to sustain length and Ctrl+scroll to fret. The policy review ranked this the highest-value faithfulness item — it's the charter's literal inner loop — and it lands fully self-contained to the Legacy (EOF) profile.

Gesture (EOF profile, notes selected) Action
Wheel up / down Lengthen / shorten the selected sustain
Ctrl+wheel up / down Increment / decrement the selected fret
Right-click (already shipped) Add / remove note
Click (already shipped) Select the whole strum

How

  • _editorEofWheelActionPure (shortcuts.js) owns the decision, scoped hard: EOF profile only · live selection only · note mode only (tempo map / Tracks overview / drum grid keep their wheel grammars) · vertical-dominant only · never with Shift/Alt (pan and the roll's lane-stretch keep their meanings). With nothing selected the wheel still pans — EOF treats a selection-less wheel as a no-op anyway, so faithfulness costs nothing and a bare scroll can never edit.
  • mouse.js dispatches the returned registry command id through a new host.runShortcutCommand hook (input.js's own by-id dispatcher, wired in main.js) — the exact [ ] / Ctrl+± implementations, so undo, status, and clamping are identical to the keyboard, and no mouse.js → input.js import cycle is introduced (the host-hook seam, per the house pattern).
  • The EOF panel rows advertise the wheel beside the keys ([ / Wheel down, Ctrl++ / Ctrl+Wheel up); every other profile's display and behavior untouched.

Verification

  • Runtime, through the real host with the 1256-note demo song loaded: 11/11 — right-click add/remove (note count + status), wheel sustain round-trip and Ctrl+wheel fret round-trip asserted against inspector model values (not pixels), Ctrl+wheel no longer zooming in EOF, and the FeedBack profile's wheel a verified no-edit.
  • tests/eof_wheel.test.mjs pins the reference's mouse lines with verdicts, drives the real decision function through every guard on both sides, and pins the untouched FeedBack displays.
  • Suites: 306 tests — the only 2 failures (mixer_meter_teardown, song_fit) already fail on main. Lint 0 errors.

Relation to #346

Independent — branched off main, no shared files with #346 (mouse-line reference pins live in eof_wheel.test.mjs; #346's eof_reference.test.mjs keeps the keyboard lines). Merge in either order; only the CHANGELOG will keep-both.

🤖 Generated with Claude Code

https://claude.ai/code/session_0178CGdtptemWd4tUbjkYDhH

Summary by CodeRabbit

  • New Features

    • Added mouse-wheel note editing for the Legacy (EOF) profile.
    • Use the wheel to adjust note sustain; hold Ctrl or Meta to raise or lower the fret.
    • Wheel editing applies only during note entry with an active selection and preserves existing behavior in other modes and profiles.
    • Updated shortcut labels to show the new wheel controls.
  • Tests

    • Added coverage for wheel direction, modifiers, selection requirements, and fallback behavior.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 21 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: 596728b2-f53f-49a5-aa24-fa5b58cbe1c8

📥 Commits

Reviewing files that changed from the base of the PR and between 3ec12cc and 9e5390c.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • src/host.js
  • src/main.js
  • src/mouse.js
  • src/shortcuts.js
  • tests/eof_wheel.test.mjs
📝 Walkthrough

Walkthrough

The Legacy (EOF) profile now supports vertical wheel gestures for sustain and fret editing during note entry. Wheel commands are parsed, dispatched through a host hook, reflected in shortcut labels, tested, and documented while other profiles retain existing behavior.

Changes

EOF wheel note entry

Layer / File(s) Summary
EOF wheel grammar and shortcut metadata
src/shortcuts.js, tests/eof_wheel.test.mjs
Qualifying EOF wheel gestures map to sustain or fret commands, with coverage for modes, modifiers, selection, direction, profiles, defaults, and labels.
Canvas wheel dispatch and host execution
src/host.js, src/main.js, src/mouse.js
Canvas wheel handling dispatches returned EOF commands through the new host callback wired to the editor command handler.
Documented EOF wheel behavior
CHANGELOG.md
The changelog records wheel-based sustain and Ctrl+wheel fret editing for the Legacy profile.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Canvas
  participant EOFWheelParser
  participant Host
  participant Editor
  Canvas->>EOFWheelParser: Pass wheel event and editor context
  EOFWheelParser-->>Canvas: Return shortcut command or null
  Canvas->>Host: Dispatch returned command
  Host->>Editor: Run editor shortcut command
Loading

Possibly related PRs

Suggested reviewers: byrongamatos

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: EOF profile wheel support for sustain and fret adjustments.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/eof-mouse-grammar

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CHANGELOG.md`:
- Around line 19-23: Update the EOF profile changelog wording to replace “with
nothing selected the wheel still pans” with wording that says the wheel falls
through to its existing behavior, while retaining that a bare scroll cannot
edit.
- Around line 12-18: Update the changelog entry describing the fret-adjustment
gesture to mention both Ctrl+wheel and Cmd+wheel, matching the modifier handling
in src/shortcuts.js while preserving the existing behavior description.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 880c1cba-de57-4880-a49c-435d6343ecef

📥 Commits

Reviewing files that changed from the base of the PR and between f976f91 and 3ec12cc.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • src/host.js
  • src/main.js
  • src/mouse.js
  • src/shortcuts.js
  • tests/eof_wheel.test.mjs

Comment thread CHANGELOG.md
Comment thread CHANGELOG.md Outdated
ChrisBeWithYou and others added 2 commits July 21, 2026 22:06
…mouse half of the EOF port

EOF's wheel is a note-entry verb, not navigation: the reference keyset binds
the scroll wheel to sustain length and Ctrl+scroll to fret. Per the profile
policy (EOF-PROFILE-POLICY.md) this is the highest-value faithfulness item —
the charter's literal inner loop — and it lands self-contained to the Legacy
(EOF) profile.

_editorEofWheelActionPure (shortcuts.js) owns the decision: EOF profile only,
live selection only, note mode only (tempo map / Tracks overview / drum grid
keep their wheel grammars), vertical-dominant only, never with Shift/Alt (pan
and the roll's lane-stretch keep their meanings). With nothing selected the
wheel falls through to pan — EOF treats a selection-less wheel as a no-op, so
faithfulness costs nothing and a bare scroll can never edit. mouse.js
dispatches the returned registry command id through a new host.runShortcutCommand
hook (input.js's own by-id dispatcher, wired in main.js) — the same
implementations as the [ ] and Ctrl+± keys, so undo, status, and clamping are
identical, and no mouse.js → input.js import cycle is introduced. The EOF
panel rows now advertise the wheel beside those keys.

Right-click add/remove and whole-strum click — the reference's other mouse
verbs — already ride the profile defaults; tests/eof_wheel.test.mjs pins all
of it (the reference's mouse lines with verdicts, every guard on both sides,
and the untouched FeedBack displays).

Runtime-verified through the real host with a loaded 1256-note song: 11/11 —
right-click add/remove, wheel sustain round-trip, Ctrl+wheel fret round-trip
(inspector model values, not pixels), Ctrl+wheel no longer zooming in EOF, and
the FeedBack profile's wheel untouched. Suites: 306 tests, the only 2 failures
(mixer_meter_teardown, song_fit) already fail on main. Lint 0 errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0178CGdtptemWd4tUbjkYDhH
Signed-off-by: ChrisBeWithYou <chris@rifflarr.local>
@ChrisBeWithYou
ChrisBeWithYou force-pushed the feat/eof-mouse-grammar branch from d47755a to 9e5390c Compare July 22, 2026 03:07
@ChrisBeWithYou
ChrisBeWithYou merged commit 232956e into main Jul 22, 2026
4 checks passed
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