fix(metadata): strip duplicate "— Cockpit" suffix from page titles

Root layout's title template ('%s — Cockpit') was double-suffixing pages
that already embedded "— Cockpit" in their own metadata: PublicProfilePage
("George — Cockpit — Cockpit"), its Not Found variant, and the whitepaper.

Fix at the page level — return just the base text and let the template
append the brand. Verified via curl:
- /u/cat → <title>George — Cockpit</title>
- /whitepaper → <title>Whitepaper — Cockpit</title>

Caught during the browser QA pass on /u/cat.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
g-butandClaude Opus 4.7 committed 2026-05-20 22:36:05 +02:00
1 parent 685b87ceb0
commit 28b0490a6f
2 files changed
+5 -3

No files matched your search

+3 -2
View File
@@ -23,9 +23,10 @@ export async function generateMetadata({
}): Promise<Metadata> {
const { username } = await params;
const user = await getUser(username);
if (!user) return { title: `Not Found — ${APP_NAME}` };
// Root layout's title template appends "— Cockpit" — don't double it here.
if (!user) return { title: "Not Found" };
return {
title: `${user.name ?? username} — ${APP_NAME}`,
title: user.name ?? username,
description: `${user.name ?? username}'s builder profile on ${APP_NAME}`,
};
}
+2 -1
View File
@@ -8,7 +8,8 @@ import { ROUTES } from "@/config/auth";
import { APP_NAME } from "@/config/brand";
export const metadata: Metadata = {
title: `Whitepaper — ${APP_NAME}`,
// Root layout's title template appends "— Cockpit" — don't double it here.
title: "Whitepaper",
description: "A technical architecture for sustained autonomous execution across many projects simultaneously.",
};