feat(KB-618): add multi-project support to dashboard

- Add project API methods and types (fetchProjects, registerProject, fetchProjectHealth, etc.)
- Add ProjectCard component with health metrics, status badges, and pause/resume actions
- Add server-side project management routes for multi-project orchestration
- Add ActivityFeed component with grouped entries and project badges
- Add SetupWizard component with 5-step project creation flow
- Fix TypeScript errors in server routes for listProjects and getGlobalConcurrencyState
This commit is contained in:
gsxdsm
2026-03-31 23:19:03 -07:00
parent fa9b277c32
commit 4b39bf1f4c
52 changed files with 498 additions and 1643 deletions

View File

@@ -27,9 +27,6 @@ vi.mock("node:fs", () => ({
existsSync: vi.fn().mockReturnValue(true),
readdirSync: vi.fn().mockReturnValue([]),
}));
vi.mock("node:fs/promises", () => ({
readFile: vi.fn().mockResolvedValue("# Task prompt content"),
}));
import { TaskExecutor } from "./executor.js";
import { TriageProcessor } from "./triage.js";
@@ -76,7 +73,6 @@ function createMockStore(overrides: Record<string, any> = {}) {
parseStepsFromPrompt: vi.fn().mockResolvedValue([]),
parseFileScopeFromPrompt: vi.fn().mockResolvedValue([]),
getSettings: vi.fn().mockResolvedValue({ ...DEFAULT_SETTINGS }),
getRootDir: vi.fn().mockReturnValue("/tmp/root"),
updateStep: vi.fn().mockImplementation(async (id: string, step: number, status: StepStatus) => {
return makeTaskDetail(id, "in-progress");
}),
@@ -281,7 +277,7 @@ describe("In-review merge handling after restart", () => {
store.getTask.mockResolvedValue(makeTaskDetail("FN-050", "in-progress"));
await expect(aiMergeTask(store, "/tmp/root", "FN-050")).rejects.toThrow(
"Cannot merge FN-050: task is in 'in-progress', must be in 'in-review'",
"Cannot merge KB-050: task is in 'in-progress', must be in 'in-review'",
);
// No git commands should have been executed
@@ -355,7 +351,7 @@ describe("In-review merge handling after restart", () => {
} as any);
await expect(aiMergeTask(store, "/tmp/root", "FN-055")).rejects.toThrow(
"AI merge failed for FN-055: all 3 attempts exhausted",
"AI merge failed for KB-055: all 3 attempts exhausted",
);
// Should have attempted git reset --merge cleanup