From b6c1dd21f0ecc01a53eada36400884041859f9a6 Mon Sep 17 00:00:00 2001 From: "Dennis (via Claude+Gemma)" Date: Sat, 23 May 2026 09:30:29 +0200 Subject: [PATCH] feat(meta-tags-and-title): Page-Titles + Meta-Description aktualisieren beim Route-Chan [tsc:fail] --- .phase30-state.json | 5 +++-- GENERATION_LOG.md | 18 ++++++++++++++++++ apps/web/src/lib/usePageTitle.tsx | 12 ++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 apps/web/src/lib/usePageTitle.tsx diff --git a/.phase30-state.json b/.phase30-state.json index 1510426..736d9db 100644 --- a/.phase30-state.json +++ b/.phase30-state.json @@ -1,10 +1,11 @@ { "completed_features": [], - "current_feature": "loading-everywhere", + "current_feature": "meta-tags-and-title", "started_at": "2026-05-23T09:23:38.401372", "attempted_features": [ "404-not-found-page", "api-error-pages", - "accessibility-final" + "accessibility-final", + "loading-everywhere" ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index fcb7ba7..eeeebe1 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -3457,3 +3457,21 @@ src/index.ts(27,25): error TS2769: No overload matches this call. Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. Type 'Promise' provides no match for the signature '(instance: FastifyInstance, +- `09:30:25` **INFO** Committed feature loading-everywhere +- `09:30:25` **INFO** Pushed: rc=0 + +## Phase-3 Feature: meta-tags-and-title (2026-05-23 09:30:25) + +- `09:30:25` **INFO** Description: Page-Titles + Meta-Description aktualisieren beim Route-Change +- `09:30:25` **INFO** Generating apps/web/src/lib/usePageTitle.tsx (usePageTitle(title: string) hook. useEffect: document.title = `${title…) +- `09:30:28` **INFO** wrote 295 chars in 2.4s (attempt 1) +- `09:30:28` **INFO** Running tsc --noEmit on api… +- `09:30:29` **WARN** tsc errors: +src/db/schema.ts(37,14): error TS7022: 'customers' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. +src/db/schema.ts(45,59): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +src/db/schema.ts(49,14): error TS7022: 'projects' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. +src/db/schema.ts(53,56): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +src/index.ts(27,25): error TS2769: No overload matches this call. + Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. + Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. + Type 'Promise' provides no match for the signature '(instance: FastifyInstance, diff --git a/apps/web/src/lib/usePageTitle.tsx b/apps/web/src/lib/usePageTitle.tsx new file mode 100644 index 0000000..0435ab1 --- /dev/null +++ b/apps/web/src/lib/usePageTitle.tsx @@ -0,0 +1,12 @@ +import { useEffect } from 'react'; + +export default function usePageTitle(title: string) { + useEffect(() => { + const originalTitle = document.title; + document.title = `${title} · EmberClone`; + + return () => { + document.title = originalTitle || 'EmberClone'; + }; + }, [title]); +} \ No newline at end of file