Repository navigation
feat: Define missing Tailwind theme tokens and consolidate design-system drift (OM-242) - #504
Merged
chriswritescode-dev merged 3 commits intoDec 3, 2026
Conversation
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
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.
User description
What this achieves
Fixes the theme-token gaps and static/runtime drift listed in the "Design system OpenCode Manager" report. Dark mode, light mode, the OpenCode color palettes and root font-size scaling (87.5%–125%) keep working.
ring,card-foregroundandpopover-foreground(inbutton,badge,card,checkbox,dialog,popover,select,tabs,tooltipand others), but those tokens were never defined, so the classes did nothing. Keyboard focus on UI-kit buttons now shows a visible ring.What changed
Tokens (
frontend/src/index.css,frontend/src/lib/theme/colorTheme.ts)--color-ring,--color-card-foregroundand--color-popover-foregroundto both@theme(dark) and:root:not(.dark)(light):#d4d4d8, foregrounds#fafafa#6b7280, foregrounds#111827MANAGER_THEME_TOKENS.resolveColorThemeTokensderives them for every OpenCode palette:ring= the palette's muted foreground, and both foregrounds = the palette ink.applyColorThemetherefore overrides them, and the boot replay restores them after a reload.Neutral and literal consolidation (
frontend/src/index.css)mutedandpopover#18181b→#141414;accentandsecondary#27272a→#2a2a2a;background-gradient#0d0d0d→#0a0a0a.syntax-comment#6a737d→#6b7280..prose-enhancedtable cell padding0.375rem(6px) →0.25rem(4px). Scrollbar thumb radius3px→var(--radius-sm).Typography
--text-2xs: 0.625rem. In 21 component and page files, everytext-[10px]andtext-[11px]is nowtext-2xs, and everytext-[15px]is nowtext-sm.Tests
colorTheme.test.tschecks that Dracula sets the three new tokens inline and that they derive from the palette in dark and light mode. A new test checks that every themed token is defined exactly once for dark and once for light inindex.css. That test replaces the syntax-only version of the same count check that was insyntaxHighlight.test.ts.Validation
Handback validation passed on
55c731d7with no fixes needed. It ran in headless Chromium against the real backend, at desktop (1280×720) and mobile (iPhone 13) sizes, and changed settings through Settings › General:#d4d4d8at 50%, and popover text usespopover-foreground.#6b7280, foregrounds#111827, gray focus ring,syntax-comment#6b7280.text-2xs8.75px; Extra large makes the root 20px andtext-2xs12.5px; Default goes back to 16px. Notext-[10px],text-[11px]ortext-[15px]classes render.main: no new findings, off-token findings dropped (for example 18 → 14 on Session config desktop), and 0 axe violations.pnpm --filter frontend exec vitest run: 4132 tests passed.pnpm --filter frontend typecheck: clean.pnpm lint: 0 warnings and 0 errors.check_design: conforms.Not rendered in the browser:
Cardcomponent (its token value was checked in every mode)text-2xscall sites that need repositories, schedules or git data (covered by the diff and by checking that no pixel-size classes render anywhere in the DOM)For the reviewer
text-2xs).FormPromptdescriptions and theRepoNavGrouprepo name go from 15px to 14px (text-sm).mutedandpopovernow sharecard's#141414, andaccentandsecondarynow shareborder's#2a2a2a. Watch for places where a popover or muted surface sat on a card and depended on the slight difference to stand out.PR Type
Enhancement
Description
Add missing
ring,card-foregroundandpopover-foregroundtheme tokensDerive those tokens for every OpenCode palette
Introduce
text-2xsrem token and replacetext-[10px]/text-[11px]Consolidate near-duplicate neutrals and off-scale CSS literals
Diagram Walkthrough
File Walkthrough
2 files
Add theme tokens, text-2xs scale and merge neutralsRegister and derive new theme tokens per palette2 files
Test ring and foreground token derivationRemove duplicated occurrence-count helper from test16 files
Use text-2xs for header metadata labelsSwitch keybar and mode badge to text-2xsStandardize config section and usage labelsUse text-2xs for queued prompt statusUse text-2xs for sub-agent labelUse text-2xs for voice notice textUse text-2xs for activity count pillNormalize nav title and branch text sizesUse text-2xs for worktree badges and pathsUse text-2xs for job pillsUse text-2xs for unread run badgeReplace pixel description sizes with text-smUse text-2xs for branch state labelsUse text-2xs for staged badgeUse text-2xs for terminal exit badgeUse text-2xs for template category badges6 files