mirror of
https://github.com/davidkaya/aryx.git
synced 2026-07-24 21:48:36 +02:00
Add appearance theme support (dark/light/system) using CSS custom property overrides. In light mode the Tailwind zinc scale is inverted and semantic surface/border tokens are swapped, so all existing utility classes pick up the new palette automatically. - Add AppearanceTheme type and theme field to WorkspaceSettings - Add setTheme IPC channel wiring (contracts, preload, handler, service) - Add [data-theme='light'] CSS overrides for zinc scale, surface tokens, scrollbar, and markdown prose colours - Add Appearance section to SettingsPanel with radio-button theme picker - Apply data-theme attribute on document root via useEffect in App.tsx, with matchMedia listener for the system option Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import { describe, expect, test } from 'bun:test';
|
|
|
|
import { createWorkspaceSeed } from '@shared/domain/workspace';
|
|
|
|
describe('workspace seed', () => {
|
|
test('starts empty and seeds the built-in orchestration patterns with a shared timestamp', () => {
|
|
const workspace = createWorkspaceSeed();
|
|
|
|
expect(workspace.projects).toEqual([]);
|
|
expect(workspace.sessions).toEqual([]);
|
|
expect(workspace.settings).toEqual({
|
|
theme: 'dark',
|
|
tooling: {
|
|
mcpServers: [],
|
|
lspProfiles: [],
|
|
},
|
|
});
|
|
expect(workspace.selectedProjectId).toBeUndefined();
|
|
expect(workspace.selectedPatternId).toBeUndefined();
|
|
expect(workspace.selectedSessionId).toBeUndefined();
|
|
|
|
expect(workspace.patterns.map((pattern) => pattern.mode)).toEqual([
|
|
'single',
|
|
'sequential',
|
|
'concurrent',
|
|
'handoff',
|
|
'group-chat',
|
|
'magentic',
|
|
]);
|
|
|
|
for (const pattern of workspace.patterns) {
|
|
expect(pattern.createdAt).toBe(workspace.lastUpdatedAt);
|
|
expect(pattern.updatedAt).toBe(workspace.lastUpdatedAt);
|
|
}
|
|
|
|
const magentic = workspace.patterns.find((pattern) => pattern.mode === 'magentic');
|
|
|
|
expect(magentic?.availability).toBe('unavailable');
|
|
expect(magentic?.unavailabilityReason).toContain('unsupported');
|
|
});
|
|
});
|