From ae3399ac6bef5986bc4857a159776f95a1768bfa Mon Sep 17 00:00:00 2001 From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com> Date: Thu, 3 Dec 2026 10:58:51 -0500 Subject: [PATCH 1/3] Define the ring, card-foreground and popover-foreground --- frontend/src/index.css | 6 ++++ frontend/src/lib/theme/colorTheme.test.ts | 29 +++++++++++++++++++ frontend/src/lib/theme/colorTheme.ts | 6 ++++ .../src/lib/theme/syntaxHighlight.test.ts | 5 ---- 4 files changed, 41 insertions(+), 5 deletions(-) diff --git a/frontend/src/index.css b/frontend/src/index.css index d3fcf43c0..d162070e0 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -6,7 +6,9 @@ --color-foreground: #fafafa; --color-card: #141414; --color-card-hover: #1a1a1a; + --color-card-foreground: #fafafa; --color-border: #2a2a2a; + --color-ring: #d4d4d8; --color-primary: #1d4ed8; --color-primary-hover: #1e40af; --color-primary-foreground: #fafafa; @@ -16,6 +18,7 @@ --color-input: #323232; --color-muted: #18181b; --color-popover: #18181b; + --color-popover-foreground: #fafafa; --color-destructive: #dc2626; --color-destructive-foreground: #ffffff; --color-secondary: #27272a; @@ -53,7 +56,9 @@ --color-foreground: #111827; --color-card: #f9fafb; --color-card-hover: #f3f4f6; + --color-card-foreground: #111827; --color-border: #e5e7eb; + --color-ring: #6b7280; --color-primary: #1d4ed8; --color-primary-hover: #1e40af; --color-primary-foreground: #ffffff; @@ -63,6 +68,7 @@ --color-input: #e5e7eb; --color-muted: #f4f4f5; --color-popover: #ffffff; + --color-popover-foreground: #111827; --color-destructive: #dc2626; --color-destructive-foreground: #ffffff; --color-secondary: #f4f4f5; diff --git a/frontend/src/lib/theme/colorTheme.test.ts b/frontend/src/lib/theme/colorTheme.test.ts index 2b5d3bd67..aed8c81c8 100644 --- a/frontend/src/lib/theme/colorTheme.test.ts +++ b/frontend/src/lib/theme/colorTheme.test.ts @@ -1,4 +1,5 @@ import indexHtml from '../../../index.html?raw' +import indexCss from '../../index.css?raw' import { beforeEach, describe, expect, it } from 'vitest' import { APPEARANCE_STORAGE_KEY, @@ -14,6 +15,10 @@ function themeColorMeta(): string | null { return document.querySelector('meta[name="theme-color"]')?.getAttribute('content') ?? null } +function countOccurrences(source: string, needle: string): number { + return source.split(needle).length - 1 +} + function appearanceSnapshot() { const raw = window.localStorage.getItem(APPEARANCE_STORAGE_KEY) if (!raw) throw new Error('appearance snapshot missing') @@ -35,9 +40,33 @@ describe('applyColorTheme', () => { expect(root.style.getPropertyValue('--color-foreground')).toBe('#f8f8f2') expect(root.style.getPropertyValue('--color-primary')).toBe('#bd93f9') expect(root.style.getPropertyValue('--color-destructive')).toBe('#ff5555') + expect(root.style.getPropertyValue('--color-ring')).toBe('color-mix(in oklab, #f8f8f2 62%, #1d1e28)') + expect(root.style.getPropertyValue('--color-card-foreground')).toBe('#f8f8f2') + expect(root.style.getPropertyValue('--color-popover-foreground')).toBe('#f8f8f2') expect(themeColorMeta()).toBe('#1d1e28') }) + it('derives the focus ring and the card and popover foregrounds from the palette', () => { + const dark = resolveColorThemeTokens('dracula', true) + const light = resolveColorThemeTokens('dracula', false) + + expect(dark?.ring).toBe(dark?.['muted-foreground']) + expect(dark?.['card-foreground']).toBe('#f8f8f2') + expect(dark?.['popover-foreground']).toBe('#f8f8f2') + expect(light?.['card-foreground']).toBe('#1f1f2f') + expect(light?.['popover-foreground']).toBe('#1f1f2f') + expect(resolveColorThemeTokens('oc-2', true)?.ring).toBe('#707070') + }) + + it('defines every themed token once for dark mode and once for light mode', () => { + const keys = Object.keys(resolveColorThemeTokens('dracula', true) ?? {}) + + expect(keys).toEqual(expect.arrayContaining(['ring', 'card-foreground', 'popover-foreground'])) + for (const key of keys) { + expect(countOccurrences(indexCss, `--color-${key}:`)).toBe(2) + } + }) + it('applies the Dracula light palette when the mode is light', () => { applyColorTheme(document.documentElement, 'dracula', false) diff --git a/frontend/src/lib/theme/colorTheme.ts b/frontend/src/lib/theme/colorTheme.ts index fb9b9a2f6..433cb921d 100644 --- a/frontend/src/lib/theme/colorTheme.ts +++ b/frontend/src/lib/theme/colorTheme.ts @@ -9,7 +9,9 @@ const MANAGER_THEME_TOKENS = [ 'foreground', 'card', 'card-hover', + 'card-foreground', 'border', + 'ring', 'primary', 'primary-hover', 'primary-foreground', @@ -18,6 +20,7 @@ const MANAGER_THEME_TOKENS = [ 'input', 'muted', 'popover', + 'popover-foreground', 'destructive', 'destructive-foreground', 'secondary', @@ -134,11 +137,14 @@ export function resolveColorThemeTokens( foreground: ink, card: mix(4), 'card-hover': mix(7), + 'card-foreground': ink, popover: mix(5), + 'popover-foreground': ink, muted: mix(6), accent: mix(10), secondary: mix(10), border: mix(14), + ring: mutedForeground, input: mix(16), 'muted-foreground': mutedForeground, primary, diff --git a/frontend/src/lib/theme/syntaxHighlight.test.ts b/frontend/src/lib/theme/syntaxHighlight.test.ts index 42ea06eaa..8806b3595 100644 --- a/frontend/src/lib/theme/syntaxHighlight.test.ts +++ b/frontend/src/lib/theme/syntaxHighlight.test.ts @@ -3,10 +3,6 @@ import textPart from '../../components/message/TextPart.tsx?raw' import { describe, expect, it } from 'vitest' import { resolveColorThemeTokens } from './colorTheme' -function countOccurrences(source: string, needle: string): number { - return source.split(needle).length - 1 -} - describe('syntax highlight stylesheet', () => { it('does not import GitHub highlight.js stylesheets', () => { expect(indexCss).not.toContain('highlight.js/styles') @@ -26,7 +22,6 @@ describe('syntax highlight stylesheet', () => { for (const key of syntaxKeys) { expect(indexCss).toContain(`var(--color-${key})`) - expect(countOccurrences(indexCss, `--color-${key}:`)).toBe(2) } }) }) From bc8fe466d71dee614b936760941f2faaf10dd164 Mon Sep 17 00:00:00 2001 From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com> Date: Thu, 3 Dec 2026 11:00:25 -0500 Subject: [PATCH 2/3] Merge near-duplicate neutrals and off-scale CSS literals --- frontend/src/index.css | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/index.css b/frontend/src/index.css index d162070e0..0c3ab5316 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -2,7 +2,7 @@ @theme { --color-background: #0a0a0a; - --color-background-gradient: #0d0d0d; + --color-background-gradient: #0a0a0a; --color-foreground: #fafafa; --color-card: #141414; --color-card-hover: #1a1a1a; @@ -14,14 +14,14 @@ --color-primary-foreground: #fafafa; --color-muted-foreground: #d4d4d8; --color-placeholder: color-mix(in oklab, var(--color-muted-foreground) 55%, var(--color-background)); - --color-accent: #27272a; + --color-accent: #2a2a2a; --color-input: #323232; - --color-muted: #18181b; - --color-popover: #18181b; + --color-muted: #141414; + --color-popover: #141414; --color-popover-foreground: #fafafa; --color-destructive: #dc2626; --color-destructive-foreground: #ffffff; - --color-secondary: #27272a; + --color-secondary: #2a2a2a; --color-secondary-foreground: #fafafa; --color-accent-foreground: #fafafa; --color-success: #34d399; @@ -88,7 +88,7 @@ --color-agent-build: #034cff; --color-agent-docs: #ffb224; --color-agent-ask: #0091ff; - --color-syntax-comment: #6a737d; + --color-syntax-comment: #6b7280; --color-syntax-keyword: #d73a49; --color-syntax-string: #032f62; --color-syntax-primitive: #6f42c1; @@ -372,7 +372,7 @@ body { .prose-enhanced th, .prose-enhanced td { - padding: 0.375rem 0.5rem; + padding: 0.25rem 0.5rem; font-size: 0.75rem; } } @@ -547,7 +547,7 @@ input:-webkit-autofill:active { *::-webkit-scrollbar-thumb { background-color: var(--color-border); - border-radius: 3px; + border-radius: var(--radius-sm); } *::-webkit-scrollbar-thumb:hover { From 55c731d79b72ba351d423ecc676727146820f4f1 Mon Sep 17 00:00:00 2001 From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com> Date: Thu, 3 Dec 2026 16:15:19 +0000 Subject: [PATCH 3/3] Move small text onto a rem typography scale --- frontend/src/components/activity/ActivityCountPill.tsx | 2 +- frontend/src/components/message/ContentDiffViewer.tsx | 2 +- frontend/src/components/message/MessageThread.tsx | 2 +- frontend/src/components/message/PromptInput.tsx | 4 ++-- frontend/src/components/message/PromptSuggestions.tsx | 2 +- frontend/src/components/message/SessionConfigMenu.tsx | 6 +++--- frontend/src/components/message/ToolCallPart.tsx | 2 +- frontend/src/components/message/VoiceConversationBar.tsx | 2 +- frontend/src/components/navigation/RepoSessionNav.tsx | 4 ++-- .../src/components/notifications/ScheduleReportsBadge.tsx | 2 +- frontend/src/components/repo/MultiRunCard.tsx | 2 +- frontend/src/components/repo/WorktreeSessionGroups.tsx | 6 +++--- frontend/src/components/repo/WorktreeTabs.tsx | 2 +- frontend/src/components/schedules/PromptTab.tsx | 4 ++-- frontend/src/components/schedules/ScheduleJobsTable.tsx | 4 ++-- frontend/src/components/schedules/ScheduleRunsTable.tsx | 2 +- frontend/src/components/session/FormPrompt.tsx | 4 ++-- frontend/src/components/source-control/BranchesTab.tsx | 4 ++-- frontend/src/components/source-control/ChangesTab.tsx | 2 +- frontend/src/components/source-control/GitFlatFileItem.tsx | 2 +- frontend/src/components/terminal/TerminalPanel.tsx | 2 +- frontend/src/index.css | 1 + frontend/src/pages/SessionDetail.tsx | 6 +++--- 23 files changed, 35 insertions(+), 34 deletions(-) diff --git a/frontend/src/components/activity/ActivityCountPill.tsx b/frontend/src/components/activity/ActivityCountPill.tsx index 25215a302..78d6076d7 100644 --- a/frontend/src/components/activity/ActivityCountPill.tsx +++ b/frontend/src/components/activity/ActivityCountPill.tsx @@ -14,7 +14,7 @@ export function ActivityCountPill({ needsInput, running, className }: ActivityCo