feat(pilot): unify AI troubleshooting surface at /pilot, redirect /assistant (Phase 1)
All checks were successful
Mirror to GitHub / mirror (push) Successful in 3s
All checks were successful
Mirror to GitHub / mirror (push) Successful in 3s
Collapses the pre-existing dual-surface setup (AssistantChatPage at /assistant, FlowPilotSessionPage at /pilot) into a single chat-primary surface per architectural claim #1 of FLOWPILOT-MIGRATION.md. Router changes (frontend/src/router.tsx): - /pilot and /pilot/:sessionId now render AssistantChatPage. - /assistant redirects permanently to /pilot via <Navigate replace>. - /assistant/:sessionId redirects to /pilot/:sessionId preserving the ID via an AssistantSessionRedirect helper that reads the param. - FlowPilotSessionPage is no longer imported or mounted. Per the beta-history-disposable decision, the file stays on disk for reference but is unreachable; delete once nothing else in the tree imports it. Dispatcher de-branching — previously these sites routed by session_type (chat -> /assistant, otherwise -> /pilot). All now unconditionally go to /pilot/:id since session_type is no longer used for frontend routing: - components/dashboard/ActiveFlowPilotSessions.tsx - components/dashboard/RecentFlowPilotSessions.tsx - components/flowpilot/AISessionListItem.tsx (keeps isChat for icon selection, but linkTo is unconditional) User-facing label + navigation updates: - components/layout/CommandPalette.tsx: "AI Assistant" palette entry becomes "FlowPilot" pointing to /pilot; the sparkles quick-action also routes to /pilot. - components/dashboard/StartSessionInput.tsx: both navigate() call sites now go to /pilot instead of /assistant. - lib/routePrefetch.ts: prefetch entry for AssistantChatPage keyed to /pilot (the real surface) rather than /assistant (now redirect-only). Preserved intentionally (not user-facing routes): - Backend /assistant/retention API path and the assistantChatApi module name — those are internal API and module identifiers, not SPA routes. - src/components/assistant/* and src/types/assistant-chat — TypeScript module paths, not routes. - Sidebar.tsx — no top-level AI entry existed to rename; /pilot is already in the History group's matchPaths. Whether FlowPilot deserves its own rail entry is a future UX decision, not Phase 1 scope. - FlowPilotAnalyticsPage at /analytics/flowpilot — analytics for the unified product, not guided-only, per the agreed Q16 interpretation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -48,7 +48,7 @@ export function ActiveFlowPilotSessions({ hideHeader = false }: { hideHeader?: b
|
||||
{sessions.map((session) => (
|
||||
<button
|
||||
key={session.id}
|
||||
onClick={() => navigate(session.session_type === 'chat' ? `/assistant/${session.id}` : `/pilot/${session.id}`)}
|
||||
onClick={() => navigate(`/pilot/${session.id}`)}
|
||||
className="card-interactive p-4 text-left"
|
||||
>
|
||||
<div className="flex items-start justify-between gap-2 mb-2">
|
||||
|
||||
@@ -52,7 +52,7 @@ export function RecentFlowPilotSessions({ hideHeader = false }: { hideHeader?: b
|
||||
return (
|
||||
<button
|
||||
key={session.id}
|
||||
onClick={() => navigate(session.session_type === 'chat' ? `/assistant/${session.id}` : `/pilot/${session.id}`)}
|
||||
onClick={() => navigate(`/pilot/${session.id}`)}
|
||||
className="flex w-full items-center gap-3 px-5 py-3 text-left hover:bg-[rgba(255,255,255,0.02)] transition-colors"
|
||||
style={{
|
||||
borderBottom: i < sessions.length - 1 ? '1px solid var(--color-border-default)' : undefined,
|
||||
|
||||
@@ -52,7 +52,7 @@ export function StartSessionInput() {
|
||||
if (completedUploadIds.length > 0) {
|
||||
state.uploadIds = completedUploadIds
|
||||
}
|
||||
navigate('/assistant', { state })
|
||||
navigate('/pilot', { state })
|
||||
}
|
||||
|
||||
const handleKeyDown = (e: React.KeyboardEvent) => {
|
||||
@@ -63,7 +63,7 @@ export function StartSessionInput() {
|
||||
}
|
||||
|
||||
const handleSuggestionClick = (suggestion: string) => {
|
||||
navigate('/assistant', { state: { prefill: suggestion } })
|
||||
navigate('/pilot', { state: { prefill: suggestion } })
|
||||
}
|
||||
|
||||
// ── File handling ──────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user