fix(seo): give every authenticated client-page a real document title

Every authenticated /dashboard/* and /settings/* page was a 'use client'
component without an exported Metadata, so Next.js fell back to the root
layout's default title ("OrangeCat — Your AI economic agent") for 25
distinct routes. Effect: browser tabs, bookmarks, browser history search,
and link-preview crawlers all saw the same generic title regardless of
which page the user was on — bad SEO for the public-facing settings/
auth-edge pages, and terrible UX for users with multiple OrangeCat tabs
open (impossible to tell them apart).

The root layout already declares `title.template = '%s | OrangeCat'`,
so each missing route only needs a layout.tsx with one-line metadata.
Added 25 colocated layouts:

- /messages → "Messages"
- /dashboard → "Dashboard"
- /settings → "Settings"
- /dashboard/wallets|documents|wishlists|people|investments|assets|
  loans|projects|research|ai-assistants|causes|events|store|bookings|
  services|analytics|tasks → each gets its singular human name
- /dashboard/info/edit → "Edit Profile"
- /dashboard/cat/permissions → "Cat Permissions"
- /dashboard/documents/create | wishlists/create | investments/create
  → "New Document" / "New Wishlist" / "New Investment"

Verified live before: /messages title was "OrangeCat — Your AI economic
agent". Post-fix on dev build: "Messages | OrangeCat" via the template.
Each layout is the minimal stateless pass-through — children render
unchanged. Per-entity dynamic titles (e.g. /post/[id]) excluded from
this commit; they need generateMetadata with a DB lookup.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Georgy ButaevandClaude Opus 4.7 committed 2026-06-06 12:27:53 +02:00
1 parent 0e17ec5e88
commit b21be719b7
25 files changed
+231

No files matched your search

@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'AI Assistants',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Analytics',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Assets',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Bookings',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Cat Permissions',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Causes',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'New Document',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Documents',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Events',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Edit Profile',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'New Investment',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Investments',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Dashboard',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Loans',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'People',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Projects',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Research',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Services',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Store',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Tasks',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Wallets',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'New Wishlist',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Wishlists',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,15 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Messages',
description: 'Direct messages and conversations on OrangeCat.',
openGraph: {
title: 'Messages - OrangeCat',
description: 'Direct messages and conversations on OrangeCat.',
type: 'website',
},
};
export default function MessagesLayout({ children }: { children: React.ReactNode }) {
return children;
}
@@ -0,0 +1,9 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Settings',
};
export default function Layout({ children }: { children: React.ReactNode }) {
return children;
}