Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion public/robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Allow: /api/share/*

# Disallow private/workspace areas
Disallow: /workspace/
Disallow: /dashboard/ # Legacy route, redirects to /workspace
Disallow: /auth/
Disallow: /api/
Disallow: /_next/
Expand Down
23 changes: 0 additions & 23 deletions src/app/dashboard/[slug]/page.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/home/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const ogImage = getFullImageUrl(seoConfig.defaultImage);
export const metadata: Metadata = {
title: pageTitle,
description: pageDescription,
keywords: ["home", "workspaces", "dashboard", "productivity tools"],
keywords: ["home", "workspaces", "productivity tools"],
authors: [{ name: seoConfig.author }],
robots: { index: true, follow: true },
alternates: { canonical: pageUrl },
Expand Down
2 changes: 1 addition & 1 deletion src/app/share-copy/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default function SharePage() {
if (session && !session.user.isAnonymous) {
const handleModalClose = (open: boolean) => {
if (!open) {
// Redirect to dashboard when modal is closed without importing
// Redirect to home when modal is closed without importing
router.push("/home");
}
};
Expand Down
4 changes: 2 additions & 2 deletions src/app/workspace/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { DashboardShell } from "../../dashboard/page";
import { WorkspaceShell } from "@/components/workspace/WorkspaceShell";

export default function WorkspacePage() {
return <DashboardShell />;
return <WorkspaceShell />;
}
2 changes: 1 addition & 1 deletion src/components/chat/ChatPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface ChatPanelProps {
/**
* Renders the chat panel chrome (header, message list, composer, dropzone).
* Assumes both `ChatProvider` and `ComposerProvider` already wrap this tree —
* `DashboardLayout` mounts them once at the layout level so workspace UI
* `WorkspaceLayout` mounts them once at the layout level so workspace UI
* outside the chat panel can also drive the composer.
*/
export function ChatPanel({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { WorkspaceCanvasDropzone } from "@/components/workspace-canvas/Workspace
import { PANEL_DEFAULTS } from "@/lib/layout-constants";
import React from "react";

interface DashboardLayoutProps {
interface WorkspaceLayoutProps {
// Workspace sidebar
currentWorkspaceId: string | null;
onWorkspaceSwitch: (slug: string) => void;
Expand All @@ -28,10 +28,10 @@ interface DashboardLayoutProps {
}

/**
* Main dashboard layout component.
* Main workspace layout component.
* Handles the overall structure including sidebars and layout animations.
*/
export function DashboardLayout({
export function WorkspaceLayout({
currentWorkspaceId,
onWorkspaceSwitch,
showCreateModal,
Expand All @@ -42,7 +42,7 @@ export function DashboardLayout({
setIsChatMaximized,
workspaceSection,
workspaceHeader,
}: DashboardLayoutProps) {
}: WorkspaceLayoutProps) {
// Render logic
// Ensure chat is only shown when a workspace is active
const effectiveChatExpanded = isChatExpanded && !!currentWorkspaceId;
Expand Down
2 changes: 1 addition & 1 deletion src/components/modals/PasswordProtectedPdfDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function emitPasswordProtectedPdf(fileNames: string[]) {
* Global dialog that warns users about password-protected PDFs
* and links them to iLovePDF to unlock.
*
* Mount this once near the app root (e.g. dashboard shell or DashboardLayout).
* Mount this once near the app root (e.g. WorkspaceShell or WorkspaceLayout).
*/
export function PasswordProtectedPdfDialog() {
const [open, setOpen] = useState(false);
Expand Down
2 changes: 1 addition & 1 deletion src/components/workspace-canvas/WorkspaceSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ export function WorkspaceSection({
onMouseDown={handleWorkspaceMouseDown}
>
<input ref={fileInputRef} {...fileInputProps} />
{/* WorkspaceHeader is now rendered in DashboardLayout above the sidebar */}
{/* WorkspaceHeader is now rendered in WorkspaceLayout above the sidebar */}

{/* Modal Manager - Renders over content */}
{openItemView}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use client";

import { useCallback, useEffect, useRef, useState } from "react";
import { useRouter } from "next/navigation";
import type { WorkspaceWithState } from "@/lib/workspace-state/types";
import { useKeyboardShortcuts } from "@/hooks/ui/use-keyboard-shortcuts";
import useMediaQuery from "@/hooks/ui/use-media-query";
Expand All @@ -17,7 +16,7 @@ import { useWorkspaceStore } from "@/lib/stores/workspace-store";
import { useSession } from "@/lib/auth-client";
import { WorkspaceSection } from "@/components/workspace-canvas/WorkspaceSection";
import { OpenWorkspaceItemView } from "@/components/workspace-canvas/OpenWorkspaceItemView";
import { DashboardLayout } from "@/components/layout/DashboardLayout";
import { WorkspaceLayout } from "@/components/layout/WorkspaceLayout";
import WorkspaceHeader from "@/components/workspace-canvas/WorkspaceHeader";
import { WorkspaceSearchDialog } from "@/components/workspace-canvas/WorkspaceSearchDialog";
import { useSidebar } from "@/components/ui/sidebar";
Expand Down Expand Up @@ -53,16 +52,16 @@ import {
getDocumentUploadSuccessMessage,
} from "@/lib/uploads/upload-feedback";

// Main dashboard content component
interface DashboardContentProps {
// Main workspace content component
interface WorkspaceContentProps {
currentWorkspace: WorkspaceWithState | null;
loadingCurrentWorkspace: boolean;
}

function DashboardContent({
function WorkspaceContent({
currentWorkspace,
loadingCurrentWorkspace,
}: DashboardContentProps) {
}: WorkspaceContentProps) {
const { data: session } = useSession();

const currentWorkspaceId = currentWorkspace?.id || null;
Expand Down Expand Up @@ -234,7 +233,7 @@ function DashboardContent({
itemIds: createdIds,
onOcrError: (error) => {
console.error(
"[DASHBOARD_PROCESSING] Failed to start processing:",
"[WORKSPACE_PROCESSING] Failed to start processing:",
error,
);
},
Expand All @@ -257,7 +256,7 @@ function DashboardContent({
open={showOnboardingDialog}
onOpenChange={setShowOnboardingDialog}
/> */}
<DashboardLayout
<WorkspaceLayout
currentWorkspaceId={currentWorkspaceId}
onWorkspaceSwitch={switchWorkspace}
showCreateModal={showCreateWorkspaceModal}
Expand Down Expand Up @@ -369,20 +368,18 @@ function DashboardContent({
);
}

// Main page component
// Main page component
// Main page component (wrapper)
export function DashboardPage() {
export function WorkspacePage() {
return (
<InviteGuard>
<DashboardView />
<WorkspaceView />
</InviteGuard>
);
}

// Inner component with all the dashboard hooks
// Inner component with all the workspace hooks
// Only rendered when InviteGuard allows (authenticated + invite processed)
function DashboardView() {
function WorkspaceView() {
// Get workspace context - currentWorkspace is loaded directly by slug (fast path)
const { currentWorkspace, loadingCurrentWorkspace, markWorkspaceOpened } =
useWorkspaceContext();
Expand Down Expand Up @@ -419,7 +416,7 @@ function DashboardView() {
return (
<ZeroProvider>
<RealtimeProvider workspaceId={currentWorkspaceId}>
<DashboardContent
<WorkspaceContent
currentWorkspace={currentWorkspace}
loadingCurrentWorkspace={loadingCurrentWorkspace}
/>
Expand All @@ -428,29 +425,19 @@ function DashboardView() {
);
}

export function DashboardShell() {
export function WorkspaceShell() {
return (
<>
<MobileWarning />
<AnonymousSessionHandler>
<WorkspaceProvider>
{/* <JoyrideProvider> */}
<SidebarCoordinator>
<DashboardPage />
<WorkspacePage />
</SidebarCoordinator>
{/* </JoyrideProvider> */}
</WorkspaceProvider>
</AnonymousSessionHandler>
</>
);
}

export default function Page() {
const router = useRouter();

useEffect(() => {
router.replace("/workspace");
}, [router]);

return null;
}
4 changes: 0 additions & 4 deletions src/contexts/WorkspaceContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ export function WorkspaceProvider({
if (pathname.startsWith("/workspace/") && pathname !== "/workspace") {
return pathname.replace("/workspace/", "");
}
// Backwards compatibility: also check /dashboard/
if (pathname.startsWith("/dashboard/") && pathname !== "/dashboard") {
return pathname.replace("/dashboard/", "");
}
return null;
}, [pathname]);

Expand Down
2 changes: 1 addition & 1 deletion src/lib/layout-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Layout Constants
*
* Centralized configuration for all layout-related magic numbers.
* These values control the responsive behavior of the dashboard layout.
* These values control the responsive behavior of the workspace layout.
*/

// ===== SIDEBAR WIDTHS =====
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stores/ui-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getDefaultChatModelId } from "@/lib/ai/models";

/**
* UI Store - Manages all UI state (chat, modals, search, layout, reply context)
* This replaces scattered useState hooks in dashboard
* This replaces scattered useState hooks in workspace
*/

/** Column / keyboard focus when two items are open (split). */
Expand Down
Loading