mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-14 17:41:22 +08:00
Enhance UX and Coordinator Role Constraints in Skills Documentation
- Added detailed constraints for the Coordinator role in the team UX improvement skill, emphasizing orchestration responsibilities and workflow management. - Updated test cases in DashboardToolbar, useIssues, and useWebSocket to improve reliability and clarity. - Introduced new tests for configStore and ignore patterns in Codex Lens to ensure proper functionality and configuration handling. - Enhanced smart search functionality with improved embedding selection logic and added tests for various scenarios. - Updated installation and usage documentation to reflect changes in directory structure and role specifications.
This commit is contained in:
67
ccw/frontend/src/stores/configStore.test.ts
Normal file
67
ccw/frontend/src/stores/configStore.test.ts
Normal file
@@ -0,0 +1,67 @@
|
||||
// ========================================
|
||||
// Config Store Tests
|
||||
// ========================================
|
||||
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
const CONFIG_STORE_MODULE_PATH = './configStore';
|
||||
|
||||
describe('configStore backend sync', () => {
|
||||
beforeEach(() => {
|
||||
vi.resetModules();
|
||||
vi.clearAllMocks();
|
||||
localStorage.clear();
|
||||
window.history.replaceState({}, '', '/');
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
vi.unstubAllGlobals();
|
||||
});
|
||||
|
||||
it('does not fetch backend config during module import', async () => {
|
||||
const fetchMock = vi.fn();
|
||||
vi.stubGlobal('fetch', fetchMock);
|
||||
|
||||
await import(CONFIG_STORE_MODULE_PATH);
|
||||
|
||||
expect(fetchMock).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('syncs backend config explicitly with an absolute URL', async () => {
|
||||
const fetchMock = vi.fn().mockResolvedValue({
|
||||
json: vi.fn().mockResolvedValue({
|
||||
config: {
|
||||
tools: {
|
||||
codex: {
|
||||
enabled: true,
|
||||
primaryModel: 'gpt-5',
|
||||
secondaryModel: 'gpt-5-mini',
|
||||
tags: ['analysis', 'debug'],
|
||||
type: 'builtin',
|
||||
envFile: '.env.codex',
|
||||
settingsFile: 'codex.settings.json',
|
||||
availableModels: ['gpt-5', 'gpt-5-mini'],
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
});
|
||||
vi.stubGlobal('fetch', fetchMock);
|
||||
|
||||
const { syncConfigStoreFromBackend, useConfigStore } = await import(CONFIG_STORE_MODULE_PATH);
|
||||
|
||||
await syncConfigStoreFromBackend(true);
|
||||
|
||||
expect(fetchMock).toHaveBeenCalledWith(`${window.location.origin}/api/cli/config`);
|
||||
expect(useConfigStore.getState().cliTools.codex).toMatchObject({
|
||||
enabled: true,
|
||||
primaryModel: 'gpt-5',
|
||||
secondaryModel: 'gpt-5-mini',
|
||||
tags: ['analysis', 'debug'],
|
||||
type: 'builtin',
|
||||
envFile: '.env.codex',
|
||||
settingsFile: 'codex.settings.json',
|
||||
availableModels: ['gpt-5', 'gpt-5-mini'],
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user