From dcb62c5df68ee87a709038bf74ec6bf2204e22fa Mon Sep 17 00:00:00 2001
From: Urjit Chakraborty <135136842+urjitc@users.noreply.github.com>
Date: Sat, 17 Jan 2026 14:04:55 -0500
Subject: [PATCH 1/4] feat: add home route; redirect dashboard to home
---
src/app/dashboard/[slug]/page.tsx | 18 +++++++++++++++---
src/app/dashboard/page.tsx | 26 ++++++++++++++------------
src/app/home/page.tsx | 17 +++++++++++++++++
3 files changed, 46 insertions(+), 15 deletions(-)
create mode 100644 src/app/home/page.tsx
diff --git a/src/app/dashboard/[slug]/page.tsx b/src/app/dashboard/[slug]/page.tsx
index 9a10d1a6..90f95f36 100644
--- a/src/app/dashboard/[slug]/page.tsx
+++ b/src/app/dashboard/[slug]/page.tsx
@@ -1,10 +1,22 @@
/**
* Dynamic route for workspace slugs: /dashboard/[slug]
- * This imports and renders the same dashboard content as /dashboard
+ * Renders the dashboard shell for an active workspace.
*/
-import DashboardPage from "../page";
+import { SEO } from "@/components/seo/SEO";
+import { DashboardShell } from "../page";
export default function WorkspacePage() {
- return ;
+ return (
+ <>
+
+
+ >
+ );
}
diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx
index d74f8d64..6a1e80f3 100644
--- a/src/app/dashboard/page.tsx
+++ b/src/app/dashboard/page.tsx
@@ -4,7 +4,6 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { Loader2 } from "lucide-react";
import { useRouter } from "next/navigation";
import { usePostHog } from 'posthog-js/react';
-import { SEO } from "@/components/seo/SEO";
import type { AgentState } from "@/lib/workspace-state/types";
import { initialState } from "@/lib/workspace-state/state";
import { useScrollHeader } from "@/hooks/ui/use-scroll-header";
@@ -364,7 +363,7 @@ function DashboardContent({
// Main page component
// Main page component
-function DashboardPage() {
+export function DashboardPage() {
const router = useRouter();
// Get workspace context
const {
@@ -431,7 +430,7 @@ function DashboardPage() {
}
// Wrapper for sidebar provider
-function SidebarCoordinator({ children }: { children: React.ReactNode }) {
+export function SidebarCoordinator({ children }: { children: React.ReactNode }) {
return (
{children}
@@ -440,7 +439,7 @@ function SidebarCoordinator({ children }: { children: React.ReactNode }) {
}
// Component to handle anonymous users - redirect to guest-setup if no session
-function AnonymousSessionHandler({ children }: { children: React.ReactNode }) {
+export function AnonymousSessionHandler({ children }: { children: React.ReactNode }) {
const { data: session, isPending } = useSession();
const router = useRouter();
@@ -483,16 +482,9 @@ function AnonymousSessionHandler({ children }: { children: React.ReactNode }) {
return <>{children}>;
}
-export default function Page() {
+export function DashboardShell() {
return (
<>
-
@@ -506,3 +498,13 @@ export default function Page() {
>
);
}
+
+export default function Page() {
+ const router = useRouter();
+
+ useEffect(() => {
+ router.replace("/home");
+ }, [router]);
+
+ return null;
+}
diff --git a/src/app/home/page.tsx b/src/app/home/page.tsx
new file mode 100644
index 00000000..4d59a74f
--- /dev/null
+++ b/src/app/home/page.tsx
@@ -0,0 +1,17 @@
+import { SEO } from "@/components/seo/SEO";
+import { DashboardShell } from "../dashboard/page";
+
+export default function HomePage() {
+ return (
+ <>
+
+
+ >
+ );
+}
From 6af1c238d6a9e62a9004d2d44adaceace487e52e Mon Sep 17 00:00:00 2001
From: Urjit Chakraborty <135136842+urjitc@users.noreply.github.com>
Date: Sat, 17 Jan 2026 14:05:12 -0500
Subject: [PATCH 2/4] refactor: update navigation links to home; route share
exits to home
---
src/app/share/[id]/page.tsx | 2 +-
src/components/landing/Navbar.tsx | 4 ++--
src/components/workspace-canvas/WorkspaceSidebar.tsx | 2 +-
src/components/workspace/SharedWorkspaceModal.tsx | 2 +-
src/contexts/WorkspaceContext.tsx | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/app/share/[id]/page.tsx b/src/app/share/[id]/page.tsx
index ac143736..42d2e8dc 100644
--- a/src/app/share/[id]/page.tsx
+++ b/src/app/share/[id]/page.tsx
@@ -170,7 +170,7 @@ export default function SharePage() {
const handleModalClose = (open: boolean) => {
if (!open) {
// Redirect to dashboard when modal is closed without importing
- router.push("/dashboard");
+ router.push("/home");
}
};
diff --git a/src/components/landing/Navbar.tsx b/src/components/landing/Navbar.tsx
index bc0402dc..05c1624e 100644
--- a/src/components/landing/Navbar.tsx
+++ b/src/components/landing/Navbar.tsx
@@ -138,7 +138,7 @@ export function Navbar() {
variant="outline"
className="rounded-md font-medium transition-all hover:bg-foreground/5"
>
-
+
Dashboard
@@ -235,7 +235,7 @@ export function Navbar() {
posthog.capture('navbar-dashboard-clicked', { location: 'mobile' })}
className="cursor-pointer"
>
diff --git a/src/components/workspace-canvas/WorkspaceSidebar.tsx b/src/components/workspace-canvas/WorkspaceSidebar.tsx
index 32efe3e9..0cff9bd5 100644
--- a/src/components/workspace-canvas/WorkspaceSidebar.tsx
+++ b/src/components/workspace-canvas/WorkspaceSidebar.tsx
@@ -196,7 +196,7 @@ function WorkspaceSidebar({
ThinkEx
0) {
switchWorkspace(remainingWorkspaces[0].slug || remainingWorkspaces[0].id);
} else {
- router.push("/dashboard");
+ router.push("/home");
}
}
From a663210381bfb2e68717f4fc3b3ad88c3e3e4b74 Mon Sep 17 00:00:00 2001
From: Urjit Chakraborty <135136842+urjitc@users.noreply.github.com>
Date: Sat, 17 Jan 2026 14:05:22 -0500
Subject: [PATCH 3/4] refactor: align auth redirects with home; update
onboarding redirect filter
---
src/app/auth/[path]/page.tsx | 2 +-
src/app/guest-setup/page.tsx | 4 ++--
src/app/onboarding/page.tsx | 11 ++++++++---
src/proxy.ts | 10 +++++-----
4 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/src/app/auth/[path]/page.tsx b/src/app/auth/[path]/page.tsx
index bb2a89c4..04746e8e 100644
--- a/src/app/auth/[path]/page.tsx
+++ b/src/app/auth/[path]/page.tsx
@@ -18,7 +18,7 @@ export default async function AuthPage({
const { path } = await params;
const { redirect_url } = await searchParams;
- // Default to /dashboard if no redirect_url is provided
+ // Default to /onboarding if no redirect_url is provided
// Otherwise use the redirect_url from query params (e.g., from share links)
const redirectTo = redirect_url || "/onboarding";
diff --git a/src/app/guest-setup/page.tsx b/src/app/guest-setup/page.tsx
index 58f3b684..9403186d 100644
--- a/src/app/guest-setup/page.tsx
+++ b/src/app/guest-setup/page.tsx
@@ -29,7 +29,7 @@ export default function GuestSetupPage() {
try {
// Step 1: Check if already authenticated (not anonymous)
if (session && !session.user.isAnonymous) {
- router.replace("/dashboard");
+ router.replace("/home");
return;
}
@@ -55,7 +55,7 @@ export default function GuestSetupPage() {
if (data.slug) {
router.replace(`/dashboard/${data.slug}`);
} else {
- router.replace("/dashboard");
+ router.replace("/home");
}
} catch (error) {
console.error("Guest setup error:", error);
diff --git a/src/app/onboarding/page.tsx b/src/app/onboarding/page.tsx
index 9f60a18d..3c9bcce8 100644
--- a/src/app/onboarding/page.tsx
+++ b/src/app/onboarding/page.tsx
@@ -56,15 +56,20 @@ export default function OnboardingPage() {
// If there's a redirect_url that's NOT a dashboard route (e.g., share links),
// prioritize that over the onboarding redirect
- if (redirectUrl && !redirectUrl.startsWith("/dashboard") && !redirectUrl.startsWith("/onboarding")) {
+ if (
+ redirectUrl &&
+ !redirectUrl.startsWith("/dashboard") &&
+ !redirectUrl.startsWith("/onboarding") &&
+ !redirectUrl.startsWith("/home")
+ ) {
sessionStorage.removeItem("auth_redirect_url");
router.replace(redirectUrl);
} else if (data.redirectTo) {
// Use the onboarding redirect (demo workspace)
router.replace(data.redirectTo);
} else {
- // Existing user, go to dashboard
- router.replace("/dashboard");
+ // Existing user, go to home
+ router.replace("/home");
}
} catch (error) {
if ((error as Error).name !== "AbortError") {
diff --git a/src/proxy.ts b/src/proxy.ts
index 2e9f4f8e..dd5c8934 100644
--- a/src/proxy.ts
+++ b/src/proxy.ts
@@ -18,20 +18,20 @@ export async function proxy(request: NextRequest) {
const sessionCookie = getSessionCookie(request);
const { pathname } = request.nextUrl;
- // Redirect authenticated users from root to dashboard
+ // Redirect authenticated users from root to home
if (sessionCookie && pathname === "/") {
- return NextResponse.redirect(new URL("/dashboard", request.url));
+ return NextResponse.redirect(new URL("/home", request.url));
}
// Redirect authenticated users away from auth pages
if (sessionCookie && ["/sign-in", "/sign-up"].includes(pathname)) {
// Preserve redirect_url if present
- const redirectUrl = request.nextUrl.searchParams.get('redirect_url') || '/dashboard';
+ const redirectUrl = request.nextUrl.searchParams.get('redirect_url') || '/home';
return NextResponse.redirect(new URL(redirectUrl, request.url));
}
- // Allow anonymous users to access dashboard - they'll get an anonymous session created automatically
- // NOTE: Dashboard page component handles creating anonymous sessions for unauthenticated users
+ // Allow anonymous users to access home - they'll get an anonymous session created automatically
+ // NOTE: Home page component handles creating anonymous sessions for unauthenticated users
// Actual auth validation happens in API routes, not in middleware
return NextResponse.next();
From b3bc6029c6a203ba0b5b7f0b3407c2316be3de49 Mon Sep 17 00:00:00 2001
From: "cubic-dev-ai[bot]" <1082092+cubic-dev-ai[bot]@users.noreply.github.com>
Date: Sat, 17 Jan 2026 19:21:11 +0000
Subject: [PATCH 4/4] fix: use dynamic slug for SEO canonical URL on workspace
pages
---
src/app/dashboard/[slug]/page.tsx | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/app/dashboard/[slug]/page.tsx b/src/app/dashboard/[slug]/page.tsx
index 90f95f36..37edcb48 100644
--- a/src/app/dashboard/[slug]/page.tsx
+++ b/src/app/dashboard/[slug]/page.tsx
@@ -3,17 +3,26 @@
* Renders the dashboard shell for an active workspace.
*/
import { SEO } from "@/components/seo/SEO";
+import { seoConfig } from "@/lib/seo-config";
import { DashboardShell } from "../page";
-export default function WorkspacePage() {
+interface WorkspacePageProps {
+ params: Promise<{ slug: string }>;
+}
+
+export default async function WorkspacePage({ params }: WorkspacePageProps) {
+ const { slug } = await params;
+ const workspaceUrl = `${seoConfig.siteUrl}/dashboard/${slug}`;
+
return (
<>
>