feat(page-header-component): PageHeader mit Title + Actions [tsc:fail]
This commit is contained in:
parent
5dcdd36373
commit
a984b9b409
@ -5,6 +5,7 @@
|
|||||||
"attempted_features": [
|
"attempted_features": [
|
||||||
"sidebar-component",
|
"sidebar-component",
|
||||||
"logo-component",
|
"logo-component",
|
||||||
"form-group-component"
|
"form-group-component",
|
||||||
|
"banner-component"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
5
.phase41-state.json
Normal file
5
.phase41-state.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"completed_features": [],
|
||||||
|
"current_feature": "page-header-component",
|
||||||
|
"started_at": "2026-05-23T10:23:26.274445"
|
||||||
|
}
|
||||||
@ -4265,3 +4265,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:19:40` **INFO** Committed feature banner-component
|
||||||
|
- `10:19:41` **INFO** Pushed: rc=0
|
||||||
|
|
||||||
|
## Phase-40 Run beendet (2026-05-23 10:19:41)
|
||||||
|
|
||||||
|
- `10:19:41` **INFO** OK: 0, Attempted: 4, Total: 4
|
||||||
|
|
||||||
|
## 🚀 Phase-41 Codegen-Run gestartet (2026-05-23 10:23:26)
|
||||||
|
|
||||||
|
|
||||||
|
## Phase-3 Feature: page-header-component (2026-05-23 10:23:26)
|
||||||
|
|
||||||
|
- `10:23:26` **INFO** Description: PageHeader mit Title + Actions
|
||||||
|
- `10:23:26` **INFO** Generating apps/web/src/components/PageHeader.tsx (PageHeader-Component. Props: title (string), subtitle?, actions?: Reac…)
|
||||||
|
- `10:23:35` **INFO** wrote 1178 chars in 9.7s (attempt 1)
|
||||||
|
- `10:23:35` **INFO** Running tsc --noEmit on api…
|
||||||
|
- `10:23:37` **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>,
|
||||||
|
|||||||
41
apps/web/src/components/PageHeader.tsx
Normal file
41
apps/web/src/components/PageHeader.tsx
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import React, { ReactNode } from 'react';
|
||||||
|
|
||||||
|
interface PageHeaderProps {
|
||||||
|
title: string;
|
||||||
|
subtitle?: string;
|
||||||
|
actions?: ReactNode;
|
||||||
|
breadcrumb?: ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function PageHeader({ title, subtitle, actions, breadcrumb }: PageHeaderProps) {
|
||||||
|
return (
|
||||||
|
<div className="border-b border-slate-200 dark:border-slate-800 pb-6 mb-6">
|
||||||
|
<div className="flex flex-col gap-2">
|
||||||
|
{breadcrumb && (
|
||||||
|
<div className="text-sm text-slate-500 dark:text-slate-400">
|
||||||
|
{breadcrumb}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<div className="flex items-center justify-between gap-4">
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<h1 className="text-2xl font-semibold text-slate-900 dark:text-white tracking-tight">
|
||||||
|
{title}
|
||||||
|
</h1>
|
||||||
|
{subtitle && (
|
||||||
|
<p className="text-sm text-slate-500 dark:text-slate-400 mt-1">
|
||||||
|
{subtitle}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{actions && (
|
||||||
|
<div className="flex items-center gap-2 shrink-0">
|
||||||
|
{actions}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
97
scripts/phase41_features.py
Normal file
97
scripts/phase41_features.py
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Phase-41: standalone components — PageHeader, StatCard, ToolbarButton, Kbd."""
|
||||||
|
|
||||||
|
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 / ".phase41-state.json"
|
||||||
|
|
||||||
|
FEATURES: list[Feature] = [
|
||||||
|
Feature(
|
||||||
|
name="page-header-component",
|
||||||
|
description="PageHeader mit Title + Actions",
|
||||||
|
files=[FileGen(
|
||||||
|
path="apps/web/src/components/PageHeader.tsx",
|
||||||
|
purpose=(
|
||||||
|
"PageHeader-Component. Props: title (string), subtitle?, actions?: ReactNode, breadcrumb?: ReactNode. "
|
||||||
|
"Flex layout: links title + subtitle, rechts actions. Border-bottom + padding. "
|
||||||
|
"Tailwind. Export default."
|
||||||
|
),
|
||||||
|
)],
|
||||||
|
),
|
||||||
|
Feature(
|
||||||
|
name="stat-card-component",
|
||||||
|
description="StatCard für Dashboards",
|
||||||
|
files=[FileGen(
|
||||||
|
path="apps/web/src/components/StatCard.tsx",
|
||||||
|
purpose=(
|
||||||
|
"StatCard-Component. Props: label, value (string|number), icon?, change?: number (für trend %), unit?. "
|
||||||
|
"Card-Layout: Icon oben-links, label grau klein, value groß bold, optional trend mit grün/rot Pfeil. "
|
||||||
|
"Tailwind. Export default."
|
||||||
|
),
|
||||||
|
)],
|
||||||
|
),
|
||||||
|
Feature(
|
||||||
|
name="toolbar-button-component",
|
||||||
|
description="ToolbarButton mit Tooltip + Icon",
|
||||||
|
files=[FileGen(
|
||||||
|
path="apps/web/src/components/ToolbarButton.tsx",
|
||||||
|
purpose=(
|
||||||
|
"ToolbarButton-Component. Props: icon (ReactNode), label, onClick, active?, disabled?. "
|
||||||
|
"Quadratischer Button mit Icon. Tooltip via title attribute. "
|
||||||
|
"Active: bg-blue-100 ring-blue. Tailwind. Export default."
|
||||||
|
),
|
||||||
|
)],
|
||||||
|
),
|
||||||
|
Feature(
|
||||||
|
name="kbd-component",
|
||||||
|
description="Kbd für Keyboard-Shortcut-Display",
|
||||||
|
files=[FileGen(
|
||||||
|
path="apps/web/src/components/Kbd.tsx",
|
||||||
|
purpose=(
|
||||||
|
"Kbd-Component. Props: children (key text wie 'Ctrl' oder 'K'). "
|
||||||
|
"Kleiner styled <kbd> mit bg-zinc-100 dark:bg-zinc-700, border, rounded, px-1.5 py-0.5, mono, text-xs. "
|
||||||
|
"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-41 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-41 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()))
|
||||||
Loading…
Reference in New Issue
Block a user