From 8582d2423687d40b93d569fae1f6795dc937a393 Mon Sep 17 00:00:00 2001 From: Michael Chihlas Date: Thu, 23 Apr 2026 16:48:42 -0400 Subject: [PATCH] chore(pilot): remove deprecated SuggestedFix task-lane card Superseded by ProposalBanner (Phase 8). The import was already removed from AssistantChatPage in the previous commit; this deletes the orphaned file itself and strips the now-unused suggestedFixSlot prop from TaskLane's interface and both call sites. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../src/components/assistant/TaskLane.tsx | 8 +- .../pilot/sections/SuggestedFix.tsx | 97 ------------------- frontend/src/pages/AssistantChatPage.tsx | 2 - 3 files changed, 1 insertion(+), 106 deletions(-) delete mode 100644 frontend/src/components/pilot/sections/SuggestedFix.tsx diff --git a/frontend/src/components/assistant/TaskLane.tsx b/frontend/src/components/assistant/TaskLane.tsx index 97b7d404..29c92fc0 100644 --- a/frontend/src/components/assistant/TaskLane.tsx +++ b/frontend/src/components/assistant/TaskLane.tsx @@ -43,8 +43,6 @@ interface TaskLaneProps { // shape lets the parent own fact-fetching and state-version polling without // pulling that concern into TaskLane. whatWeKnowSlot?: React.ReactNode - // Phase 3: Suggested fix card, rendered below Diagnostic Checks. - suggestedFixSlot?: React.ReactNode // Phase 3: bottom-of-lane slot for the Resolve action bar + preview popover // (parent owns state). Renders inside the scrollable body so the popover // stays anchored as the lane scrolls. @@ -79,7 +77,7 @@ export function clearTaskState(sessionId: string) { // ── Component ── -export function TaskLane({ questions, actions, sessionId, onSubmit, onClose, loading, whatWeKnowSlot, suggestedFixSlot, bottomSlot, variant = 'side' }: TaskLaneProps) { +export function TaskLane({ questions, actions, sessionId, onSubmit, onClose, loading, whatWeKnowSlot, bottomSlot, variant = 'side' }: TaskLaneProps) { const isDrawer = variant === 'drawer' const [tasks, setTasks] = useState(() => { // Try to restore saved state for this session (preserves user's in-progress answers) @@ -535,15 +533,11 @@ export function TaskLane({ questions, actions, sessionId, onSubmit, onClose, loa )} - {/* ── Suggested fix (Phase 3) ── */} - {suggestedFixSlot} - {/* Quiet-state hint: lane is open (facts exist), but AI hasn't proposed a next step yet. Keeps the lane from feeling "finished" when the engineer still expects a question / fix to arrive. */} {questionTasks.length === 0 && actionTasks.length === 0 - && !suggestedFixSlot && !loading && (
No open questions — send a message or add a note; the AI will follow up. diff --git a/frontend/src/components/pilot/sections/SuggestedFix.tsx b/frontend/src/components/pilot/sections/SuggestedFix.tsx deleted file mode 100644 index 9926e90b..00000000 --- a/frontend/src/components/pilot/sections/SuggestedFix.tsx +++ /dev/null @@ -1,97 +0,0 @@ -/** - * SuggestedFix card — Phase 3 task-lane section. - * - * Renders the active AI-proposed resolution path for the session - * (per FLOWPILOT-MIGRATION.md Section 3.1, "Suggested fix"). Amber-accented - * to match the mockup; clicking opens the Script Generator flow in Phase 5. - * - * For Phase 3, the card is informational + a Dismiss action. The three-option - * dialog (one_off / draft_template / build_template) is wired in Phase 5 - * via a separate component. - */ -import { useState } from 'react' -import { Sparkles, X } from 'lucide-react' -import { cn } from '@/lib/utils' -import type { SessionSuggestedFix } from '@/api/sessionSuggestedFixes' - -interface SuggestedFixProps { - fix: SessionSuggestedFix - onDismiss: () => Promise | void - // Phase 5: clicking the card body opens the inline Script Generator panel - // (TemplateMatchPanel for template-matched fixes, NoTemplateDialog otherwise). - onActivate?: () => void - // Whether the script panel is currently open for THIS fix — controls the - // "Open" / "Close" affordance label on the card. - panelOpen?: boolean -} - -function confidenceBucket(pct: number): { label: string; tone: string } { - if (pct >= 80) return { label: 'high', tone: 'text-success' } - if (pct >= 50) return { label: 'medium', tone: 'text-warning' } - return { label: 'low', tone: 'text-muted-foreground' } -} - -export function SuggestedFix({ fix, onDismiss, onActivate, panelOpen }: SuggestedFixProps) { - const [busy, setBusy] = useState(false) - const conf = confidenceBucket(fix.confidence_pct) - - const handleDismiss = async (e: React.MouseEvent) => { - e.stopPropagation() // don't trigger the card-body activation - setBusy(true) - try { await onDismiss() } finally { setBusy(false) } - } - - return ( -
-
-
- - Suggested fix - · - {fix.confidence_pct}% confidence -
-
- -
-
- -
-
- {fix.title} -
-
- {fix.description} -
- {fix.script_template_id && ( -
- ✓ Matches an existing Script Library template — click to use -
- )} - {!fix.script_template_id && fix.ai_drafted_script && ( -
- Custom script drafted — click to review options -
- )} -
- -
-
-
- ) -} - -export default SuggestedFix diff --git a/frontend/src/pages/AssistantChatPage.tsx b/frontend/src/pages/AssistantChatPage.tsx index 27b3be39..20936fd1 100644 --- a/frontend/src/pages/AssistantChatPage.tsx +++ b/frontend/src/pages/AssistantChatPage.tsx @@ -1614,7 +1614,6 @@ export default function AssistantChatPage() { loading={loading} /> } - suggestedFixSlot={null} bottomSlot={ <> {scriptPanelOpen && activeFix && activeChatId && ( @@ -1694,7 +1693,6 @@ export default function AssistantChatPage() { loading={loading} /> } - suggestedFixSlot={null} bottomSlot={ <> {scriptPanelOpen && activeFix && activeChatId && (