Fix AgentBriefingBanner theme-aware styling for dark/light mode#7776
Fix AgentBriefingBanner theme-aware styling for dark/light mode#7776
Conversation
Wrap Alert in ConfigProvider with theme-aware colors using useThemeMode and palette values. Uses FIDESUI_MINOS for dark mode and FIDESUI_LIMESTONE for light mode backgrounds. Remove unused visible state since Ant Design's closable prop handles dismissal internally. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
There was a problem hiding this comment.
Overall this is a clean, well-scoped change. The approach of wrapping Alert in a nested ConfigProvider to override only the alert's color tokens is consistent with how HomeContainer.tsx and HomeBanner.tsx handle theming, and the useMemo dependency on resolvedMode is correct.
The removal of the local visible/setVisible state in favor of Ant Design's built-in closable behavior is a good simplification — the old controlled state was functionally equivalent to what Ant handles internally.
One item worth confirming before merge: The dark mode colorInfoBg uses FIDESUI_MINOS (#2b2e35) while HomeBanner.tsx uses FIDESUI_BG_MINOS (#4f525b) for dark mode backgrounds. This inconsistency may be intentional if the alert is meant to be very dark, but it's worth double-checking with a designer that the contrast/visibility is correct in practice. See inline comment for details.
Ticket N/A
Description Of Changes
Wrap the AgentBriefingBanner Alert component in a ConfigProvider with theme-aware colors using
useThemeModeand palette values. In dark mode, the banner usesFIDESUI_MINOSfor background/border; in light mode, it usesFIDESUI_LIMESTONE. This replaces hardcoded theme values with dynamic ones that respond correctly to the active theme.Also cleans up dead code: removes unused
visible/setVisiblestate since Ant Design'sclosableprop handles alert dismissal internally.Code Changes
clients/admin-ui/src/home/AgentBriefingBanner.tsx- Wrap Alert in ConfigProvider with theme-aware colors via useThemeMode + palette. Remove unused useState for visibility. Replace useCallback with useMemo for theme config.Steps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdated