fix: raise Agent mark contrast on the environment overview - #42
Merged
Conversation
The overview drew each Agent mark as a blue glyph on a blue tinted chip, because --agent-accent is a single var(--blue) for every row rather than a per-Agent brand colour. That left the marks at 3.75:1 on light and 3.82:1 on dark -- above the 3:1 graphics threshold, with no margin. Drop the chip: the box is transparent and the glyph carries the contrast on its own, in full black on light and full white on dark. --icon-fg would not do, as its #3a3a3c / #d1d1d6 were mixed to sit inside a tinted chip; the new --agent-mark-fg is 19.63:1 and 13.94:1 against the card. The borders are set to transparent rather than removed. .agent-icon sizes its 34px box as border-box, so dropping the border would hand those 2px to the glyph and enlarge the mark. No compliance question here: all five licensed assets are single-colour glyphs painted with fill="currentColor" and carry no brand colour, so inheriting the page colour is their published behaviour, not a restyling of vendor artwork. styles/agent-mark.test.ts locks the three things that are load-bearing and otherwise unguarded: both card types keep a transparent box at 34px, the token is overridden in *both* dark declarations (tokens.css declares the dark palette twice, and missing one would fall back to black when a theme is forced), and the shared .agent-icon base rule keeps its chip for the onboarding list. The assertions read the stylesheets as text because jsdom does not resolve var(). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The environment overview drew each Agent mark as a blue glyph on a blue tinted chip.
--agent-accentis a singlevar(--blue)for every row (app.css:1057) rather than a per-Agent brand colour, so the tint carried no information and put the glyph at 3.75:1 on light and 3.82:1 on dark — above the 3:1 graphics threshold, with no margin.The mark now sits on a transparent box and carries the contrast itself: full black on light, full white on dark, 19.63:1 and 13.94:1 against the card.
--icon-fgwould not have worked here. Its#3a3a3c/#d1d1d6were mixed to sit inside a tinted chip; with nothing behind the glyph the mark needs the full range, so this adds--agent-mark-fg.Scope is the two overview rules only. The shared
.agent-iconbase rule keeps its chip, which is what the onboarding Agent list uses.Notes for the reviewer
The borders are set to
transparent, not removed..agent-iconsizes its 34px box asborder-box, so dropping the border hands those 2px to the glyph and silently enlarges the mark.--agent-mark-fgis added in three places.tokens.cssdeclares the dark palette twice — once for@media (prefers-color-scheme: dark), once for.theme-dark— and a token missing from one copy falls back to the light value when a theme is forced.No compliance question. All five licensed assets are single-colour glyphs painted with
fill="currentColor"and carry no brand colour, so inheriting the page colour is their published behaviour rather than a restyling of vendor artwork. TheviewBoxassertion inicons/agents.test.tsxstill guards the published geometry.Tests
frontend/src/styles/agent-mark.test.tslocks the three load-bearing facts, none of which had a gate:.agent-iconbase rule keeps its chipThe assertions read the stylesheets as text: jsdom does not resolve
var(), sogetComputedStylecannot see any of this. Each was mutation-tested by reinjecting the prior state — reverting.desktop-app-iconto the tinted chip, deleting the.theme-darkcopy of the token, and flattening the base rule instead — and each fails on the matching regression.Verification
go vet ./...cleantsc --noEmitcleanvite buildclean, one asset pairrgba(0, 0, 0, 0), glyph torgb(0, 0, 0)/rgb(255, 255, 255), box stays 34×34. The onboarding.agent-iconstill measures 38×38 with its border and--icon-fg.🤖 Generated with Claude Code