diff --git a/.phase35-state.json b/.phase35-state.json index 911de8d..dab62a8 100644 --- a/.phase35-state.json +++ b/.phase35-state.json @@ -5,6 +5,7 @@ "attempted_features": [ "dropdown-menu-component", "checkbox-component", - "switch-toggle-component" + "switch-toggle-component", + "radio-group-component" ] } \ No newline at end of file diff --git a/.phase36-state.json b/.phase36-state.json new file mode 100644 index 0000000..ee4245d --- /dev/null +++ b/.phase36-state.json @@ -0,0 +1,5 @@ +{ + "completed_features": [], + "current_feature": "input-component", + "started_at": "2026-05-23T09:58:25.839766" +} \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index 5a7e747..58b914c 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -3870,3 +3870,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, +- `09:54:27` **INFO** Committed feature radio-group-component +- `09:54:27` **INFO** Pushed: rc=0 + +## Phase-35 Run beendet (2026-05-23 09:54:27) + +- `09:54:27` **INFO** OK: 0, Attempted: 4, Total: 4 + +## 🚀 Phase-36 Codegen-Run gestartet (2026-05-23 09:58:25) + + +## Phase-3 Feature: input-component (2026-05-23 09:58:25) + +- `09:58:25` **INFO** Description: Input mit Label + Error-State +- `09:58:25` **INFO** Generating apps/web/src/components/Input.tsx (Input-Component. Props: value, onChange, label?, error?, placeholder?,…) +- `09:58:42` **INFO** wrote 1862 chars in 16.7s (attempt 1) +- `09:58:42` **INFO** Running tsc --noEmit on api… +- `09:58:44` **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/Input.tsx b/apps/web/src/components/Input.tsx new file mode 100644 index 0000000..a5fe132 --- /dev/null +++ b/apps/web/src/components/Input.tsx @@ -0,0 +1,70 @@ +import React, { InputHTMLAttributes } from 'react'; + +interface InputProps extends InputHTMLAttributes { + label?: string; + error?: string; + leftIcon?: React.ReactNode; + rightIcon?: React.ReactNode; +} + +const Input: React.FC = ({ + label, + error, + placeholder, + type = 'text', + leftIcon, + rightIcon, + disabled, + className = '', + ...props +}) => { + return ( +
+ {label && ( + + )} + +
+ {leftIcon && ( +
+ {leftIcon} +
+ )} + + + + {rightIcon && ( +
+ {rightIcon} +
+ )} +
+ + {error && ( + + {error} + + )} +
+ ); +}; + +export default Input; \ No newline at end of file diff --git a/scripts/phase36_features.py b/scripts/phase36_features.py new file mode 100644 index 0000000..b19200b --- /dev/null +++ b/scripts/phase36_features.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +"""Phase-36: standalone form inputs — Input, Textarea, Select, SearchBox.""" + +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 / ".phase36-state.json" + +FEATURES: list[Feature] = [ + Feature( + name="input-component", + description="Input mit Label + Error-State", + files=[FileGen( + path="apps/web/src/components/Input.tsx", + purpose=( + "Input-Component. Props: value, onChange, label?, error?, placeholder?, type?, leftIcon?, rightIcon?, disabled?. " + "Wrapper-div mit Label oben, Input mit optional Icons left/right (absolute positioned + Input padding), " + "Error-Text rot drunter wenn error. focus:ring-2 ring-blue-500, border-red-500 wenn error. Tailwind. Export default." + ), + )], + ), + Feature( + name="textarea-component", + description="Textarea mit auto-resize + char-count", + files=[FileGen( + path="apps/web/src/components/Textarea.tsx", + purpose=( + "Textarea-Component. Props: value, onChange, label?, error?, placeholder?, rows? (default 4), maxLength?, autoResize?: boolean. " + "Wenn autoResize: useEffect setzt height = scrollHeight. Wenn maxLength: zeigt char-count rechts unten ({value.length}/{maxLength}). " + "Tailwind. Export default." + ), + )], + ), + Feature( + name="select-component", + description="Select mit custom-styling", + files=[FileGen( + path="apps/web/src/components/Select.tsx", + purpose=( + "Select-Component. Props: value, onChange, options (array {value, label, disabled?}), label?, placeholder?, error?, disabled?. " + "Native