feat(FN-3106): add draft planning workflow with createAiSession plugin API

This merge delivers the full draft planning feature (FN-3106) — API routes for planning subtasks, the AiSessionStore backend for draft sessions, a draft planning API client, auto-creation of planning drafts from user input, and corresponding UI polish in PlanningModeModal with accessibility-focused

Fusion-Task-Id: FN-3106
This commit is contained in:
Fusion
2026-05-02 13:28:52 -07:00
committed by gsxdsm
parent 8cdc0ff449
commit bb79f56f8f
11 changed files with 135 additions and 62 deletions

View File

@@ -3,8 +3,8 @@ import { cpus } from "node:os";
import { resolve } from "node:path";
import { fileURLToPath } from "node:url";
// Cap fan-out to 6 to avoid saturating high-core machines under workspace concurrency.
const defaultMaxWorkers = Math.min(6, Math.max(1, cpus().length - 1));
// Cap fan-out to 4 to avoid saturating high-core machines under workspace concurrency.
const defaultMaxWorkers = Math.min(4, Math.max(1, cpus().length - 1));
const requestedMaxWorkers = Number.parseInt(process.env.VITEST_MAX_WORKERS ?? String(defaultMaxWorkers), 10);
const maxWorkers = Math.max(1, Number.isFinite(requestedMaxWorkers) ? requestedMaxWorkers : defaultMaxWorkers);
process.env.VITEST_MAX_WORKERS = String(maxWorkers);
@@ -21,6 +21,6 @@ export default defineConfig({
globalSetup: [resolve(__dirname, "../core/src/__test-utils__/vitest-teardown.ts")],
pool: "threads",
maxWorkers,
poolOptions: { threads: { minThreads: 1, maxThreads: maxWorkers }, forks: { minForks: 1, maxForks: maxWorkers } },
poolOptions: { threads: { minThreads: 1, maxThreads: maxWorkers } },
},
});