Skip to content

Fix accent/ghost live-update drop and playhead chIdx misalignment - #1

Merged
mnmlyw merged 1 commit into
mainfrom
fix/live-update-vel-and-playhead-chidx
Jul 19, 2026
Merged

Fix accent/ghost live-update drop and playhead chIdx misalignment#1
mnmlyw merged 1 commit into
mainfrom
fix/live-update-vel-and-playhead-chidx

Conversation

@mnmlyw

@mnmlyw mnmlyw commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • humKey() omitted step velocity, so an accent (!) / ghost (?) edit on an existing note produced an identical key and liveUpdate silently 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's data-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)
  • Verified both fixes directly against the extracted parse/humKey/highlighter logic (accent/ghost key now differs; rejected-channel line no longer shifts later channels' chIdx)
  • Two new Playwright regression tests added (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

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>
@mnmlyw
mnmlyw merged commit ce48a5b into main Jul 19, 2026
1 check passed
@mnmlyw
mnmlyw deleted the fix/live-update-vel-and-playhead-chidx branch July 19, 2026 21:15
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