From 6d256ef154ebf6f767d7aebea25e31eb51508b52 Mon Sep 17 00:00:00 2001 From: "Dennis (via Claude+Gemma)" Date: Sat, 23 May 2026 10:58:39 +0200 Subject: [PATCH] feat(notice-component): Notice (small inline notification, no dismiss) [tsc:fail] --- .phase47-state.json | 3 +- .phase48-state.json | 5 ++ GENERATION_LOG.md | 25 ++++++++ apps/web/src/components/Notice.tsx | 37 ++++++++++++ scripts/phase48_features.py | 97 ++++++++++++++++++++++++++++++ 5 files changed, 166 insertions(+), 1 deletion(-) create mode 100644 .phase48-state.json create mode 100644 apps/web/src/components/Notice.tsx create mode 100644 scripts/phase48_features.py diff --git a/.phase47-state.json b/.phase47-state.json index 2dc9ab3..c3ecaee 100644 --- a/.phase47-state.json +++ b/.phase47-state.json @@ -5,6 +5,7 @@ "attempted_features": [ "receipt-component", "order-summary-component", - "calendar-month-grid-component" + "calendar-month-grid-component", + "map-placeholder-component" ] } \ No newline at end of file diff --git a/.phase48-state.json b/.phase48-state.json new file mode 100644 index 0000000..2c3f48b --- /dev/null +++ b/.phase48-state.json @@ -0,0 +1,5 @@ +{ + "completed_features": [], + "current_feature": "notice-component", + "started_at": "2026-05-23T10:58:29.718105" +} \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index 1676259..759f38a 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -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' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. Type 'Promise' provides no match for the signature '(instance: FastifyInstance, +- `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' 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/components/Notice.tsx b/apps/web/src/components/Notice.tsx new file mode 100644 index 0000000..93cb3f8 --- /dev/null +++ b/apps/web/src/components/Notice.tsx @@ -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 ( +
+ + {children} +
+ ); +} \ No newline at end of file diff --git a/scripts/phase48_features.py b/scripts/phase48_features.py new file mode 100644 index 0000000..aba0381 --- /dev/null +++ b/scripts/phase48_features.py @@ -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()))