fix: make composer banners opaque#4492
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
| @@ -548,14 +548,7 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil | |||
| .alert-glass { | |||
There was a problem hiding this comment.
🟢 Low src/index.css:548
The .alert-glass rule now applies an opaque background and drops backdrop-filter for every variant, so info, success, and warning composer banners lose their translucent glass treatment. ComposerBannerStackAlert applies .alert-glass to all variants, so the opaque override should be scoped to .alert-glass[data-variant="error"].
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/index.css around line 548:
The `.alert-glass` rule now applies an opaque `background` and drops `backdrop-filter` for every variant, so `info`, `success`, and `warning` composer banners lose their translucent glass treatment. `ComposerBannerStackAlert` applies `.alert-glass` to all variants, so the opaque override should be scoped to `.alert-glass[data-variant="error"]`.
Summary
Why
Composer banners used a shared translucent glass surface. Text and other high-contrast content behind a banner could show through and make its message difficult to read. Fixing only the error variant left the same underlying problem in warning and informational banners.
Impact
Before:
After:
Root cause
The base
.alert-glassrule mixed the application background with transparency and applied backdrop blur. Every semantic variant inherited that translucent surface; the variants only changed its tint.The fix makes the shared surface a solid mix of 96% application background and 4% semantic tint, so current and future variants cannot expose content behind them.
Validation
vp fmt --check apps/web/src/index.cssvp test run apps/web/src/components/chat/ComposerBannerStack.test.tsx(3 tests passed)