-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Description
In cortex-core/src/style.rs, the interpolate_brain_pulse() function claims to interpolate between CYAN_PRIMARY, SKY_BLUE, and ELECTRIC_BLUE (per its doc comments), but hardcodes completely different RGB values from those constants. Similarly, brain_cyan() uses the wrong blue channel value.
This produces wrong visible output: the ThinkingIndicator widget (which calls brain_pulse()) renders in blue-cyan #00FFFF instead of the project's intended green-cyan #00FFA3.
Proof of mismatch
The project constants at style.rs lines 13-19:
pub const CYAN_PRIMARY: Color = Color::Rgb(0, 255, 163); // #00FFA3
pub const SKY_BLUE: Color = Color::Rgb(100, 255, 180); // #64FFB4
pub const ELECTRIC_BLUE: Color = Color::Rgb(50, 255, 150); // #32FF96The brain widget at brain.rs line 66 uses the correct value:
const ACCENT_GREEN: (u8, u8, u8) = (0x00, 0xFF, 0xA3); // = CYAN_PRIMARY ✓But interpolate_brain_pulse() at style.rs lines 454-456 hardcodes wrong values:
// CYAN_PRIMARY: RGB(0, 255, 255) #00FFFF ← WRONG (actual: 0, 255, 163)
// SKY_BLUE: RGB(135, 206, 235) #87CEEB ← WRONG (actual: 100, 255, 180)
// ELECTRIC_BLUE: RGB(125, 249, 255) #7DF9FF ← WRONG (actual: 50, 255, 150)And brain_cyan() at style.rs line 437:
// CYAN_PRIMARY is RGB(0, 255, 255) ← WRONG comment, actual is (0, 255, 163)
let bl = (255.0 * b) as u8; // ← should be (163.0 * b)The hardcoded values are standard web colors (CSS cyan, sky blue, electric blue) instead of the project's custom green-cyan palette.
Error Message
No crash — produces wrong visual output. The ThinkingIndicator shows blue-cyan pulsation instead of the project's green-cyan theme.
Debug Logs
User-visible call path:
ThinkingIndicator::render() (thinking.rs:84)
└→ CortexStyle::brain_pulse(intensity) (style.rs:412)
└→ interpolate_brain_pulse(intensity) (style.rs:449)
└→ Returns colors like RGB(0, 255, 255) = #00FFFF
instead of CYAN_PRIMARY = RGB(0, 255, 163) = #00FFA3
The brain widget itself (brain.rs) correctly uses ACCENT_GREEN = (0, 255, 163), so the ThinkingIndicator spinner shows a different color from the brain it accompanies.
System Information
Bounty Challenge System Information
====================================
Version: 0.1.0
OS: Windows
Version: Microsoft Windows [Version 10.0.26200.7840]
Rust: rustc 1.90.0
Target: x86_64
====================================
Steps to Reproduce
- Look at the
ThinkingIndicatorwidget with a pulse active - The spinner text pulses through blue-cyan tones (#00FFFF → #87CEEB → #7DF9FF)
- Compare with the Brain widget next to it — Brain uses green-cyan (#00FFA3)
- The two widgets that should share the same "brain" color scheme show different colors
Or verify programmatically:
// brain_pulse(0.0) should match CYAN_PRIMARY
let pulse_color = interpolate_brain_pulse(0.0);
assert_eq!(pulse_color, CYAN_PRIMARY); // FAILS!
// pulse_color = Rgb(0, 255, 255)
// CYAN_PRIMARY = Rgb(0, 255, 163)Expected Behavior
brain_pulse() should return colors interpolated between the actual constant values: CYAN_PRIMARY RGB(0,255,163), SKY_BLUE RGB(100,255,180), ELECTRIC_BLUE RGB(50,255,150).
Actual Behavior
brain_pulse() returns colors interpolated between wrong web-standard values: RGB(0,255,255), RGB(135,206,235), RGB(125,249,255) — producing blue-cyan output instead of the project's green-cyan theme.