feat(notice-component): Notice (small inline notification, no dismiss) [tsc:fail]

This commit is contained in:
Dennis (via Claude+Gemma) 2026-05-23 10:58:39 +02:00
parent 8040524960
commit 6d256ef154
5 changed files with 166 additions and 1 deletions

View File

@ -5,6 +5,7 @@
"attempted_features": [
"receipt-component",
"order-summary-component",
"calendar-month-grid-component"
"calendar-month-grid-component",
"map-placeholder-component"
]
}

5
.phase48-state.json Normal file
View File

@ -0,0 +1,5 @@
{
"completed_features": [],
"current_feature": "notice-component",
"started_at": "2026-05-23T10:58:29.718105"
}

View File

@ -4818,3 +4818,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.
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>,
- `10:54:26` **INFO** Committed feature map-placeholder-component
- `10:54:27` **INFO** Pushed: rc=0
## Phase-47 Run beendet (2026-05-23 10:54:27)
- `10:54:27` **INFO** OK: 0, Attempted: 4, Total: 4
## 🚀 Phase-48 Codegen-Run gestartet (2026-05-23 10:58:29)
## Phase-3 Feature: notice-component (2026-05-23 10:58:29)
- `10:58:29` **INFO** Description: Notice (small inline notification, no dismiss)
- `10:58:29` **INFO** Generating apps/web/src/components/Notice.tsx (Notice-Component. Props: children, type?: 'info'|'success'|'warning'|'…)
- `10:58:38` **INFO** wrote 974 chars in 8.4s (attempt 1)
- `10:58:38` **INFO** Running tsc --noEmit on api…
- `10:58:39` **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,37 @@
import React from 'react';
import { Info, CheckCircle2, AlertTriangle, AlertCircle } from 'lucide-react';
interface NoticeProps {
children: React.ReactNode;
type?: 'info' | 'success' | 'warning' | 'error';
}
const typeConfig = {
info: {
icon: Info,
classes: 'bg-blue-50 text-blue-700 border-blue-200',
},
success: {
icon: CheckCircle2,
classes: 'bg-green-50 text-green-700 border-green-200',
},
warning: {
icon: AlertTriangle,
classes: 'bg-yellow-50 text-yellow-700 border-yellow-200',
},
error: {
icon: AlertCircle,
classes: 'bg-red-50 text-red-700 border-red-200',
},
};
export default function Notice({ children, type = 'info' }: NoticeProps) {
const { icon: Icon, classes } = typeConfig[type];
return (
<div className={`inline-flex items-center gap-2 px-3 py-1.5 rounded-md border text-sm font-medium ${classes}`}>
<Icon className="w-4 h-4 shrink-0" />
<span>{children}</span>
</div>
);
}

View File

@ -0,0 +1,97 @@
#!/usr/bin/env python3
"""Phase-48: standalone components — Notice, ListItem, Brand, EmptyInbox."""
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 / ".phase48-state.json"
FEATURES: list[Feature] = [
Feature(
name="notice-component",
description="Notice (small inline notification, no dismiss)",
files=[FileGen(
path="apps/web/src/components/Notice.tsx",
purpose=(
"Notice-Component. Props: children, type?: 'info'|'success'|'warning'|'error'. "
"Inline element. Klein, mit Icon (lucide) + text. Bg-color per type. "
"Tailwind. Export default."
),
)],
),
Feature(
name="list-item-component",
description="ListItem für custom Listen",
files=[FileGen(
path="apps/web/src/components/ListItem.tsx",
purpose=(
"ListItem-Component. Props: title, subtitle?, leading?: ReactNode, trailing?: ReactNode, onClick?. "
"Flex: leading | title+subtitle stacked | trailing. Hover: bg-zinc-50. Cursor pointer wenn onClick. "
"Tailwind. Export default."
),
)],
),
Feature(
name="brand-component",
description="Brand Header (logo + appname + tagline)",
files=[FileGen(
path="apps/web/src/components/Brand.tsx",
purpose=(
"Brand-Component. Props: variant?: 'horizontal'|'vertical' (default horizontal), showTagline?: boolean. "
"Verwendet inline-SVG Flammen-Icon (orange) + 'EmberClone' Text + optional 'Zeiterfassung neu gedacht' tagline. "
"Tailwind. Export default."
),
)],
),
Feature(
name="empty-inbox-component",
description="EmptyInbox Empty-State für Listen",
files=[FileGen(
path="apps/web/src/components/EmptyInbox.tsx",
purpose=(
"EmptyInbox-Component. Props: title? (default 'Alles erledigt'), description? (default 'Hier gibt es nichts zu sehen.'). "
"Zentriert: Inbox-Icon (lucide, grey large) + title + description. "
"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-48 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-48 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()))