Repository navigation
fix(timeline): grid-snap on pill drag - #33
Merged
Merged
Conversation
Pill body-drag (`pill-move`) only had edge-to-edge magnetic snap to neighbour pills — no grid snap, even with snap mode "1" / "1/4" / etc. Pre-refactor the symptom was hidden because pills only existed in arr-mode; after #32 made pills universal, single-take drag exposes the gap. Pill-trim-in / pill-trim-out called `snapped(arrAtPointer, e)` but `arrAtPointer` is arr-time and `snapped()` interprets master-time. Identity in single-take's whole-master segment, double-projected (broken) in long-form. Fix: introduce `snappedArr(arrT, e)` — same snap pipeline but the input domain is arr-time. Apply to pill-move (new grid snap on top of the existing edge-to-edge magnet) and pill-trim-{in,out} (replace the master-domain `snapped()` with the arr-domain helper). Verified locally: pill-move with snap "1" lands on bar boundaries; snap OFF passes through unchanged; existing 935 tests still pass. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pill body-drag (`pill-move`) had no grid snap — only edge-to-edge magnetic snap to neighbour pills — so changing snap mode to "1" / "1/4" / etc. felt identical to OFF when moving a pill. User-reported regression after #32 made pills universal in direct-mode.
Also fixes a latent domain bug in pill-trim-in / pill-trim-out: they passed arr-time `arrAtPointer` to `snapped()` which interprets master-time. Identity in single-take's whole-master segment (so it was accidentally correct there), double-projected and wrong in long-form.
Fix
`pill-move` with snap mode OFF or MATCH passes through unchanged (MATCH triggers the separate `cam-track-move` kind).
Test plan
🤖 Generated with Claude Code