highway: make the missed-note gem visible + provider-color-driven - #1061
highway: make the missed-note gem visible + provider-color-driven#1061ahonnecke wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe missed-note effect now uses the configured provider color, a larger radial glow, and a wider outlined ring. Glow and ring opacity scale with normalized alpha. A purple fallback applies when color parsing fails. ChangesMissed Note Rendering
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
static/js/highway-state-primitives.js (1)
95-99: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUpdate the stale color description.
The comment still describes the effect as red. The implementation now uses
ns.colorwith a#c04bfffallback.Proposed comment update
- // Bold, unmissable red so a missed note reads at a glance the whole way + // Bold, provider-colored glow so a missed note reads at a glance the whole way🤖 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 `@static/js/highway-state-primitives.js` around lines 95 - 99, Update the nearby rendering comment to describe the current ns.color-based effect and its `#c04bff` fallback instead of referring to a red color, while preserving the existing notes about the glow, ring, and readable overlaid note content.
🤖 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.
Inline comments:
In `@static/js/highway-state-primitives.js`:
- Around line 104-117: Update the color handling around the glow gradient and
ring draw to compute one validated, normalized hex color with the purple
fallback, then reuse that value for RGB extraction and hwState.ctx.strokeStyle.
Remove the separate raw ns.color fallback so invalid input produces the same
fallback color for both draws.
---
Nitpick comments:
In `@static/js/highway-state-primitives.js`:
- Around line 95-99: Update the nearby rendering comment to describe the current
ns.color-based effect and its `#c04bff` fallback instead of referring to a red
color, while preserving the existing notes about the glow, ring, and readable
overlaid note content.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: d4d0f476-6f3e-43ee-89c0-890c2b33b832
📒 Files selected for processing (1)
static/js/highway-state-primitives.js
The note-state provider (feedBack#254) lets a scorer flag a note 'miss', but `_paintGemGlow` rendered every miss as a single hardcoded-red circle at globalAlpha 0.4·alpha over the gem. Two problems: 1. It ignored the provider's `color` (which hit/active already honor), so a scorer can't pick a non-colliding hue — and the hardcoded red sits right on top of the E string's own color (#ff3c3c), making a missed E unreadable. 2. At 0.4α over a same-size circle, with the provider's short transient alpha, a miss is effectively invisible. Now the miss glow honors `ns.color` (parsed for the radial-glow stops, fallback purple — deliberately away from the red E string), and renders a radial glow spilling to r·2.1 plus a crisp ring at r·1.2 so a missed note reads at a glance. Center tint stays light (0.32α) so the note colour + fret number (drawn on top) remain readable. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
39e0d21 to
3466a3f
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Addressed in the latest push — the miss glow and ring now derive from a single validated hex (an invalid |
Problem
The note-state provider (feedBack#254) lets a scorer flag a note
'miss', but_paintGemGlowrendered every miss as one hardcoded-red circle atglobalAlpha = 0.4·alpha, drawn over the gem atr·1.05:color(whichhit/activealready honor), so a scorer can't choose a non-colliding hue. The hardcoded red also sits directly on the E string's own color (#ff3c3cinDEFAULT_STRING_BRIGHT), so a missed low-E note is unreadable.0.4αover a same-size circle — with the provider's short transient alpha — a miss is effectively invisible.Change
_paintGemGlow's miss branch now:ns.color— parsed into the radial-glow stops (fallback purple#c04bff, deliberately away from the red E string).r·2.1+ a crisp ring atr·1.2so a missed note reads at a glance the whole way down the highway.0.32α) so the note colour + fret number (drawn on top by the caller) stay readable.One file,
static/js/highway-state-primitives.js. No API or contract change — a provider that returns a bare'miss'(no color) simply gets the purple default; one that returns{ state:'miss', color }gets its color.Pairs with a companion note_detect change that makes misses persist across a play (so they light up as the note approaches on the next loop/play), but this render fix stands alone.
🤖 Generated with Claude Code
Summary by CodeRabbit