feat(FN-1941): surface setup readiness warnings in task entry flows

- Add useSetupReadiness hook to evaluate setup state and expose actionable warning metadata
- Add reusable SetupWarningBanner component with compact and full warning presentation modes
- Render setup warnings in NewTaskModal and QuickEntryBox so task creation surfaces missing configuration early
- Add targeted tests for the hook and banner plus integration coverage updates for modal and quick-entry behavior
This commit is contained in:
Fusion
2026-04-17 04:46:28 -07:00
committed by gsxdsm
parent c36203d162
commit b2187610cb
9 changed files with 551 additions and 0 deletions

View File

@@ -4,6 +4,8 @@ import type { ToastType } from "../hooks/useToast";
import { uploadAttachment, fetchAgents } from "../api";
import type { Agent } from "../api";
import { Bot } from "lucide-react";
import { useSetupReadiness } from "../hooks/useSetupReadiness";
import { SetupWarningBanner } from "./SetupWarningBanner";
import { TaskForm, type PendingImage } from "./TaskForm";
interface NewTaskModalProps {
@@ -38,6 +40,7 @@ export function NewTaskModal({ isOpen, onClose, projectId, tasks, onCreateTask,
const [showAgentPicker, setShowAgentPicker] = useState(false);
const [agentsLoading, setAgentsLoading] = useState(false);
const agentPickerRef = useRef<HTMLDivElement>(null);
const { hasAiProvider, hasGithub, loading: setupReadinessLoading } = useSetupReadiness(projectId);
// Handler for workflow step changes that detects explicit user interaction
const handleWorkflowStepsChange = useCallback((steps: string[]) => {
@@ -221,6 +224,13 @@ export function NewTaskModal({ isOpen, onClose, projectId, tasks, onCreateTask,
</div>
<div className="modal-body">
{!setupReadinessLoading && (
<SetupWarningBanner
hasAiProvider={hasAiProvider}
hasGithub={hasGithub}
/>
)}
<TaskForm
mode="create"
description={description}