From b1403587a2efdc72461991605e4f890cbccc651b Mon Sep 17 00:00:00 2001 From: "Dennis (via Claude+Gemma)" Date: Sat, 23 May 2026 10:33:41 +0200 Subject: [PATCH] feat(date-input-component): DateInput mit ISO-Format [tsc:fail] --- .phase42-state.json | 3 +- .phase43-state.json | 5 ++ GENERATION_LOG.md | 25 +++++++ apps/web/src/components/DateInput.tsx | 61 +++++++++++++++++ scripts/phase43_features.py | 97 +++++++++++++++++++++++++++ 5 files changed, 190 insertions(+), 1 deletion(-) create mode 100644 .phase43-state.json create mode 100644 apps/web/src/components/DateInput.tsx create mode 100644 scripts/phase43_features.py diff --git a/.phase42-state.json b/.phase42-state.json index 0502ec6..44fa192 100644 --- a/.phase42-state.json +++ b/.phase42-state.json @@ -5,6 +5,7 @@ "attempted_features": [ "button-group-component", "context-menu-component", - "popover-component" + "popover-component", + "tag-component" ] } \ No newline at end of file diff --git a/.phase43-state.json b/.phase43-state.json new file mode 100644 index 0000000..891bb07 --- /dev/null +++ b/.phase43-state.json @@ -0,0 +1,5 @@ +{ + "completed_features": [], + "current_feature": "date-input-component", + "started_at": "2026-05-23T10:33:26.504299" +} \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index f9e02ed..2e6a568 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -4423,3 +4423,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:29:44` **INFO** Committed feature tag-component +- `10:29:44` **INFO** Pushed: rc=0 + +## Phase-42 Run beendet (2026-05-23 10:29:44) + +- `10:29:44` **INFO** OK: 0, Attempted: 4, Total: 4 + +## 🚀 Phase-43 Codegen-Run gestartet (2026-05-23 10:33:26) + + +## Phase-3 Feature: date-input-component (2026-05-23 10:33:26) + +- `10:33:26` **INFO** Description: DateInput mit ISO-Format +- `10:33:26` **INFO** Generating apps/web/src/components/DateInput.tsx (DateInput-Component. Props: value (ISO-string), onChange(iso), label?,…) +- `10:33:39` **INFO** wrote 1598 chars in 12.8s (attempt 1) +- `10:33:39` **INFO** Running tsc --noEmit on api… +- `10:33: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' 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/DateInput.tsx b/apps/web/src/components/DateInput.tsx new file mode 100644 index 0000000..6cc52a0 --- /dev/null +++ b/apps/web/src/components/DateInput.tsx @@ -0,0 +1,61 @@ +import React from 'react'; +import { Calendar } from 'lucide-react'; + +interface DateInputProps { + value: string; + onChange: (value: string) => void; + label?: string; + min?: string; + max?: string; + error?: string; + name?: string; +} + +const DateInput: React.FC = ({ + value, + onChange, + label, + min, + max, + error, + name, +}) => { + return ( +
+ {label && ( + + )} +
+
+ +
+ onChange(e.target.value)} + className={` + w-full pl-10 pr-3 py-2 bg-white dark:bg-slate-900 + border rounded-md outline-none transition-all + text-sm text-slate-900 dark:text-slate-100 + ${error + ? 'border-red-500 focus:ring-1 focus:ring-red-500' + : 'border-slate-200 dark:border-slate-700 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500' + } + `} + /> +
+ {error && ( + + {error} + + )} +
+ ); +}; + +export default DateInput; \ No newline at end of file diff --git a/scripts/phase43_features.py b/scripts/phase43_features.py new file mode 100644 index 0000000..c2529fa --- /dev/null +++ b/scripts/phase43_features.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +"""Phase-43: standalone components — DateInput, TimeInput, NumberInput, ColorSwatch.""" + +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 / ".phase43-state.json" + +FEATURES: list[Feature] = [ + Feature( + name="date-input-component", + description="DateInput mit ISO-Format", + files=[FileGen( + path="apps/web/src/components/DateInput.tsx", + purpose=( + "DateInput-Component. Props: value (ISO-string), onChange(iso), label?, min?, max?, error?. " + "Native styled. Calendar-Icon links. " + "Tailwind. Export default." + ), + )], + ), + Feature( + name="time-input-component", + description="TimeInput für HH:MM", + files=[FileGen( + path="apps/web/src/components/TimeInput.tsx", + purpose=( + "TimeInput-Component. Props: value (string HH:MM), onChange, label?, step? (default 60). " + "Native styled. Clock-Icon links. " + "Tailwind. Export default." + ), + )], + ), + Feature( + name="number-input-component", + description="NumberInput mit Stepper-Buttons", + files=[FileGen( + path="apps/web/src/components/NumberInput.tsx", + purpose=( + "NumberInput-Component. Props: value (number), onChange(n), min?, max?, step? (default 1), unit?. " + "Input mit -/+ Buttons links/rechts. Clamp to min/max. " + "Optional unit-label (z.B. 'h', 'min') rechts. Tailwind. Export default." + ), + )], + ), + Feature( + name="color-swatch-component", + description="ColorSwatch (single color preview circle)", + files=[FileGen( + path="apps/web/src/components/ColorSwatch.tsx", + purpose=( + "ColorSwatch-Component. Props: color (hex), size?: 'sm'|'md'|'lg', selected?, onClick?. " + "Kreis mit backgroundColor=color. Border, hover scale, optional ring wenn selected. " + "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-43 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-43 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()))