+ {/* Consolidated Project Header - compact single row */}
+
-
-
-
+
+
+
-
-
-
{project.name}
-
- {project.status}
-
-
- {project.description && (
-
{project.description}
- )}
-
+
+
{project.name}
+
+ {project.status}
+
-
-
diff --git a/src/app/(dashboard)/projects/[id]/project-view.tsx b/src/app/(dashboard)/projects/[id]/project-view.tsx
new file mode 100644
index 0000000..0415a79
--- /dev/null
+++ b/src/app/(dashboard)/projects/[id]/project-view.tsx
@@ -0,0 +1,110 @@
+'use client'
+
+import { useState } from 'react'
+import { ProjectChat } from '@/components/chat/project-chat'
+import { DesignThinkingDashboard } from '@/components/project/design-thinking-dashboard'
+import { PhaseIndicatorCompact } from '@/components/project/phase-indicator-compact'
+import { useProject } from '@/hooks/use-project'
+import { MessageSquare, Compass, PanelRightOpen, PanelRightClose } from 'lucide-react'
+import { Button } from '@/components/ui/button'
+import { cn } from '@/lib/utils'
+import type { Database } from '@/types/database'
+import type { DesignPhase } from '@/types/design-thinking'
+
+type DBProject = Database['public']['Tables']['projects']['Row']
+type Message = Database['public']['Tables']['messages']['Row']
+
+interface ProjectViewProps {
+ projectId: string
+ project: DBProject
+ initialMessages: Message[]
+}
+
+export function ProjectView({ projectId, initialMessages }: ProjectViewProps) {
+ const [showPhases, setShowPhases] = useState(false)
+ const { project: projectData, phaseStatuses, loading } = useProject(projectId)
+
+ const handlePhaseClick = () => {
+ setShowPhases(true)
+ }
+
+ // Default to 'empathize' if project not loaded yet
+ const currentPhase = projectData?.current_phase || 'empathize'
+
+ return (
+
+ {/* Main Chat Area */}
+
+ {/* Inline toolbar with phase indicator */}
+
+
+
+
+
+ Chat
+
+
+ {!loading && (
+
+ )}
+
+
setShowPhases(!showPhases)}
+ >
+ {showPhases ? (
+ <>
+
+ Hide Phases
+ >
+ ) : (
+ <>
+
+ Show Phases
+ >
+ )}
+
+
+
+
+ {/* Chat Content */}
+
+
+
+ {/* Phases Sidebar - slides in from right */}
+
+
+
+
+
+
Design Phases
+
+
setShowPhases(false)}
+ >
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/components/project/phase-indicator-compact.tsx b/src/components/project/phase-indicator-compact.tsx
new file mode 100644
index 0000000..e443b58
--- /dev/null
+++ b/src/components/project/phase-indicator-compact.tsx
@@ -0,0 +1,78 @@
+'use client'
+
+import { cn } from '@/lib/utils'
+import { DESIGN_PHASES, designPhases, type DesignPhase, type PhaseStatus } from '@/types/design-thinking'
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from '@/components/ui/tooltip'
+
+interface PhaseIndicatorCompactProps {
+ currentPhase: DesignPhase
+ phaseStatuses?: Record
+ onPhaseClick?: (phase: DesignPhase) => void
+ className?: string
+}
+
+export function PhaseIndicatorCompact({
+ currentPhase,
+ phaseStatuses,
+ onPhaseClick,
+ className
+}: PhaseIndicatorCompactProps) {
+ const currentIndex = DESIGN_PHASES.indexOf(currentPhase)
+ const currentPhaseData = designPhases.find(p => p.id === currentPhase)
+
+ return (
+
+
+ {/* Mini progress dots */}
+
+ {DESIGN_PHASES.map((phase, index) => {
+ const status = phaseStatuses?.[phase]
+ const isCurrent = index === currentIndex
+ const isCompleted = status === 'completed' || index < currentIndex
+
+ return (
+
+
+ onPhaseClick?.(phase)}
+ className={cn(
+ 'w-2 h-2 rounded-full transition-all',
+ isCurrent && 'w-3 h-3 bg-brand animate-pulse',
+ isCompleted && !isCurrent && 'bg-emerald-500',
+ !isCompleted && !isCurrent && 'bg-muted-foreground/30'
+ )}
+ />
+
+
+ {designPhases.find(p => p.id === phase)?.label}
+
+
+ )
+ })}
+
+
+ {/* Current phase badge */}
+
+
+ onPhaseClick?.(currentPhase)}
+ className="flex items-center gap-1.5 px-2 py-1 rounded-md bg-brand/10 text-brand text-sm font-medium hover:bg-brand/20 transition-colors"
+ >
+ {currentPhaseData?.icon}
+ {currentPhaseData?.label}
+
+
+
+ {currentPhaseData?.label}
+ {currentPhaseData?.shortDescription}
+
+
+
+
+ )
+}