diff --git a/components/layout/project-shell.tsx b/components/layout/project-shell.tsx index ee41c46..0a9d16f 100644 --- a/components/layout/project-shell.tsx +++ b/components/layout/project-shell.tsx @@ -1,12 +1,12 @@ "use client"; import { usePathname } from "next/navigation"; -import { ReactNode } from "react"; +import { ReactNode, useState } from "react"; import Link from "next/link"; import { signOut, useSession } from "next-auth/react"; import { CooChat } from "./coo-chat"; import { Toaster } from "sonner"; -import { Globe, Cloud, Palette, Code2, BarChart2, MoreHorizontal } from "lucide-react"; +import { MonitorPlay, ListChecks, Code2, Palette, Cloud } from "lucide-react"; interface ProjectShellProps { children: ReactNode; @@ -24,7 +24,6 @@ interface ProjectShellProps { creationMode?: "fresh" | "chat-import" | "code-import" | "migration"; } -// Width of the left chat panel — must match in both the header and the body const CHAT_W = 320; const SECTIONS = [ @@ -33,14 +32,12 @@ const SECTIONS = [ { id: "assist", label: "Assist", path: "assist" }, ] as const; -// Tool icons shown to the right of section pills const TOOLS = [ - { id: "preview", Icon: Globe, label: "Preview", title: "Open preview" }, - { id: "backend", Icon: Cloud, label: "Backend", title: "Backend / Infra" }, - { id: "design", Icon: Palette, label: "Design", title: "Design" }, - { id: "code", Icon: Code2, label: "Code", title: "Code" }, - { id: "analytics",Icon: BarChart2, label: "Analytics", title: "Analytics" }, - { id: "more", Icon: MoreHorizontal, label: "More", title: "More options" }, + { id: "preview", Icon: MonitorPlay, title: "Preview" }, + { id: "tasks", Icon: ListChecks, title: "Tasks" }, + { id: "code", Icon: Code2, title: "Code" }, + { id: "design", Icon: Palette, title: "Design" }, + { id: "backend", Icon: Cloud, title: "Backend" }, ]; export function ProjectShell({ @@ -51,6 +48,7 @@ export function ProjectShell({ }: ProjectShellProps) { const pathname = usePathname(); const { data: session } = useSession(); + const [activeTool, setActiveTool] = useState("preview"); const activeSection = pathname?.includes("/build") ? "build" : @@ -71,7 +69,7 @@ export function ProjectShell({ background: "#f6f4f0", }}> - {/* ── Top bar — split to align with panels below ── */} + {/* ── Top bar ── */}
- {/* Left section — aligns with chat panel */} + {/* Left — aligns with chat panel */}
-
+
VIBN
-
- {/* Right section — aligns with content panel */} + {/* Right — aligns with content panel */}
- {/* Section pills: Build | Market | Assist */} -
+ {/* Pills + tool icons — grouped together on the left of this section */} +
+ + {/* Section pills */} {SECTIONS.map(s => { const isActive = activeSection === s.id; return ( @@ -118,7 +117,7 @@ export function ProjectShell({ key={s.id} href={`/${workspace}/project/${projectId}/${s.path}`} style={{ - padding: "5px 13px", + padding: "5px 12px", borderRadius: 8, fontSize: "0.8rem", fontWeight: isActive ? 600 : 440, @@ -135,37 +134,49 @@ export function ProjectShell({ ); })} + + {/* Thin divider between pills and tool icons */} +
+ + {/* Tool icons */} + {TOOLS.map(({ id, Icon, title }) => { + const isActive = activeTool === id; + return ( + + ); + })}
- {/* Divider */} -
- - {/* Tool icons */} -
- {TOOLS.map(({ id, Icon, title }) => ( - - ))} -
+ {/* Spacer pushes avatar to the right */} +
{/* User avatar */}
-
- {/* Right: content — changes per section */} + {/* Right: content */}
{children}