feat(footer-component): Footer mit Copyright + Links [tsc:fail]

This commit is contained in:
Dennis (via Claude+Gemma) 2026-05-23 10:43:41 +02:00
parent 288e4d76b4
commit 1679fdfb51
5 changed files with 172 additions and 1 deletions

View File

@ -5,6 +5,7 @@
"attempted_features": [ "attempted_features": [
"drawer-component", "drawer-component",
"back-to-top-component", "back-to-top-component",
"scroll-area-component" "scroll-area-component",
"menu-bar-component"
] ]
} }

5
.phase45-state.json Normal file
View File

@ -0,0 +1,5 @@
{
"completed_features": [],
"current_feature": "footer-component",
"started_at": "2026-05-23T10:43:31.771649"
}

View File

@ -4581,3 +4581,28 @@ 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. 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<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>,
- `10:39:10` **INFO** Committed feature menu-bar-component
- `10:39:11` **INFO** Pushed: rc=0
## Phase-44 Run beendet (2026-05-23 10:39:11)
- `10:39:11` **INFO** OK: 0, Attempted: 4, Total: 4
## 🚀 Phase-45 Codegen-Run gestartet (2026-05-23 10:43:31)
## Phase-3 Feature: footer-component (2026-05-23 10:43:31)
- `10:43:31` **INFO** Description: Footer mit Copyright + Links
- `10:43:31` **INFO** Generating apps/web/src/components/Footer.tsx (Footer-Component. Props: links?: array {label, href}, copyright? (defa…)
- `10:43:39` **INFO** wrote 1065 chars in 8.1s (attempt 1)
- `10:43:39` **INFO** Running tsc --noEmit on api…
- `10:43:41` **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<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>,

View File

@ -0,0 +1,43 @@
import React from 'react';
import { Link } from '@tanstack/react-router';
interface FooterLink {
label: string;
href: string;
}
interface FooterProps {
links?: FooterLink[];
copyright?: string;
}
const Footer = ({
links = [],
copyright = 'EmberClone 2026'
}: FooterProps) => {
return (
<footer className="border-t border-zinc-200 dark:border-zinc-800 py-6 px-4 mt-auto">
<div className="max-w-7xl mx-auto flex flex-col md:flex-row justify-between items-center gap-4">
<div className="text-sm text-zinc-500">
{copyright}
</div>
{links.length > 0 && (
<nav className="flex gap-6">
{links.map((link) => (
<Link
key={link.href}
to={link.href}
className="text-sm text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors"
>
{link.label}
</Link>
))}
</nav>
)}
</div>
</footer>
);
};
export default Footer;

View File

@ -0,0 +1,97 @@
#!/usr/bin/env python3
"""Phase-45: standalone components — Footer, Hint, Loader, NavLink."""
from __future__ import annotations
import asyncio, datetime, json, sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent))
from phase2_features import Feature, FileGen, ROOT, log, log_section
from phase3_features import run_feature_v2
PHASE_STATE = ROOT / ".phase45-state.json"
FEATURES: list[Feature] = [
Feature(
name="footer-component",
description="Footer mit Copyright + Links",
files=[FileGen(
path="apps/web/src/components/Footer.tsx",
purpose=(
"Footer-Component. Props: links?: array {label, href}, copyright? (default 'EmberClone 2026'). "
"Flex: Copyright links, Links rechts. Border-top + padding. text-sm text-zinc-500. "
"Tailwind. Export default."
),
)],
),
Feature(
name="hint-component",
description="Hint mit Info-Icon",
files=[FileGen(
path="apps/web/src/components/Hint.tsx",
purpose=(
"Hint-Component. Props: children, variant?: 'tip'|'warning'|'note'. "
"Kleine inline box mit Info-Icon (lucide Info/Lightbulb/AlertCircle per variant) + text. "
"bg-blue-50/yellow-50/zinc-50. Tailwind. Export default."
),
)],
),
Feature(
name="loader-component",
description="Loader fullscreen-overlay",
files=[FileGen(
path="apps/web/src/components/Loader.tsx",
purpose=(
"Loader-Component. Props: message? (default 'Wird geladen...'), fullscreen?: boolean. "
"Wenn fullscreen: fixed inset-0 mit backdrop. Sonst: inline-zentriert. "
"Lucide Loader2 animate-spin + message text. Tailwind. Export default."
),
)],
),
Feature(
name="nav-link-component",
description="NavLink mit active-State (Tanstack-Router-kompatibel)",
files=[FileGen(
path="apps/web/src/components/NavLink.tsx",
purpose=(
"NavLink-Component. Props: to, label, icon?. "
"Verwendet @tanstack/react-router Link. activeProps: bg-zinc-100 + font-medium. "
"Hover: bg-zinc-50. Icon optional links. Tailwind. Export default."
),
)],
),
]
def load_state():
if PHASE_STATE.exists():
return json.loads(PHASE_STATE.read_text())
return {"completed_features": [], "current_feature": None, "started_at": datetime.datetime.now().isoformat()}
def save_state(state):
PHASE_STATE.write_text(json.dumps(state, indent=2))
async def main():
log_section("🚀 Phase-45 Codegen-Run gestartet")
state = load_state()
for feature in FEATURES:
if feature.name in state.get("completed_features", []):
continue
state["current_feature"] = feature.name; save_state(state)
try:
success = await run_feature_v2(feature)
state.setdefault("completed_features" if success else "attempted_features", []).append(feature.name)
save_state(state)
except Exception as e:
log(f"{feature.name} crashed: {e}", level="ERROR")
state.setdefault("attempted_features", []).append(feature.name); save_state(state)
log_section("Phase-45 Run beendet")
log(f"OK: {len(state.get('completed_features', []))}, Attempted: {len(state.get('attempted_features', []))}, Total: {len(FEATURES)}")
return 0
if __name__ == "__main__":
sys.exit(asyncio.run(main()))