From 93e1ff569b0a3cbf1ab991da5b4c639457b30917 Mon Sep 17 00:00:00 2001 From: Urjit Chakraborty <135136842+urjitc@users.noreply.github.com> Date: Wed, 28 Jan 2026 18:15:39 -0500 Subject: [PATCH 1/5] feat: move ThinkEx logo from sidebar to workspace header - Remove ThinkEx logo and home icon from workspace sidebar - Add ThinkEx logo to workspace header (workspace routes only) - Logo scales on hover instead of background highlight - Hide sidebar header completely on workspace routes --- .../workspace-canvas/WorkspaceHeader.tsx | 23 ++++++++ .../workspace-canvas/WorkspaceSidebar.tsx | 59 ++++++++----------- 2 files changed, 49 insertions(+), 33 deletions(-) diff --git a/src/components/workspace-canvas/WorkspaceHeader.tsx b/src/components/workspace-canvas/WorkspaceHeader.tsx index 713af9c6..047dfc47 100644 --- a/src/components/workspace-canvas/WorkspaceHeader.tsx +++ b/src/components/workspace-canvas/WorkspaceHeader.tsx @@ -1,5 +1,8 @@ import type React from "react"; import { useState, useRef, useEffect, useCallback } from "react"; +import Image from "next/image"; +import Link from "next/link"; +import { usePathname } from "next/navigation"; import { Search, X, ChevronRight, ChevronDown, FolderOpen, ChevronLeft, Plus, Upload, FileText, Folder, Settings, Share2, Play, MoreHorizontal, Globe, Brain } from "lucide-react"; import { LuBook } from "react-icons/lu"; import { PiCardsThreeBold } from "react-icons/pi"; @@ -118,6 +121,8 @@ export default function WorkspaceHeader({ const [showYouTubeDialog, setShowYouTubeDialog] = useState(false); const renameInputRef = useRef(null); const searchInputRef = useRef(null); + const pathname = usePathname(); + const isWorkspaceRoute = pathname.startsWith("/workspace"); // Track drag hover state for breadcrumb elements const [hoveredBreadcrumbTarget, setHoveredBreadcrumbTarget] = useState(null); // 'root' or folderId @@ -346,6 +351,24 @@ export default function WorkspaceHeader({
{/* Left Side: Sidebar Toggle + Navigation Arrows + Breadcrumbs */}
+ {isWorkspaceRoute && ( + +
+ ThinkEx Logo +
+ + )} diff --git a/src/components/workspace-canvas/WorkspaceSidebar.tsx b/src/components/workspace-canvas/WorkspaceSidebar.tsx index a025f42e..02eed241 100644 --- a/src/components/workspace-canvas/WorkspaceSidebar.tsx +++ b/src/components/workspace-canvas/WorkspaceSidebar.tsx @@ -3,7 +3,7 @@ import Image from "next/image"; import Link from "next/link"; import { Button } from "@/components/ui/button"; -import { MoreVertical, LogOut, Layers, User, Mail, Play, Users, Globe, Plus, Upload, Tag, Home } from "lucide-react"; +import { MoreVertical, LogOut, Layers, User, Mail, Play, Users, Globe, Plus, Upload, Tag } from "lucide-react"; import { useState, useCallback, memo } from "react"; import { useSession, signOut } from "@/lib/auth-client"; import { useRouter, usePathname } from "next/navigation"; @@ -70,6 +70,7 @@ function WorkspaceSidebar({ const router = useRouter(); const pathname = usePathname(); const isHomeRoute = pathname === "/home"; + const isWorkspaceRoute = pathname.startsWith("/workspace"); // Get workspace context const { @@ -176,38 +177,30 @@ function WorkspaceSidebar({ return ( <> - -
- -
- ThinkEx Logo -
-

ThinkEx

- - - - Home - -
-
+ {!isWorkspaceRoute && ( + +
+ +
+ ThinkEx Logo +
+

ThinkEx

+ +
+
+ )} {/* Workspaces Section */} From 374f7035b3c9070e7334754a73c594a47c47e64e Mon Sep 17 00:00:00 2001 From: Urjit Chakraborty <135136842+urjitc@users.noreply.github.com> Date: Wed, 28 Jan 2026 18:15:43 -0500 Subject: [PATCH 2/5] feat: add embedded mode to Sidebar component - Add embedded prop to Sidebar for layout-embedded positioning - When embedded, sidebar uses absolute positioning within its container - Sidebar wrapper becomes relative when embedded for proper positioning - Enables sidebar to sit below headers in flex layouts --- src/components/ui/sidebar.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/components/ui/sidebar.tsx b/src/components/ui/sidebar.tsx index 23031e0e..58788204 100644 --- a/src/components/ui/sidebar.tsx +++ b/src/components/ui/sidebar.tsx @@ -149,6 +149,7 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", + embedded = false, className, children, ...props @@ -156,6 +157,12 @@ function Sidebar({ side?: "left" | "right" variant?: "sidebar" | "floating" | "inset" collapsible?: "offcanvas" | "icon" | "none" + /** + * When true, renders the sidebar container within normal layout flow + * (absolute inside its reserved "gap" column) instead of `fixed` to viewport. + * Useful when you want the sidebar to sit under a page header. + */ + embedded?: boolean }) { const { isMobile, state, openMobile, setOpenMobile, open, setOpen } = useSidebar() @@ -201,7 +208,10 @@ function Sidebar({ return (