diff --git a/.phase31-state.json b/.phase31-state.json index dae4c51..6c9bfe0 100644 --- a/.phase31-state.json +++ b/.phase31-state.json @@ -5,6 +5,7 @@ "attempted_features": [ "toast-undo-pattern", "empty-state-illustrations", - "button-loading-states" + "button-loading-states", + "copy-to-clipboard-component" ] } \ No newline at end of file diff --git a/.phase32-state.json b/.phase32-state.json new file mode 100644 index 0000000..7e1bfb2 --- /dev/null +++ b/.phase32-state.json @@ -0,0 +1,5 @@ +{ + "completed_features": [], + "current_feature": "tooltip-component", + "started_at": "2026-05-23T09:38:26.946771" +} \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index bcd8e38..b8a25a7 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -3554,3 +3554,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:34:15` **INFO** Committed feature copy-to-clipboard-component +- `09:34:16` **INFO** Pushed: rc=0 + +## Phase-31 Run beendet (2026-05-23 09:34:16) + +- `09:34:16` **INFO** OK: 0, Attempted: 4, Total: 4 + +## 🚀 Phase-32 Codegen-Run gestartet — standalone components (2026-05-23 09:38:26) + + +## Phase-3 Feature: tooltip-component (2026-05-23 09:38:26) + +- `09:38:26` **INFO** Description: Tooltip mit hover-delay +- `09:38:26` **INFO** Generating apps/web/src/components/Tooltip.tsx (Tooltip-Component. Props: text (string), children, position?: 'top'|'b…) +- `09:38:40` **INFO** wrote 1304 chars in 13.5s (attempt 1) +- `09:38:40` **INFO** Running tsc --noEmit on api… +- `09:38:42` **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/Tooltip.tsx b/apps/web/src/components/Tooltip.tsx index 8f7b824..4b30d54 100644 --- a/apps/web/src/components/Tooltip.tsx +++ b/apps/web/src/components/Tooltip.tsx @@ -1,20 +1,40 @@ import React, { ReactNode } from 'react'; interface TooltipProps { + text: string; children: ReactNode; - content: string; + position?: 'top' | 'bottom' | 'left' | 'right'; } -export const Tooltip = ({ children, content }: TooltipProps) => { +export const Tooltip = ({ text, children, position = 'top' }: TooltipProps) => { + const positionClasses = { + top: 'bottom-full left-1/2 -translate-x-1/2 mb-2', + bottom: 'top-full left-1/2 -translate-x-1/2 mt-2', + left: 'right-full top-1/2 -translate-y-1/2 mr-2', + right: 'left-full top-1/2 -translate-y-1/2 ml-2', + }; + + const arrowClasses = { + top: 'top-full left-1/2 -translate-x-1/2 border-t-gray-800', + bottom: 'bottom-full left-1/2 -translate-x-1/2 border-b-gray-800', + left: 'left-full top-1/2 -translate-y-1/2 border-l-gray-800', + right: 'right-full top-1/2 -translate-y-1/2 border-r-gray-800', + }; + return ( -
+ {children} -
-
- {content} -
-
+ + ); }; \ No newline at end of file diff --git a/scripts/phase32_features.py b/scripts/phase32_features.py new file mode 100644 index 0000000..9b7da3b --- /dev/null +++ b/scripts/phase32_features.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python3 +"""Phase-32: standalone components — Tooltip, Badge, Card, StatusDot.""" + +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 / ".phase32-state.json" + +FEATURES: list[Feature] = [ + Feature( + name="tooltip-component", + description="Tooltip mit hover-delay", + files=[FileGen( + path="apps/web/src/components/Tooltip.tsx", + purpose=( + "Tooltip-Component. Props: text (string), children, position?: 'top'|'bottom'|'left'|'right' (default 'top'). " + "Wrappt children in . Tooltip-div absolute, hidden, " + "group-hover:block, dunkler bg, weiße Schrift, kleine Rounded. 300ms hover-delay via opacity transition." + ), + )], + ), + Feature( + name="badge-component", + description="Badge mit color-variants", + files=[FileGen( + path="apps/web/src/components/Badge.tsx", + purpose=( + "Badge-Component. Props: variant ('default'|'success'|'warning'|'danger'|'info'), children, size?: 'sm'|'md'. " + "Tailwind: rounded-full px-2 py-0.5 text-xs font-medium per variant. " + "Bsp: success=bg-green-100 text-green-800. Export default." + ), + )], + ), + Feature( + name="card-component", + description="Card-Container mit padding/shadow", + files=[FileGen( + path="apps/web/src/components/Card.tsx", + purpose=( + "Card-Component + CardHeader + CardBody + CardFooter Sub-Components. " + "Card: bg-white dark:bg-zinc-800 rounded-lg shadow-sm border. " + "Header: padding + border-bottom. Body: padding. Footer: padding + border-top + bg-zinc-50. " + "Export Card als default + named exports." + ), + )], + ), + Feature( + name="status-dot-component", + description="StatusDot für Indicator (online/offline/busy)", + files=[FileGen( + path="apps/web/src/components/StatusDot.tsx", + purpose=( + "StatusDot-Component. Props: status ('online'|'offline'|'busy'|'away'), size?: 'sm'|'md'|'lg'. " + "Kleiner Kreis (w-2 h-2 default). Farben: online=green-500, offline=gray-400, busy=red-500, away=yellow-500. " + "Optional pulse-animation für online. 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-32 Codegen-Run gestartet — standalone components") + 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-32 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()))