feat(editor): add snap enable toggle - #58
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Review pass (Claude Code) — stacked on #57. Own snap-toggle logic is correct: Two things to fix before this lands:
|
cff0e97 to
93fa52f
Compare
3ca2420 to
bf78154
Compare
The snap grid jumped from 1/4 straight to 1/8 with no quarter- or eighth-note triplet resolution, so triplet passages could only snap at 1/12T or finer. Add 1/3T (value 1/3) and 1/6T (value 1/6) in value order, and label the triplet-family divisions (3/6/12/24/48/96) with a T suffix so the grid reads clearly against the binary options. The snap <select> options are static in screen.html and index-mapped via editorSetSnap(selectedIndex), so screen.html, SNAP_OPTIONS, and the snapIdx default are kept in lockstep; 1/4 shifts from index 2 to 3, so the S.snapIdx default and snap_options.test.js move with it. snapIdx is not persisted, so no migration is needed. Ports the one division set #62 (feat/snap-grid-on-profile-stack) had over the merged #57/#58 snap options, without adopting its {step} engine. Tests: snap_options.test.js updated (+1/3, +1/6 subdivisions, new label list, default index); full editor JS suite green (24 files). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UR2Cr7GEu3yMY7SrfxH6c1
The snap grid jumped from 1/4 straight to 1/8 with no quarter- or eighth-note triplet resolution, so triplet passages could only snap at 1/12T or finer. Add 1/3T (value 1/3) and 1/6T (value 1/6) in value order, and label the triplet-family divisions (3/6/12/24/48/96) with a T suffix so the grid reads clearly against the binary options. The snap <select> options are static in screen.html and index-mapped via editorSetSnap(selectedIndex), so screen.html, SNAP_OPTIONS, and the snapIdx default are kept in lockstep; 1/4 shifts from index 2 to 3, so the S.snapIdx default and snap_options.test.js move with it. snapIdx is not persisted, so no migration is needed. Ports the one division set #62 (feat/snap-grid-on-profile-stack) had over the merged #57/#58 snap options, without adopting its {step} engine. Tests: snap_options.test.js updated (+1/3, +1/6 subdivisions, new label list, default index); full editor JS suite green (24 files). Claude-Session: https://claude.ai/code/session_01UR2Cr7GEu3yMY7SrfxH6c1 Co-authored-by: ChrisBeWithYou <chris@rifflarr.local> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Testing