feat(loading-skeletons): Skeleton-Component für Tabellen während Loading [tsc:fail]
This commit is contained in:
parent
923700986f
commit
902b2c536f
@ -7,6 +7,7 @@
|
|||||||
"default-project-per-customer",
|
"default-project-per-customer",
|
||||||
"holiday-calendar",
|
"holiday-calendar",
|
||||||
"role-permissions-page",
|
"role-permissions-page",
|
||||||
"api-client-phase25"
|
"api-client-phase25",
|
||||||
|
"router-phase25"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
5
.phase26-state.json
Normal file
5
.phase26-state.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"completed_features": [],
|
||||||
|
"current_feature": "loading-skeletons",
|
||||||
|
"started_at": "2026-05-23T08:51:33.874805"
|
||||||
|
}
|
||||||
@ -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.
|
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<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||||
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>,
|
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>,
|
||||||
|
- `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<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||||
|
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>,
|
||||||
|
|||||||
39
apps/web/src/components/TableSkeleton.tsx
Normal file
39
apps/web/src/components/TableSkeleton.tsx
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
interface TableSkeletonProps {
|
||||||
|
rows?: number;
|
||||||
|
cols?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function TableSkeleton({ rows = 5, cols = 4 }: TableSkeletonProps) {
|
||||||
|
return (
|
||||||
|
<div className="w-full overflow-x-auto">
|
||||||
|
<table className="w-full text-left border-collapse">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
{Array.from({ length: cols }).map((_, i) => (
|
||||||
|
<th key={i} className="p-3">
|
||||||
|
<div className="h-4 w-24 bg-gray-200 dark:bg-slate-700 animate-pulse rounded" />
|
||||||
|
</th>
|
||||||
|
))}
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{Array.from({ length: rows }).map((_, rowIndex) => (
|
||||||
|
<tr key={rowIndex} className="border-t border-gray-100 dark:border-slate-800">
|
||||||
|
{Array.from({ length: cols }).map((_, colIndex) => (
|
||||||
|
<td key={colIndex} className="p-3">
|
||||||
|
<div
|
||||||
|
className={`h-4 bg-gray-200 dark:bg-slate-700 animate-pulse rounded ${
|
||||||
|
colIndex === 0 ? 'w-32' : 'w-full'
|
||||||
|
}`}
|
||||||
|
/>
|
||||||
|
</td>
|
||||||
|
))}
|
||||||
|
</tr>
|
||||||
|
))}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
106
scripts/phase26_features.py
Normal file
106
scripts/phase26_features.py
Normal file
@ -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()))
|
||||||
Loading…
Reference in New Issue
Block a user