Skip to content

fix(web): keep generated muted foreground dimmer than entered text - #9113

Merged
maria-rcks merged 1 commit into
pingdotgg:mainfrom
flamboh:t3code/fix-vivid-muted-foreground
Sep 2, 2026
Merged

maria-rcks merged 1 commit into
pingdotgg:mainfrom
flamboh:t3code/fix-vivid-muted-foreground

fix(web): keep generated muted foreground dimmer than entered text

68211cf
Select commit
Loading
Failed to load commit list.
MacroscopeApp / Macroscope - UI Consistency succeeded Sep 1, 2026 in 59s

UI Consistency: All clear

All clear

Details

Note

Your check run agent prompt is: .macroscope/check-run-agents/ui-consistency.md
More information about how Check Run Agents work can be found in our Help Center.


🔍 Agent activity — 6 tool calls

1. browse_code — apps/web/src/themePalette.ts

2. browse_code — apps/web/src/themePalette.test.ts

💭 Now I'm checking the readableThemeText signature and standardMutedThemeText.

3. git_tools — readableThemeText|standardMutedThemeText

💭 Let me check the full implementation of readableThemeText around lines 1003-1030.

4. browse_code — apps/web/src/themePalette.ts

💭 I'm checking whether making mutedForeground mix toward text like placeholder does actually keeps it dimmer than text on the muted background, since the test requires mutedForeground's contrast to stay below text's contrast — worried the softening amount might push it too far toward full background instead. I confirm the amount-1 case searches between foreground and background contrast, matching the placeholder logic exactly, so line length and formatting look consistent with the existing style (printWidth around 100), and foregroundOn is still referenced elsewhere so nothing's orphaned. This looks like a small, consistent fix aligned with the theme system's contrast-derivation conventions. Now I'm checking whether deriving mutedForeground from textRgb loses per-surface hue solving, but since the contrast floor stays at 4.6 and the test only checks that mutedForeground's contrast is at least 4.5 and less than text's contrast, this should still pass. I also want to verify no other role depends on mutedForeground for cross-surface contrast, and whether mutedForeground should instead use the same standardMutedThemeText helper that sidebarMutedForeground and textMuted rely on for consistency, versus the managed path's readableThemeText approach. There's an edge case worth tracing: if text's own contrast against muted ever fell below 4.6, readableThemeText would just fall back to text itself, making mutedForeground equal to text and breaking the "less than text contrast" assertion — but this seems unlikely given the typical lightness offset between muted and its surface. I want to also check if any snapshot or bridge test depends on the previously generated colors elsewhere.

5. git_tools — mutedForeground

💭 The change checks out and foregroundOn is still used elsewhere. The mutedForeground now mixes textRgb toward the muted background instead of using OKLCH lightness solving, which preserves text hue and stays consistent with the placeholder logic right below—no risk of it colliding with placeholder styling. I should verify whether themeRgbToThemeColor also produces canonical OKLCH output like the previous version did.

6. git_tools — function themeRgbToThemeColor

💭 I'm checking whether mutedForeground being dimmer while other foreground tokens stay full-strength is consistent — muted-foreground is supposed to be muted, so this aligns with the managed path. This looks fine, ready to conclude with "all clear." Since output needs to follow the JSON schema, I'll set the state to success with title "UI Consistency: All clear" and summary "All clear" rather than a bare string response.


Agent Credits: 57 credits

Token usage: 12 uncached input · 225,245 cache-read input · 56,277 cache-write input · 2,772 output
Agent Credits may also include non-token charges from external tools such as web research.