Fix brand color tokens keeping light values in dark mode - #65
Merged
Conversation
milanshen
approved these changes
Aug 12, 2026
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.
Context
In dark mode, the cards on the subagent rail still rendered in the light palette. The cause is in
src/index.css. The 21 coSlash brand tokens were literal hex values inside a plain@themeblock. A literal in@themehas nothing for.darkto override, so every brand token kept its light value on a dark page. The subagent card was the most visible case, because it is the largest painted surface and it repeats once per subagent.Changes
@themeblock became@theme inlinealiases that point at:rootvariables, plus a.darkoverride set. This is the same indirection the shadcn neutrals already use in this file. No component reads these through anything but a utility class, so no consumer changed.#0a0a0ais mud, so on dark it sits 1.06 above the page at#0c1315.DetailedSubagentRowpaints thesubagent-bgbadge directly onto the card, and a saturated card swallows that badge. The rail carries the subagent identity instead, at#2a94a8.rgba(23, 39, 66, 0.28), which does nothing over a near-black page. On dark it is nowrgba(0, 0, 0, 0.6).SessionInspectorno longer usesborder-subagent-railas a full box border. That token becomes strong teal on dark, which would ring the row in loud teal. The row now uses the default card border, which matchesSubagentCard.:rootvalue is the same hex as before.Test
npm run lint— passed. Two warnings remain inSessionSortDropdownMenu.tsx, both present before this branch.npx tsc --noEmit— passednpm test— passed, 10 testsnpx vite build— passed. In the built CSS,.bg-subagent-cardnow emitsbackground-color:var(--subagent-card)instead of a baked hex,:rootkeeps#f2fbfc, and.darkcarries#0c1315.Screenshots