refactor: simplify project nav to AI Chat (overview) + Design only
- AI Chat nav item now routes to /overview instead of /v_ai_chat - Removed Plan, Docs, Tech, Journey nav items - Deleted old v_ai_chat page - Cleaned up unused imports and route detection logic Made-with: Cursor
This commit is contained in:
@@ -2,26 +2,12 @@
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import {
|
||||
LayoutGrid,
|
||||
Inbox,
|
||||
Users,
|
||||
Receipt,
|
||||
Globe,
|
||||
FileText,
|
||||
MessageCircle,
|
||||
Settings,
|
||||
HelpCircle,
|
||||
User,
|
||||
DollarSign,
|
||||
Key,
|
||||
Palette,
|
||||
Target,
|
||||
Megaphone,
|
||||
ClipboardList,
|
||||
Code2,
|
||||
Sparkles,
|
||||
Cog,
|
||||
GitBranch,
|
||||
} from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Separator } from "@/components/ui/separator";
|
||||
@@ -31,11 +17,8 @@ import { toast } from "sonner";
|
||||
type NavSection = "home" | "ai-chat" | "docs" | "plan" | "design" | "tech" | "journey" | "settings";
|
||||
|
||||
const NAV_ITEMS = [
|
||||
{ id: "plan" as NavSection, icon: ClipboardList, label: "Plan", href: "/project/{projectId}/plan" },
|
||||
{ id: "docs" as NavSection, icon: FileText, label: "Docs", href: "/project/{projectId}/docs" },
|
||||
{ id: "home" as NavSection, icon: Sparkles, label: "AI Chat", href: "/project/{projectId}/overview" },
|
||||
{ id: "design" as NavSection, icon: Palette, label: "Design", href: "/project/{projectId}/design" },
|
||||
{ id: "tech" as NavSection, icon: Cog, label: "Tech", href: "/project/{projectId}/tech" },
|
||||
{ id: "journey" as NavSection, icon: GitBranch, label: "Journey", href: "/project/{projectId}/journey" },
|
||||
];
|
||||
|
||||
interface LeftRailProps {
|
||||
@@ -61,27 +44,6 @@ export function LeftRail({ activeSection, onSectionChange, projectName, projectI
|
||||
<div className="w-full flex flex-col items-center">
|
||||
{/* Main Navigation Items */}
|
||||
<div className="flex flex-col gap-2 w-full items-center">
|
||||
{/* AI Chat - Always visible */}
|
||||
{projectName && projectId && (
|
||||
<Link
|
||||
href={`/${workspace}/project/${projectId}/v_ai_chat`}
|
||||
className={cn(
|
||||
"flex flex-col items-center gap-1 w-full py-2 px-2 transition-all relative",
|
||||
activeSection === "ai-chat"
|
||||
? "text-primary bg-primary/5"
|
||||
: "text-muted-foreground hover:text-foreground hover:bg-accent"
|
||||
)}
|
||||
title="AI Chat"
|
||||
>
|
||||
<Sparkles className="h-5 w-5" />
|
||||
<span className="text-[10px] font-medium">AI Chat</span>
|
||||
{activeSection === "ai-chat" && (
|
||||
<div className="absolute left-0 top-1/2 -translate-y-1/2 h-10 w-1 bg-primary" />
|
||||
)}
|
||||
</Link>
|
||||
)}
|
||||
|
||||
{/* Other Nav Items */}
|
||||
{NAV_ITEMS.map((item) => {
|
||||
if (!projectId) return null;
|
||||
const fullHref = `/${workspace}${item.href.replace('{projectId}', projectId)}`;
|
||||
|
||||
Reference in New Issue
Block a user