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:
catlog22
2026-03-08 23:43:44 +08:00
parent f3ae78f95e
commit 61ea9d47a6
110 changed files with 1516 additions and 218 deletions

View 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'],
});
});
});