-
Notifications
You must be signed in to change notification settings - Fork 11
Bugfix/issue 27/sidebar button padding small width #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
dcb62c5
6af1c23
a663210
5aac0f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 <DashboardPage />; | ||
| return ( | ||
| <> | ||
| <SEO | ||
| title="Dashboard" | ||
| description="Manage your workspaces, create new projects, and organize knowledge effortlessly in your ThinkEx dashboard." | ||
| keywords="dashboard, workspace management, AI workspace, productivity tools" | ||
| url="https://thinkex.app/dashboard" | ||
| canonical="https://thinkex.app/dashboard" | ||
| /> | ||
|
Comment on lines
+11
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SEO metadata has hardcoded URLs that don't reflect the dynamic slug. The 🐛 Suggested fix for dynamic SEOConsider making the page a server component with dynamic metadata, or pass the slug to generate the correct URL: export default function WorkspacePage({ params }: { params: Promise<{ slug: string }> }) {
+ const { slug } = await params;
return (
<>
<SEO
title="Dashboard"
description="Manage your workspaces..."
keywords="dashboard, workspace management..."
- url="https://thinkex.app/dashboard"
- canonical="https://thinkex.app/dashboard"
+ url={`https://thinkex.app/dashboard/${slug}`}
+ canonical={`https://thinkex.app/dashboard/${slug}`}
/>
<DashboardShell />
</>
);
}🤖 Prompt for AI Agents |
||
| <DashboardShell /> | ||
| </> | ||
| ); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 ( | ||
| <SidebarProvider defaultOpen={true}> | ||
| {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 ( | ||
| <> | ||
| <SEO | ||
| title="Dashboard" | ||
| description="Manage your workspaces, create new projects, and organize knowledge effortlessly in your ThinkEx dashboard." | ||
| keywords="dashboard, workspace management, AI workspace, productivity tools" | ||
| url="https://thinkex.app/dashboard" | ||
| canonical="https://thinkex.app/dashboard" | ||
| /> | ||
| <MobileWarning /> | ||
| <AnonymousSessionHandler> | ||
| <WorkspaceProvider> | ||
|
|
@@ -506,3 +498,13 @@ export default function Page() { | |
| </> | ||
| ); | ||
| } | ||
|
|
||
| export default function Page() { | ||
| const router = useRouter(); | ||
|
|
||
| useEffect(() => { | ||
| router.replace("/home"); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Client-side redirect means Prompt for AI agents |
||
| }, [router]); | ||
|
|
||
| return null; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import { SEO } from "@/components/seo/SEO"; | ||
| import { DashboardShell } from "../dashboard/page"; | ||
|
|
||
| export default function HomePage() { | ||
| return ( | ||
| <> | ||
| <SEO | ||
| title="Home" | ||
| description="Choose a workspace or create a new one to start organizing your knowledge in ThinkEx." | ||
| keywords="home, workspaces, dashboard, productivity tools" | ||
| url="https://thinkex.app/home" | ||
| canonical="https://thinkex.app/home" | ||
| /> | ||
| <DashboardShell /> | ||
| </> | ||
| ); | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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"); | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
Comment on lines
170
to
174
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update the inline comment to match the new redirect target. The comment still says “dashboard” but the code now routes to 📝 Suggested edit- // Redirect to dashboard when modal is closed without importing
+ // Redirect to home when modal is closed without importing📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The dynamic workspace page now emits a fixed canonical/URL for "/dashboard" instead of including the current slug. This makes every workspace page share the same canonical metadata, which is incorrect for per-workspace routes. Pass the slug from params and build the URL/canonical with it.
Prompt for AI agents