feat(highway): render teaching marks fg/ch/sd on 2D + 3D (§6.2.2)#538
Merged
Conversation
Render the three per-note teaching marks on both highways, mirroring the bend-curve render (#532). Display only — no scoring / NoteVerifier coupling. - 2D static/highway.js: fg renders by default as a small finger numeral hugging the gem (T = thumb, 1..4); sd (degree label) and ch (strum bracket connecting notes that share a ch key, arrow direction from pkd) are opt-in behind a new `showTeachingMarks` toggle (exposed via toggle/get/set + the bundle's `teachingMarksVisible` flag). Pure helpers teachingFingerLabel / teachingDegreeLabel / strumGroupBuckets drive the glyphs. ch bracket is note-stream-only (chord notes already read as one gesture). - 3D plugins/highway_3d/screen.js: fg (default) + sd (opt-in, mirrors the 2D toggle via bundle.teachingMarksVisible) render next to the per-note fret label via a new pooled sprite (pTeachMarkLbl); _scrChordNote resets fg/sd so chord notes don't inherit stale marks. ch strum brackets are deferred in 3D (no cross-note batch pass in the per-note render); 2D covers ch. Tests: tests/js/highway_teaching_marks.test.js extracts the pure helpers from both files (extract-and-eval) and asserts label mapping + strum-group bucketing. Part of #334 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
byrongamatos
added a commit
that referenced
this pull request
Jun 21, 2026
…539) Post-merge review of #538 noted the fg finger numeral rendered unconditionally on both highways and couldn't be turned off — only sd/ch sat behind the (default-off) teaching-marks toggle. A user who finds per-note numerals busy had no way to declutter. Add a SEPARATE finger-hints gate that keeps fg shown by default but makes it hideable, independent of the sd/ch opt-in (so the two defaults — fg on, sd/ch off — coexist; a single boolean can't express that): - 2D static/highway.js: _showFingerHints (localStorage 'showFingerHints' !== 'false', i.e. default on), a fingerHintsVisible bundle flag, and get/toggle/setFingerHintsVisible API; gates the fg label. - 3D plugins/highway_3d/screen.js: mirrors via bundle.fingerHintsVisible !== false (default on); gates the fg sprite. sd/ch unchanged. Default-on preserved (absent localStorage / absent bundle flag => shown); only an explicit false hides fg. Codex-reviewed: clean. Render test 7/7. Part of #334. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 21, 2026
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.
Part of #334
PR 2 of 3 for the teaching marks epic (feedpak 1.5.0 §6.2.2). Renders the three optional per-note marks on both highways, mirroring the bend-curve render (#532). Display only — no scoring /
NoteVerifiercoupling.2D —
static/highway.jsfg(fret-hand finger): renders by default as a small cyan numeral hugging the gem's right edge —T= thumb,1..4.sd(scale degree): amber label on the gem's left edge, opt-in.ch(strum group): a bracket connecting gems that share achkey, with a single arrowhead whose direction comes frompkd(down/up strum). Opt-in. Note-stream-only (chord notes already read as one simultaneous gesture).showTeachingMarkstoggle gates thesd/choverlays (default off) so the default highway stays uncluttered — exposed viatoggleTeachingMarks/get/setTeachingMarksVisibleand the bundle'steachingMarksVisibleflag.teachingFingerLabel/teachingDegreeLabel/strumGroupBuckets.3D —
plugins/highway_3d/screen.jsfg(default) +sd(opt-in, mirrors the 2D toggle viabundle.teachingMarksVisible) render next to the per-note fret label via a new pooled sprite (pTeachMarkLbl, full declare/create/warm/reset/null-out lifecycle)._scrChordNotenow resetsfg/sdto-1(like the existingfhm/bnv/btresets) so chord notes don't inherit stale marks.chstrum brackets are deferred in 3D — the per-note render has no cross-note batch pass to connect gems across strings; the 2D highway coversch. Documented in code.Tested locally
node tests/js/highway_teaching_marks.test.js→ 7 passed (label mapping for both highways + strum-group bucketing edge cases).node tests/js/highway_bend_curve.test.jsstill passes (helper extraction unaffected).node --check static/highway.jsandnode --check plugins/highway_3d/screen.jsclean._scrChordNoteleaking stalefg/sdto chord notes) — fixed; re-review clean.Deferrals
chstrum bracket in 3D (documented above).chbracket across chord notes in 2D (note-stream-only).🤖 Generated with Claude Code