Skip to content

feat(editor): chord grips may use open voicings — flagged for individual review - #257

Merged
byrongamatos merged 3 commits into
mainfrom
feat/editor-open-voicings
Jul 14, 2026
Merged

feat(editor): chord grips may use open voicings — flagged for individual review#257
byrongamatos merged 3 commits into
mainfrom
feat/editor-open-voicings

Conversation

@ChrisBeWithYou

@ChrisBeWithYou ChrisBeWithYou commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What

Follow-up to #245, implementing the agreed "use opens, flag for review" policy from the review discussion:

  1. _resolveChordGripPure no longer bails on a cluster note playable both open and fretted — it may voice the note open (opens are how real chord shapes use the neck, and the span metric naturally prefers them), tagging the pick ambiguousOpen whenever a fretted alternative was eligible.
  2. _resolveWindowPure propagates the tag onto its moves and returns an ambiguousOpen index list — including identity picks (a note already sitting on the chosen open string writes no move but still needs the review gate).
  3. The sweep's Accept all excludes flagged refs through the exact same pure gate refused notes already use (_acceptAllRefsPure with a unioned review-only set) — the charter confirms each machine-chosen open individually, in view. The status line counts them ("… · 2 open voicings to review").

Deliberately unchanged: the singleton resolver (_suggestPositionPure) still refuses open-vs-fretted — outside a chord shape there is nothing to justify the machine deciding. A new scope-guard test pins that.

Tests

  • tests/chord_grip.test.mjs: the three ambiguity cases flip from refuse→grip+flag (min-span grip with the open tagged; D+G dyad collapses to two opens, both tagged; the _resolveWindowPure integration case asserts flag propagation).
  • New tests/open_voicings.test.mjs (5): unambiguous open never flagged; fretted pick never flagged even with an open alternative; identity pick still listed for review; singleton scope guard; Accept-all exclusion. The behavioral cases fail on main (grip returns null there).
  • Full suite 147/147 green, lint 0 errors (3 pre-existing ratchet warnings), routes.py untouched.

Notes

  • CHANGELOG: rewrote the tail of the feat(editor): resolve chords as one coherent grip, not a greedy spread #245 entry (its "still refused, never quietly voiced open" sentence is what this PR changes) and added the new entry; also removed two stray duplicated fragments in [Unreleased] left by earlier merges (the Map Health and onset-detection entries each had a repeated tail line).

🤖 Generated with Claude Code

https://claude.ai/code/session_01EBQCHCNA81E9tHmSDHSe2Q

Summary by CodeRabbit

  • New Features
    • Chord resolution can now select open strings when they create the tightest playable shape.
    • Potentially ambiguous open-string choices are flagged for individual review.
    • Accept all confirms eligible suggestions while leaving flagged open-string choices for review.
  • Bug Fixes
    • Improved handling and status reporting for chord-position resolution.
    • Preserved refusal behavior for ambiguous standalone notes outside chord shapes.
  • Documentation
    • Clarified tempo/grid resolution and open-voicing review behavior in the changelog.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b7692d6f-761e-4561-bfc1-8178194fc8cc

📥 Commits

Reviewing files that changed from the base of the PR and between 5b73cad and d8383a6.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • src/anchor-resolve.js
  • src/position.js
  • tests/chord_grip.test.mjs
  • tests/open_voicings.test.mjs

📝 Walkthrough

Walkthrough

Chord-grip resolution now permits ambiguous open-string placements, marks them for review, propagates those markers through window resolution, and excludes them from bulk confirmation. Tests cover grip selection, propagation, singleton refusal, and Accept all behavior. Changelog wording was updated.

Changes

Open voicing resolution

Layer / File(s) Summary
Chord-grip ambiguity tracking
src/position.js, tests/chord_grip.test.mjs, tests/open_voicings.test.mjs
Chord grips retain eligible open-string placements, record fretted alternatives, and mark ambiguous open assignments with ambiguousOpen.
Window propagation and sweep review
src/anchor-resolve.js, tests/chord_grip.test.mjs, tests/open_voicings.test.mjs, CHANGELOG.md
Window resolution propagates ambiguous-open indices and move flags; confirmation sweeps exclude refused and ambiguous-open notes from Accept all, with updated status text and changelog descriptions.

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

Possibly related PRs

Sequence Diagram(s)

sequenceDiagram
  participant Editor
  participant _resolveWindowPure
  participant _resolveChordGripPure
  participant ConfirmationSweep
  Editor->>_resolveWindowPure: resolve anchor window
  _resolveWindowPure->>_resolveChordGripPure: resolve chord grip
  _resolveChordGripPure-->>_resolveWindowPure: assignments with ambiguousOpen
  _resolveWindowPure-->>Editor: moves and review indices
  Editor->>ConfirmationSweep: accept all with reviewOnly refs
  ConfirmationSweep-->>Editor: confirm only non-review refs
Loading
🚥 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 clearly matches the main change: chord grips can use open voicings, and ambiguous ones are flagged for review.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/editor-open-voicings

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

@byrongamatos
byrongamatos force-pushed the feat/editor-open-voicings branch from 9487a2c to 5b73cad Compare July 14, 2026 17:42
ChrisBeWithYou and others added 3 commits July 14, 2026 21:00
"Use opens, flag for review" (#245 follow-up): _resolveChordGripPure may
voice an ambiguous note open, tagging the pick ambiguousOpen;
_resolveWindowPure propagates the tag to its moves and lists flagged
indices; the sweep's Accept-all excludes flagged refs via the existing
refused-notes gate. Singleton open-vs-fretted refusal unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EBQCHCNA81E9tHmSDHSe2Q
The sweep object grew a reviewOnly set (refused + ambiguous-open refs);
the state comment still described the old two-field shape.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
An agent worktree symlinked node_modules; .gitignore only lists
node_modules/ (trailing slash), which matches a directory but not a
symlink, so git add -A tracked it. The symlink pointed at a local
absolute path and would break any other checkout.
@byrongamatos
byrongamatos force-pushed the feat/editor-open-voicings branch from 896fb33 to d8383a6 Compare July 14, 2026 19:00
@byrongamatos
byrongamatos merged commit 806e48d into main Jul 14, 2026
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.

2 participants