refactor(FN-1563): decouple CLI commands from UI dependencies
- Extract task lifecycle helpers (checkForExistingSession, resolveProjectPath) to shared modules - Extract port selection logic to dedicated port-prompt module - Remove direct imports from @fusion/dashboard in serve.ts - Add architectural boundary comments for future maintainability - Update tests to reflect new module structure - Add memory note documenting the architectural decision
This commit is contained in:
@@ -377,8 +377,11 @@ vi.mock("@mariozechner/pi-coding-agent", () => ({
|
||||
createExtensionRuntime: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock("../dashboard.js", () => ({
|
||||
vi.mock("../port-prompt.js", () => ({
|
||||
promptForPort: vi.fn(async (port: number) => port),
|
||||
}));
|
||||
|
||||
vi.mock("../task-lifecycle.js", () => ({
|
||||
getMergeStrategy: vi.fn((settings: { mergeStrategy?: "direct" | "pull-request" }) => settings.mergeStrategy ?? "direct"),
|
||||
processPullRequestMergeTask: vi.fn().mockResolvedValue("waiting"),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user