27c690285ac45e4a1d62f3da15f6a57808c4d941
Two issues: 1. Icon badges read as a coloured glyph on a same-hue LIGHT tile (bgcolor X.light + color X.main) — low contrast, "badly visible". The AttendanceHistory month tile and the Dashboard 2FA-banner icon now use a SOLID tile (X.main) + white glyph, matching the StatCard badge convention. Readable in both schemes (verified: info.main #1d4ed8 light / #3b82f6 dark, error.main, white glyph). 2. Theme reverted to light on F5 while the toggle still showed dark. Cause: two independent stores — our ThemeContext key (boha-theme) and MUI's own cssVariables mode key (mui-mode). The toggle only wrote boha-theme, so on mount MUI restored its stale mui-mode and overrode data-theme. Collapsed to a SINGLE source of truth: ThemeContext now reads/writes MUI's `mui-mode` key directly (with a one-time migration from the legacy boha-theme, which is then removed). Verified: toggle dark -> F5 -> stays dark; only `mui-mode` remains in localStorage. tsc -b --noEmit, npm run build, vitest 152/152 clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Description
No description provided