diff --git a/frontend/src/components/assistant/IncidentHeader.tsx b/frontend/src/components/assistant/IncidentHeader.tsx
index 023ffd55..0bf67a2c 100644
--- a/frontend/src/components/assistant/IncidentHeader.tsx
+++ b/frontend/src/components/assistant/IncidentHeader.tsx
@@ -12,6 +12,8 @@ interface IncidentHeaderProps {
onStatusUpdate?: () => void
onPause?: () => void
onClose?: () => void
+ /** Extra elements rendered in the action group (e.g. ViewToggle) */
+ extraActions?: React.ReactNode
}
interface EditPopoverProps {
@@ -168,6 +170,7 @@ export function IncidentHeader({
onStatusUpdate,
onPause,
onClose,
+ extraActions,
}: IncidentHeaderProps) {
return (
@@ -223,6 +226,7 @@ export function IncidentHeader({
)}
+ {extraActions}
)
diff --git a/frontend/src/components/assistant/ViewToggle.tsx b/frontend/src/components/assistant/ViewToggle.tsx
index f497891d..fc88bfb6 100644
--- a/frontend/src/components/assistant/ViewToggle.tsx
+++ b/frontend/src/components/assistant/ViewToggle.tsx
@@ -6,9 +6,9 @@ import { useUserPreferencesStore } from '@/store/userPreferencesStore'
type FlowPilotView = 'flowpilot' | 'cockpit'
-const VIEW_OPTIONS: { key: FlowPilotView; label: string; icon: typeof MessageSquare; subtitle: string }[] = [
- { key: 'flowpilot', label: 'FlowPilot', icon: MessageSquare, subtitle: 'Chat-first AI troubleshooting' },
- { key: 'cockpit', label: 'Cockpit', icon: LayoutDashboard, subtitle: 'Steps, evidence & triage board' },
+const VIEW_OPTIONS: { key: FlowPilotView; label: string; icon: typeof MessageSquare }[] = [
+ { key: 'flowpilot', label: 'FlowPilot', icon: MessageSquare },
+ { key: 'cockpit', label: 'Cockpit', icon: LayoutDashboard },
]
interface ViewToggleProps {
@@ -16,19 +16,15 @@ interface ViewToggleProps {
currentView: FlowPilotView
/** Session ID for navigation (session pages only). Omit for preference-only mode (dashboard). */
sessionId?: string
- /** Show the subtitle below the toggle. Default true for standalone, false for inline. */
- showSubtitle?: boolean
}
-export function ViewToggle({ currentView, sessionId, showSubtitle = true }: ViewToggleProps) {
+export function ViewToggle({ currentView, sessionId }: ViewToggleProps) {
const navigate = useNavigate()
const hasCockpit = useFeatureFlag('flowpilot_cockpit')
const setPreferredView = useUserPreferencesStore(s => s.setPreferredFlowPilotView)
if (!hasCockpit) return null
- const activeOption = VIEW_OPTIONS.find(o => o.key === currentView) ?? VIEW_OPTIONS[0]
-
const handleSwitch = (view: FlowPilotView) => {
if (view === currentView) return
setPreferredView(view)
@@ -41,29 +37,22 @@ export function ViewToggle({ currentView, sessionId, showSubtitle = true }: View
}
return (
-
-
- {VIEW_OPTIONS.map(({ key, label, icon: Icon }) => (
-
- ))}
-
- {showSubtitle && (
-
- {activeOption.subtitle}
-
- )}
+
+ {VIEW_OPTIONS.map(({ key, label, icon: Icon }) => (
+
+ ))}
)
}
diff --git a/frontend/src/pages/CockpitPage.tsx b/frontend/src/pages/CockpitPage.tsx
index 86c8fea4..0171359b 100644
--- a/frontend/src/pages/CockpitPage.tsx
+++ b/frontend/src/pages/CockpitPage.tsx
@@ -255,7 +255,7 @@ export default function CockpitPage() {
{session.activeChatId && (
-
+
)}