Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/components/activity/ActivityCountPill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function ActivityCountPill({ needsInput, running, className }: ActivityCo
<span
aria-hidden="true"
className={cn(
'flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[10px] font-semibold leading-none',
'flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-2xs font-semibold leading-none',
needsInput > 0 ? 'bg-warning text-warning-foreground' : 'bg-primary text-primary-foreground',
className,
)}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/message/ContentDiffViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export function ContentDiffViewer({ before, after }: ContentDiffViewerProps) {
)}
>
{!isMobile && (
<div className="flex-shrink-0 w-14 flex text-muted-foreground/50 text-[10px]">
<div className="flex-shrink-0 w-14 flex text-muted-foreground/50 text-2xs">
<span className="w-7 px-1 text-right">
{line.oldLineNumber || ''}
</span>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/message/MessageThread.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ function QueuedPromptRow({ item }: { item: SessionInboxUser }) {
/>
<div className="mt-2 flex items-center gap-2 text-xs text-muted-foreground">
<span>{new Date(item.time.created).toLocaleTimeString()}</span>
<span className="font-mono text-[11px] font-semibold tracking-wider text-warning">
<span className="font-mono text-2xs font-semibold tracking-wider text-warning">
{item.delivery === 'queue' ? 'QUEUED' : 'STEERING'}
</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/message/PromptInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ if (isIOS && isSecureContext && navigator.clipboard && navigator.clipboard.read)
}`}
>
{key.symbol}
<span className="truncate font-sans text-[11px] font-medium opacity-80">{key.label}</span>
<span className="truncate font-sans text-2xs font-medium opacity-80">{key.label}</span>
</button>
)
})}
Expand Down Expand Up @@ -1249,7 +1249,7 @@ return (
{composerModeStyle && (
<span
data-testid="composer-mode-badge"
className={`absolute -top-2.5 left-3 z-10 px-1.5 py-0.5 rounded text-[10px] font-bold tracking-widest pointer-events-none ${composerModeStyle.badge}`}
className={`absolute -top-2.5 left-3 z-10 px-1.5 py-0.5 rounded text-2xs font-bold tracking-widest pointer-events-none ${composerModeStyle.badge}`}
>
{composerModeStyle.label}
</span>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/message/PromptSuggestions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export function PromptSuggestions<T>({
)}
</span>
{item.tag && (
<span className="flex-shrink-0 text-[10px] font-semibold uppercase tracking-wider px-1.5 py-0.5 rounded border border-border opacity-80">
<span className="flex-shrink-0 text-2xs font-semibold uppercase tracking-wider px-1.5 py-0.5 rounded border border-border opacity-80">
{item.tag}
</span>
)}
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/message/SessionConfigMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function ConfigSection({ label, children }: ConfigSectionProps) {
className="flex flex-col gap-1"
>
{label ? (
<div id={labelId} className="px-2 text-[11px] font-medium uppercase tracking-wide text-muted-foreground">
<div id={labelId} className="px-2 text-2xs font-medium uppercase tracking-wide text-muted-foreground">
{label}
</div>
) : null}
Expand Down Expand Up @@ -608,9 +608,9 @@ export const SessionConfigMenu = memo(function SessionConfigMenu({
· {modelName || 'Select model'}
</span>
{showVariant && currentVariant ? (
<span className="shrink-0 text-[11px] text-muted-foreground">{capitalize(currentVariant)}</span>
<span className="shrink-0 text-2xs text-muted-foreground">{capitalize(currentVariant)}</span>
) : null}
<span className={cn('shrink-0 text-[11px] font-medium', usageLabel ? usageTone : 'text-muted-foreground')}>
<span className={cn('shrink-0 text-2xs font-medium', usageLabel ? usageTone : 'text-muted-foreground')}>
{usageLabel ?? 'No context yet'}
</span>
</span>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/message/ToolCallPart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export const ToolCallPart = memo(function ToolCallPart({ part, messageID, direct
{isCompleted && <span className="text-success text-sm font-medium">✓</span>}
{isError && <span className="text-destructive text-sm font-medium">✗</span>}
<span className="font-medium text-foreground truncate">{description}</span>
<span className="text-[11px] font-medium text-highlight shrink-0">sub-agent</span>
<span className="text-2xs font-medium text-highlight shrink-0">sub-agent</span>
{backgroundIndicator}
{subagentSessionId && <ExternalLink className="w-3 h-3 shrink-0 text-primary" />}
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/message/VoiceConversationBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export function VoiceConversationBar({
</div>
</div>
<div className="flex flex-col items-center">
<p className={cn(RESERVED_LINE_CLASS, 'text-[11px] text-muted-foreground')}>{notice ?? ''}</p>
<p className={cn(RESERVED_LINE_CLASS, 'text-2xs text-muted-foreground')}>{notice ?? ''}</p>
<p className={cn(RESERVED_LINE_CLASS, 'text-xs text-muted-foreground')}>{hint}</p>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/navigation/RepoSessionNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function RepoNavGroup({
)}
>
<span className="flex min-w-0 items-center gap-1.5">
<span className="truncate text-[15px] font-bold tracking-tight text-highlight">
<span className="truncate text-sm font-bold tracking-tight text-highlight">
{name}
</span>
{indicator}
Expand Down Expand Up @@ -141,7 +141,7 @@ export function SessionNavRow({ item, isCurrent, onSelect, repoLabel }: SessionN
<span className="max-w-24 shrink-0 truncate text-xs text-highlight">{repoLabel}</span>
)}
{item.worktreeBranch && (
<span className="max-w-24 shrink-0 truncate font-mono text-[11px] text-primary">
<span className="max-w-24 shrink-0 truncate font-mono text-2xs text-primary">
{item.worktreeBranch}
</span>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function ScheduleReportsBadge({ total, failed, className }: ScheduleRepor
return (
<span
className={cn(
'absolute -top-1 -right-1 min-w-4 rounded-full px-1 text-center text-[10px] font-medium leading-4 text-primary-foreground',
'absolute -top-1 -right-1 min-w-4 rounded-full px-1 text-center text-2xs font-medium leading-4 text-primary-foreground',
failed > 0 ? 'bg-destructive' : 'bg-primary',
className,
)}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/repo/MultiRunCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export function MultiRunCard({
<div className="border-t border-border">
<h4 className="flex items-center gap-2 px-3 pt-3 text-xs font-semibold uppercase tracking-wide text-muted-foreground">
Fusions
<span className="rounded-full border border-border px-1.5 text-[11px] font-medium normal-case">
<span className="rounded-full border border-border px-1.5 text-2xs font-medium normal-case">
{run.fusions.length}
</span>
</h4>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/repo/WorktreeSessionGroups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ export function WorktreeSessionGroups({
<div className="flex min-w-0 items-center gap-2">
<span className="truncate text-sm font-medium">{label}</span>
{sourceLabel && source && (
<span className={`shrink-0 rounded-none border px-1.5 text-[10px] leading-4 ${OWNER_BADGE_CLASS[source]}`}>{sourceLabel}</span>
<span className={`shrink-0 rounded-none border px-1.5 text-2xs leading-4 ${OWNER_BADGE_CLASS[source]}`}>{sourceLabel}</span>
)}
{isInUse && (
<span className="inline-flex shrink-0 items-center gap-1 rounded-full border border-success/40 bg-success/15 px-1.5 text-[10px] leading-4 text-success">
<span className="inline-flex shrink-0 items-center gap-1 rounded-full border border-success/40 bg-success/15 px-1.5 text-2xs leading-4 text-success">
<span className="h-1.5 w-1.5 animate-pulse rounded-full bg-success" />
in use
</span>
Expand All @@ -245,7 +245,7 @@ export function WorktreeSessionGroups({
{group.sessions.length} {group.sessions.length === 1 ? 'session' : 'sessions'}
</span>
</div>
<div className="truncate font-mono text-[11px] text-muted-foreground" title={group.directory}>{group.directory}</div>
<div className="truncate font-mono text-2xs text-muted-foreground" title={group.directory}>{group.directory}</div>
</div>
</button>
{renderWorktreeActions(group, label, false)}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/repo/WorktreeTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function WorktreeTabs({
<TabsTrigger value="workspaces" className={tabClassName}>
<Layers className="h-3 w-3 shrink-0 text-primary" />
<span className={`min-w-0 truncate ${activeLabelClassName}`}>Worktrees</span>
<span className="shrink-0 rounded-full border border-border bg-card px-1.5 text-[11px] leading-4 text-muted-foreground">
<span className="shrink-0 rounded-full border border-border bg-card px-1.5 text-2xs leading-4 text-muted-foreground">
{workspaces.length}
</span>
</TabsTrigger>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/schedules/PromptTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ export function PromptTemplateCard({ template, selected = false, onApply, onEdit
const content = (
<>
<div className="flex flex-wrap items-center gap-2">
<Badge className="border-transparent bg-highlight text-[10px] uppercase tracking-wide text-highlight-foreground">
<Badge className="border-transparent bg-highlight text-2xs uppercase tracking-wide text-highlight-foreground">
{template.category}
</Badge>
<Badge className="border-transparent bg-muted text-[10px] uppercase tracking-wide text-foreground">
<Badge className="border-transparent bg-muted text-2xs uppercase tracking-wide text-foreground">
{template.cadenceHint}
</Badge>
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/schedules/ScheduleJobsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function isUnreadRun(lastRun: ScheduleRunSummary): boolean {

function ScheduleJobNewPill() {
return (
<span className="shrink-0 rounded-full bg-primary/15 px-1.5 py-0.5 text-[10px] font-medium text-primary">
<span className="shrink-0 rounded-full bg-primary/15 px-1.5 py-0.5 text-2xs font-medium text-primary">
NEW
</span>
)
Expand Down Expand Up @@ -187,7 +187,7 @@ export function ScheduleJobsTable({
{job.retainedWorktreeCount > 0 && (
<span
title="Worktrees this schedule has left on disk. Manage them from the job details."
className="shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"
className="shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-2xs font-medium text-muted-foreground"
>
{job.retainedWorktreeCount} worktree{job.retainedWorktreeCount === 1 ? '' : 's'}
</span>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/schedules/ScheduleRunsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export function ScheduleRunsTable({
{getRunTitle(run)}
</button>
{isUnread && (
<span className="shrink-0 rounded-full bg-primary/15 px-1.5 py-0.5 text-[10px] font-medium text-primary">NEW</span>
<span className="shrink-0 rounded-full bg-primary/15 px-1.5 py-0.5 text-2xs font-medium text-primary">NEW</span>
)}
</span>
{run.errorText && (
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/session/FormPrompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ function FieldLabel({
{required && <span className="text-destructive ml-0.5">*</span>}
</label>
{description && (
<p id={`${id}-description`} className="text-[15px] text-foreground/70 md:text-xs">
<p id={`${id}-description`} className="text-sm text-foreground/70 md:text-xs">
{description}
</p>
)}
Expand All @@ -478,7 +478,7 @@ function FieldGroup({
{label}
{required && <span className="text-destructive ml-0.5">*</span>}
</legend>
{description && <p className="text-[15px] text-foreground/70 md:text-xs">{description}</p>}
{description && <p className="text-sm text-foreground/70 md:text-xs">{description}</p>}
{children}
</fieldset>
)
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/source-control/BranchesTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,10 @@ export function BranchesTab({ repoId, currentBranch }: BranchesTabProps) {
)}
<span className="flex-1 text-sm truncate">{branch.name}</span>
{(isCheckedOutElsewhere || (isCurrent && isRepoWorktree)) && (
<span className="text-[10px] px-1.5 py-0.5 rounded bg-primary/20 text-primary">worktree</span>
<span className="text-2xs px-1.5 py-0.5 rounded bg-primary/20 text-primary">worktree</span>
)}
{branch.type === 'local' && !branch.upstream && !branch.isWorktree && !(isCurrent && isRepoWorktree) && (
<span className="text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground">local</span>
<span className="text-2xs px-1.5 py-0.5 rounded bg-muted text-muted-foreground">local</span>
)}
{isCurrent && <Check className={`w-4 h-4 ${GIT_UI_COLORS.current}`} />}
</button>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/source-control/ChangesTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export function ChangesTab({ repoId, onFileSelect, onClearFileSelection, selecte
)}
Commit {stagedFiles.length > 0 && `(${stagedFiles.length} staged)`}
</Button>
<p className="text-[10px] text-muted-foreground text-center">
<p className="text-2xs text-muted-foreground text-center">
{navigator.platform.includes('Mac') ? '⌘' : 'Ctrl'}+Enter to commit
</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/source-control/GitFlatFileItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function GitFlatFileItem({ file, isSelected, onSelect, onStage, onUnstage
)}
</div>
{file.staged && (
<span className={cn('text-[10px] px-1.5 py-0.5 rounded flex-shrink-0', GIT_UI_COLORS.stagedBadge)}>
<span className={cn('text-2xs px-1.5 py-0.5 rounded flex-shrink-0', GIT_UI_COLORS.stagedBadge)}>
staged
</span>
)}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/terminal/TerminalPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export function TerminalWorkspace({ target, directory, isOpen, onLastTerminalExi
>
<span className="truncate">{terminal.title}</span>
{terminal.status === 'exited' && (
<span className="rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground">
<span className="rounded bg-muted px-1.5 py-0.5 text-2xs text-muted-foreground">
{terminal.exitCode !== undefined ? `exited (${terminal.exitCode})` : 'exited'}
</span>
)}
Expand Down
23 changes: 15 additions & 8 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,26 @@

@theme {
--color-background: #0a0a0a;
--color-background-gradient: #0d0d0d;
--color-background-gradient: #0a0a0a;
--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;
--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;
Expand All @@ -45,6 +48,7 @@
--color-syntax-variable: #ffa657;
--color-syntax-operator: #79c0ff;
--color-syntax-punctuation: #d4d4d8;
--text-2xs: 0.625rem;
}

:root:not(.dark) {
Expand All @@ -53,7 +57,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;
Expand All @@ -63,6 +69,7 @@
--color-input: #e5e7eb;
--color-muted: #f4f4f5;
--color-popover: #ffffff;
--color-popover-foreground: #111827;
--color-destructive: #dc2626;
--color-destructive-foreground: #ffffff;
--color-secondary: #f4f4f5;
Expand All @@ -82,7 +89,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;
Expand Down Expand Up @@ -366,7 +373,7 @@ body {

.prose-enhanced th,
.prose-enhanced td {
padding: 0.375rem 0.5rem;
padding: 0.25rem 0.5rem;
font-size: 0.75rem;
}
}
Expand Down Expand Up @@ -541,7 +548,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 {
Expand Down
29 changes: 29 additions & 0 deletions frontend/src/lib/theme/colorTheme.test.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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')
Expand All @@ -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)

Expand Down
Loading