Restore note-detection pill controls + legacy section order - #16
Conversation
Restores two pill controls dropped when staffview's own note detection was
replaced by the core domain, and realigns the section order with the legacy
pill.
- NOTE DETECTION section:
- Detect toggle — master on/off for scoring. Off keeps the monitor synth
but skips judging, the miss sweep, and note-detection reporting; the sweep
cursor still tracks the play head so re-enabling doesn't flood misses.
- Clear on seek toggle — whether a seek clears miss dots for the seeked-over
/ replayed region, or leaves them in place.
- Both persisted to localStorage.
- Section order now mirrors the legacy pill:
NOTE DETECTION → STUDY → HAND → MIDI (+ Sound + Volume) → LAYOUT → ZOOM,
with a consistent separator on the MIDI section (previously the first).
Note explorer stays in its own PR (#9); it is not part of this stack.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: gionnibgud <gionnibgud@gmail.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdds persistent "NOTE DETECTION" controls to the Staff View options pill, backed by new localStorage keys. Detection toggling changes note scoring and miss-sweep tracking, while the clear-on-seek setting gates miss-dot rollback during seeks. Test coverage and changelog text were updated. ChangesNote-detection controls
Estimated code review effort: 3 (Moderate) | ~25 minutes Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
screen.js (1)
3298-3316: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winStudy mode should respect Detect off
screen.js:3304_handleNoteOnenters_svStudyHandleNoteOn()before the Detect check, and that path still updates hits/misses and calls_svNdReport()/_svEmitNoteResult(). If Detect is meant to be the master scoring toggle, gate the Study-mode branch too or make the exception explicit.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@screen.js` around lines 3298 - 3316, _handleNoteOn currently routes study-mode note events into _svStudyHandleNoteOn() before checking _svDetectEnabled, so study mode can still score and report when Detect is off. Update the gating in _handleNoteOn so the study-mode path is also blocked by the Detect toggle, or make the study-mode exception explicit in that branch. Keep the behavior centered around _svStudyHandleNoteOn, _svNdReport, and _svEmitNoteResult so Detect remains the master scoring switch.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@screen.js`:
- Around line 3298-3316: _handleNoteOn currently routes study-mode note events
into _svStudyHandleNoteOn() before checking _svDetectEnabled, so study mode can
still score and report when Detect is off. Update the gating in _handleNoteOn so
the study-mode path is also blocked by the Detect toggle, or make the study-mode
exception explicit in that branch. Keep the behavior centered around
_svStudyHandleNoteOn, _svNdReport, and _svEmitNoteResult so Detect remains the
master scoring switch.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 73b5f627-0635-43c5-b0ed-a29fb554536f
📒 Files selected for processing (2)
CHANGELOG.mdscreen.js
Reconcile clear-on-seek toggle (#16) with the seek counter-rollback fix (#14): gate the miss-dot loop AND its tally decrement on _svClearOnSeek; keep hit-claim/wrong-key rollback unconditional. Define _svClearOnSeek in the score-test seek harness (default true) so the rollback tests exercise the clearing path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Restore note-detection pill controls + legacy section order
Follow-up that restores two options dropped when staffview's own note detection
was replaced by the core note-detection domain, and realigns the pill's section
order with the pre-namespace (legacy) version.
What's here
(play/listen along) but skips judging, the miss sweep, and note-detection
reporting. The sweep cursor still tracks the play head while off, so
re-enabling mid-song doesn't retroactively flood the skipped span.
seeked-over / replayed region (on) or leaves them in place (off).
localStorage.NOTE DETECTION → STUDY → HAND → MIDI (+ Sound + Volume) → LAYOUT → ZOOM,
matching the original, with a consistent separator on the MIDI section.
Notes for review
additive unless toggled.
not here — it lives in its own PR (Note explorer: alt-click / double-tap pitch tooltip #9,
feat/note-explorer).Verification
keyboard: Detect off = synth only, no scoring; re-enable mid-song doesn't
dump misses; Clear-on-seek on/off behaves as described; both persist across
reload; pill order/separators correct.
npm testgreen (54/54).🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes