- Add Project Overview page with responsive grid and health status cards - Add Project Selector dropdown in header for quick project switching - Add Setup Wizard for registering new projects with auto-detection - Implement project drill-down: click project to view its tasks - Add global activity feed with cross-project activity log - Add project health monitoring with real-time status polling - Add deep linking support for tasks via ?task= URL parameter - Add useTasks hook with project context filtering - Add ntfy notification deep link to open tasks in dashboard - Fix terminal error message formatting for agent failures - Unify comment style across codebase (// instead of /** */) - Add comprehensive tests for multi-project components
72 lines
1.9 KiB
TypeScript
72 lines
1.9 KiB
TypeScript
import { useCallback } from "react";
|
|
import { X } from "lucide-react";
|
|
import { SetupWizard } from "./SetupWizard";
|
|
import type { ProjectInfo, ProjectCreateInput } from "../api";
|
|
|
|
export interface SetupWizardModalProps {
|
|
isOpen: boolean;
|
|
onClose: () => void;
|
|
onComplete: (project: ProjectInfo) => void;
|
|
onRegisterProject: (input: ProjectCreateInput) => Promise<ProjectInfo>;
|
|
}
|
|
|
|
/**
|
|
* SetupWizardModal - Modal wrapper for the SetupWizard component
|
|
*
|
|
* Provides a modal overlay for the setup wizard, suitable for:
|
|
* - First-run experience when no projects exist
|
|
* - "Add Project" button from ProjectOverview
|
|
*/
|
|
export function SetupWizardModal({
|
|
isOpen,
|
|
onClose,
|
|
onComplete,
|
|
onRegisterProject,
|
|
}: SetupWizardModalProps) {
|
|
const handleProjectCreated = useCallback((project: ProjectInfo) => {
|
|
onComplete(project);
|
|
}, [onComplete]);
|
|
|
|
if (!isOpen) return null;
|
|
|
|
return (
|
|
<div
|
|
className="modal-overlay open"
|
|
onClick={(e) => {
|
|
// Close on overlay click, but not when clicking the modal itself
|
|
if (e.target === e.currentTarget) {
|
|
onClose();
|
|
}
|
|
}}
|
|
data-testid="setup-wizard-modal-overlay"
|
|
>
|
|
<div
|
|
className="modal modal-lg"
|
|
onClick={(e) => e.stopPropagation()}
|
|
data-testid="setup-wizard-modal"
|
|
>
|
|
<div className="modal-header">
|
|
<h3>Add New Project</h3>
|
|
<button
|
|
className="modal-close"
|
|
onClick={onClose}
|
|
aria-label="Close"
|
|
data-testid="setup-wizard-modal-close"
|
|
>
|
|
<X size={20} />
|
|
</button>
|
|
</div>
|
|
|
|
<div className="modal-content-no-padding">
|
|
<SetupWizard
|
|
isOpen={isOpen}
|
|
onClose={onClose}
|
|
onProjectCreated={handleProjectCreated}
|
|
onRegisterProject={onRegisterProject}
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|