Skip to content
Open
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
4 changes: 2 additions & 2 deletions src/__tests__/renderer/constants/themes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ describe('THEMES constant', () => {
}
});

it('should have exactly 17 themes (sync check with ThemeId type)', () => {
it('should have exactly 18 themes (sync check with ThemeId type)', () => {
// This count should match the number of IDs in ThemeId union type.
// If a new theme is added to THEMES without updating ThemeId, TypeScript errors.
// If ThemeId is updated without adding to isValidThemeId array, other tests fail.
// This test serves as an explicit reminder when themes are added/removed.
expect(themeIds.length).toBe(17);
expect(themeIds.length).toBe(18);
});

it('should have theme.id matching its key', () => {
Expand Down
8 changes: 4 additions & 4 deletions src/renderer/components/SessionListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export function SessionListItem({
{session.origin === 'user' && (
<span
className="text-[10px] font-bold px-1.5 py-0.5 rounded"
style={{ backgroundColor: theme.colors.accent + '30', color: theme.colors.accent }}
style={{ backgroundColor: theme.colors.accent + '40', color: theme.colors.accentText }}
title="User-initiated through Maestro"
>
MAESTRO
Expand All @@ -226,7 +226,7 @@ export function SessionListItem({
{session.origin === 'auto' && (
<span
className="text-[10px] font-bold px-1.5 py-0.5 rounded"
style={{ backgroundColor: theme.colors.warning + '30', color: theme.colors.warning }}
style={{ backgroundColor: theme.colors.warning + '40', color: theme.colors.warning }}
title="Auto-run session"
>
AUTO
Expand All @@ -235,7 +235,7 @@ export function SessionListItem({
{!session.origin && (
<span
className="text-[10px] font-bold px-1.5 py-0.5 rounded"
style={{ backgroundColor: theme.colors.border, color: theme.colors.textDim }}
style={{ backgroundColor: theme.colors.border, color: theme.colors.textMain }}
title="Claude Code CLI session"
>
CLI
Expand All @@ -245,7 +245,7 @@ export function SessionListItem({
{/* Session ID pill */}
<span
className="text-[10px] font-mono px-1.5 py-0.5 rounded"
style={{ backgroundColor: theme.colors.border + '60', color: theme.colors.textDim }}
style={{ backgroundColor: theme.colors.border, color: theme.colors.textMain }}
>
{session.sessionId.startsWith('agent-')
? `AGENT-${session.sessionId.split('-')[1]?.toUpperCase() || ''}`
Expand Down
16 changes: 15 additions & 1 deletion src/renderer/utils/markdownConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,23 @@ export function createMarkdownComponents(options: MarkdownComponentsOptions): Pa
}

// Standard syntax-highlighted code block
// Merge theme's text color into vscDarkPlus base so plain-text
// code blocks match inline code across all themes.
const themedStyle = {
...vscDarkPlus,
'pre[class*="language-"]': {
...(vscDarkPlus as any)['pre[class*="language-"]'],
color: theme.colors.textMain,
background: theme.colors.bgActivity,
},
'code[class*="language-"]': {
...(vscDarkPlus as any)['code[class*="language-"]'],
color: theme.colors.textMain,
},
};
return React.createElement(SyntaxHighlighter, {
language,
style: vscDarkPlus,
style: themedStyle,
customStyle: {
margin: '0.5em 0',
padding: '1em',
Expand Down
2 changes: 2 additions & 0 deletions src/shared/theme-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export type ThemeId =
| 'monokai'
| 'github-light'
| 'solarized-light'
| 'solarized-dark'
| 'nord'
| 'tokyo-night'
| 'one-light'
Expand Down Expand Up @@ -92,6 +93,7 @@ export function isValidThemeId(id: string): id is ThemeId {
'monokai',
'github-light',
'solarized-light',
'solarized-dark',
'nord',
'tokyo-night',
'one-light',
Expand Down
20 changes: 20 additions & 0 deletions src/shared/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,26 @@ export const THEMES: Record<ThemeId, Theme> = {
error: '#fb4934',
},
},
'solarized-dark': {
id: 'solarized-dark',
name: 'Solarized Dark',
mode: 'dark',
colors: {
bgMain: '#002b36',
bgSidebar: '#073642',
bgActivity: '#0a4050',
border: '#2f4f56',
textMain: '#93a1a1',
textDim: '#657b83',
accent: '#268bd2',
accentDim: 'rgba(38, 139, 210, 0.2)',
accentText: '#5fddd5',
accentForeground: '#002b36',
success: '#859900',
warning: '#b58900',
error: '#dc322f',
},
},
// Light themes
'github-light': {
id: 'github-light',
Expand Down