fix(tuix/theme): split MUTED into light/dark variants so dark mode reads
Palette::MUTED was Color::DarkGrey (SGR 90 "bright black") for both
themes. On Warp / iTerm2 / Mac Terminal dark profiles, SGR 90 maps to
roughly #3F3F3F — about 3:1 contrast against a typical dark background.
Tool-batch child rows under a parallel header (└ WebFetch(https://...),
attachment markers, status hints, etc.) used Role::Muted and rendered
nearly invisible (user screenshot from Warp dark, atomcode v4.22).
Light-mode contrast is fine the same way (SGR 90 on white lands at
~5:1), so the fix is mode-aware:
light → MUTED_LIGHT = DarkGrey (SGR 90, dark gray on white)
dark → MUTED_DARK = White (SGR 37, light gray on dark, ~8-10:1)
muted_for_current_theme() reads highlight::theme::is_light_for_render
— the same theme switch the syntect / markdown layers already track —
so the role lookup tracks live theme changes without restart.
Palette::MUTED stays as a back-compat alias for MUTED_LIGHT so any
older direct reference keeps compiling. Both Role::Muted and
Role::AccentDim now route through the theme-aware helper.
Tests:
- muted_switches_with_theme: pin Muted+AccentDim swing between
MUTED_LIGHT (90) and MUTED_DARK (37) on set_theme_mode toggle.
- back_compat_muted_alias_is_light_variant: pin the bare constant.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>