Fix accent/ghost live-update drop and playhead chIdx misalignment - #1
Merged
Merged
Conversation
humKey() omitted step.vel, so toggling accent/ghost on an existing note produced an identical key and liveUpdate silently no-op'd the edit while playing. updateHighlight() counted every header-shaped line toward the playhead's chIdx, even ones the parser drops (empty pattern, 8-channel cap) — misaligning every channel's playhead highlighting after a dropped candidate. parse() now tags each accepted channel with its source line so the highlighter can map real channel indices instead of guessing. Co-Authored-By: Claude Sonnet 5 <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
humKey()omitted step velocity, so an accent (!) / ghost (?) edit on an existing note produced an identical key andliveUpdatesilently no-op'd it while playing.updateHighlight()counted every header-shaped line toward the playhead's channel index, even candidates the parser drops (empty pattern, past the 8-channel cap) — misaligning every subsequent channel'sdata-ch.parse()now tags each accepted channel with its source line so the highlighter can map real indices instead of guessing.Test plan
npm run lint && npm run check:spec && npm run preset:check && npm test— all green (123/123 unit tests)parse/humKey/highlighter logic (accent/ghost key now differs; rejected-channel line no longer shifts later channels' chIdx)tests/e2e/live-update.spec.js,tests/e2e/highlight.spec.js) — could not run locally (sandboxed dev environment can't finish extracting the Chromium binary); this PR's CI run is the verification.🤖 Generated with Claude Code