diff --git a/.phase25-state.json b/.phase25-state.json index e40ef33..d23d22d 100644 --- a/.phase25-state.json +++ b/.phase25-state.json @@ -7,6 +7,7 @@ "default-project-per-customer", "holiday-calendar", "role-permissions-page", - "api-client-phase25" + "api-client-phase25", + "router-phase25" ] } \ No newline at end of file diff --git a/.phase26-state.json b/.phase26-state.json new file mode 100644 index 0000000..ee0d586 --- /dev/null +++ b/.phase26-state.json @@ -0,0 +1,5 @@ +{ + "completed_features": [], + "current_feature": "loading-skeletons", + "started_at": "2026-05-23T08:51:33.874805" +} \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index 6d617b5..f6090f9 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -2994,3 +2994,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, +- `08:48:40` **INFO** Committed feature router-phase25 +- `08:48:40` **INFO** Pushed: rc=0 + +## Phase-25 Run beendet (2026-05-23 08:48:40) + +- `08:48:40` **INFO** OK: 0, Attempted: 6, Total: 6 + +## 🚀 Phase-26 Codegen-Run gestartet (2026-05-23 08:51:33) + + +## Phase-3 Feature: loading-skeletons (2026-05-23 08:51:33) + +- `08:51:33` **INFO** Description: Skeleton-Component für Tabellen während Loading +- `08:51:33` **INFO** Generating apps/web/src/components/TableSkeleton.tsx (TableSkeleton-Component. Props: rows (default 5), cols (default 4). Re…) +- `08:51:43` **INFO** wrote 1221 chars in 10.0s (attempt 1) +- `08:51:43` **INFO** Running tsc --noEmit on api… +- `08:51:45` **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(43,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(47,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(51,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/TableSkeleton.tsx b/apps/web/src/components/TableSkeleton.tsx new file mode 100644 index 0000000..79c646a --- /dev/null +++ b/apps/web/src/components/TableSkeleton.tsx @@ -0,0 +1,39 @@ +import React from 'react'; + +interface TableSkeletonProps { + rows?: number; + cols?: number; +} + +export default function TableSkeleton({ rows = 5, cols = 4 }: TableSkeletonProps) { + return ( +
+ + + + {Array.from({ length: cols }).map((_, i) => ( + + ))} + + + + {Array.from({ length: rows }).map((_, rowIndex) => ( + + {Array.from({ length: cols }).map((_, colIndex) => ( + + ))} + + ))} + +
+
+
+
+
+
+ ); +} \ No newline at end of file diff --git a/scripts/phase26_features.py b/scripts/phase26_features.py new file mode 100644 index 0000000..dc9e137 --- /dev/null +++ b/scripts/phase26_features.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python3 +"""Phase-26: polish-pass with empty states, loading skeletons, perf, micro-improvements.""" + +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 / ".phase26-state.json" + +FEATURES: list[Feature] = [ + Feature( + name="loading-skeletons", + description="Skeleton-Component für Tabellen während Loading", + files=[FileGen( + path="apps/web/src/components/TableSkeleton.tsx", + purpose=( + "TableSkeleton-Component. Props: rows (default 5), cols (default 4). " + "Rendert grey-pulsing animate-pulse bars in Table-Layout. Tailwind bg-gray-200 dark:bg-slate-700." + ), + )], + ), + Feature( + name="empty-state-illustrations", + description="EmptyState erweitert: Emoji + bessere Hierarchie", + files=[FileGen( + path="apps/web/src/components/EmptyState.tsx", + purpose=( + "ERWEITERT — behalte Props. Verbesserter Style: zentriert, gross emoji (4xl), title (text-lg semibold), " + "description (gray-500), optional action-button. Wenn icon prop given (z.B. 'inbox'): nutze lucide-react statt emoji." + ), + refs=["apps/web/src/components/EmptyState.tsx"], + )], + ), + Feature( + name="confirm-modal", + description="Reusable Confirm-Modal statt window.confirm()", + files=[FileGen( + path="apps/web/src/components/ConfirmModal.tsx", + purpose=( + "ConfirmModal-Component. Props: open, onClose, onConfirm, title, message, confirmLabel? (default 'Bestätigen'), " + "danger? (red statt blue button). Tailwind centered overlay-modal." + ), + )], + ), + Feature( + name="hover-tooltips", + description="Tooltip-Component (für Icon-Only-Buttons)", + files=[FileGen( + path="apps/web/src/components/Tooltip.tsx", + purpose=( + "Tooltip-Component. Props: children, content (string). " + "On hover: zeigt content als kleine box oben rechts vom children. Tailwind absolute + invisible group-hover:visible." + ), + )], + ), + Feature( + name="performance-memoization", + description="React.memo + useMemo in heavy Lists (Customers, Projects, TimeEntries)", + files=[FileGen( + path="apps/web/src/pages/Customers.tsx", + purpose=( + "ERWEITERT — wrap die einzelne Customer-Row in React.memo (falls als sub-component existiert), " + "oder useMemo für sortedCustomers Array. Behalte alles." + ), + refs=["apps/web/src/pages/Customers.tsx"], + )], + ), +] + + +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-26 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-26 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()))