Skip to content

feat(highway): render caged + guideTones teaching labels (§6.6)#545

Merged
byrongamatos merged 1 commit into
mainfrom
feat/template-caged-guidetones-render
Jun 21, 2026
Merged

feat(highway): render caged + guideTones teaching labels (§6.6)#545
byrongamatos merged 1 commit into
mainfrom
feat/template-caged-guidetones-render

Conversation

@byrongamatos

Copy link
Copy Markdown
Contributor

Part of #334

Second of three stacked PRs for the deferred FEP #24 pair. Stacked on #544 (base = feat/template-caged-guidetones-wire) — the renderer can only receive these fields once the wire emits them. Rebase to main after #544 merges.

What this PR does (2D + 3D render)

Mirrors the voicing / fn.rn teaching-mark render:

  • Shared pure helper chordHarmonyLabels() (identical in static/highway.js and plugins/highway_3d/screen.js) extended to also surface caged (pre-formatted "CAGED: E") and guideTones ("gt 4,10"). Invalid caged enum and out-of-range / non-int guide tones are filtered inside the helper, so formatting stays node-testable.
  • 2D (static/highway.js): draw caged then guideTones stacked above the existing rn/voicing labels, distinct colors, reusing fillTextReadable.
  • 3D (plugins/highway_3d/screen.js): two more _drawHarmony(...) calls on the same upward stack.
  • Everything stays behind the same teaching-marks gate (_showTeachingMarks 2D / bundle.teachingMarksVisible 3D) — no default-highway clutter.

Render only — no scoring / NoteVerifier coupling.

Tests

tests/js/highway_chord_harmony.test.js extended (same extract-and-eval pattern, run against both the 2D and 3D copies): surfaces caged+guideTones, trims, empties malformed, rejects invalid caged enum, filters out-of-range / non-int guide tones.

Verified locally

  • node tests/js/highway_chord_harmony.test.js10 passed (2D + 3D).
  • node --check static/highway.js and node --check plugins/highway_3d/screen.js → clean.
  • Independent Codex read-only diff review → no P1/P2/P3 regressions.

🤖 Generated with Claude Code

@byrongamatos
byrongamatos force-pushed the feat/template-caged-guidetones-wire branch from 914bee7 to cbb2e6d Compare June 21, 2026 09:51
@byrongamatos
byrongamatos force-pushed the feat/template-caged-guidetones-render branch from d84b254 to e537cea Compare June 21, 2026 09:51
Mirror the voicing/fn.rn teaching-mark render for the two new chord-template
fields, in both the 2D and 3D highways:

- Extend the shared pure chordHarmonyLabels() helper (identical in static/highway.js
  and plugins/highway_3d/screen.js) to also surface caged ("CAGED: E") and
  guideTones ("gt 4,10"), pre-formatted and node-testable. Invalid caged enum and
  out-of-range / non-int guide tones are filtered out.
- Draw both, stacked above the existing rn/voicing labels, in distinct colors.
- Gated behind the SAME teaching-marks toggle (_showTeachingMarks 2D /
  teachingMarksVisible 3D) — no clutter on the default highway.

Render only — no scoring / NoteVerifier coupling.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@byrongamatos
byrongamatos force-pushed the feat/template-caged-guidetones-render branch from e537cea to ba77c8c Compare June 21, 2026 09:57
@byrongamatos
byrongamatos changed the base branch from feat/template-caged-guidetones-wire to main June 21, 2026 09:57
@byrongamatos
byrongamatos merged commit e518910 into main Jun 21, 2026
@byrongamatos
byrongamatos deleted the feat/template-caged-guidetones-render branch June 21, 2026 09:58
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