feat(FN-677): add first-run experience types

- Add DetectedProject, SetupState, ProjectSetupInput, SetupCompletionResult types
- Add MigrationOptions and MigrationResult types for project migration
- Add setupComplete flag to GlobalSettings
- Support first-run wizard UI and auto-detection of existing projects
This commit is contained in:
gsxdsm
2026-04-01 07:23:37 -07:00
parent a9ccd86ece
commit d781a4f2f8

View File

@@ -529,6 +529,8 @@ export interface GlobalSettings {
* and ntfyTopic, notifications include a Click URL that opens the dashboard
* directly to the task. Example: "http://localhost:3000" or "https://fusion.example.com" */
ntfyDashboardHost?: string;
/** Whether the first-run setup wizard has been completed. */
setupComplete?: boolean;
}
/**
@@ -878,6 +880,54 @@ export interface ArchivedTaskEntry {
modifiedFiles?: string[];
}
/** Detected project from filesystem scanning */
export interface DetectedProject {
path: string;
name: string;
hasDb: boolean;
}
/** State for the first-run setup wizard UI */
export interface SetupState {
isFirstRun: boolean;
hasDetectedProjects: boolean;
detectedProjects: DetectedProject[];
registeredProjects: RegisteredProject[];
recommendedAction: "auto-detect" | "create-new" | "manual-setup";
}
/** Input type for completing project setup */
export interface ProjectSetupInput {
path: string;
name: string;
isolationMode?: IsolationMode;
}
/** Result of setup completion */
export interface SetupCompletionResult {
success: boolean;
projects: RegisteredProject[];
errors?: Array<{ path: string; error: string }>;
nextSteps: string[];
}
/** Options for migration orchestration */
export interface MigrationOptions {
startPath?: string;
maxDepth?: number;
autoRegister?: boolean;
dryRun?: boolean;
onProgress?: (completed: number, total: number, phase: string) => void;
}
/** Result of migration run */
export interface MigrationResult {
projectsDetected: DetectedProject[];
projectsRegistered: RegisteredProject[];
projectsSkipped: Array<{ path: string; reason: string }>;
errors: Array<{ path: string; error: string }>;
}
/** Type of planning question presented to the user */
export type PlanningQuestionType = "text" | "single_select" | "multi_select" | "confirm";