feat(spinner-component): Spinner mit Size-Varianten [tsc:fail]

This commit is contained in:
Dennis (via Claude+Gemma) 2026-05-23 10:08:35 +02:00
parent 5759154f61
commit bb164bb1e0
5 changed files with 156 additions and 1 deletions

View File

@ -5,6 +5,7 @@
"attempted_features": [
"stepper-component",
"timeline-component",
"skeleton-block-component"
"skeleton-block-component",
"empty-chart-component"
]
}

5
.phase38-state.json Normal file
View File

@ -0,0 +1,5 @@
{
"completed_features": [],
"current_feature": "spinner-component",
"started_at": "2026-05-23T10:08:26.899213"
}

View File

@ -4028,3 +4028,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<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>,
- `10:04:23` **INFO** Committed feature empty-chart-component
- `10:04:23` **INFO** Pushed: rc=0
## Phase-37 Run beendet (2026-05-23 10:04:23)
- `10:04:23` **INFO** OK: 0, Attempted: 4, Total: 4
## 🚀 Phase-38 Codegen-Run gestartet (2026-05-23 10:08:26)
## Phase-3 Feature: spinner-component (2026-05-23 10:08:26)
- `10:08:26` **INFO** Description: Spinner mit Size-Varianten
- `10:08:26` **INFO** Generating apps/web/src/components/Spinner.tsx (Spinner-Component. Props: size?: 'xs'|'sm'|'md'|'lg' (default md), col…)
- `10:08:33` **INFO** wrote 546 chars in 6.5s (attempt 1)
- `10:08:33` **INFO** Running tsc --noEmit on api…
- `10:08:35` **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<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>,

View File

@ -0,0 +1,28 @@
import React from 'react';
import { Loader2 } from 'lucide-react';
interface SpinnerProps {
size?: 'xs' | 'sm' | 'md' | 'lg';
color?: 'blue' | 'white' | 'gray';
}
const sizeMap = {
xs: 'w-3 h-3',
sm: 'w-5 h-5',
md: 'w-8 h-8',
lg: 'w-12 h-12',
};
const colorMap = {
blue: 'text-blue-600',
white: 'text-white',
gray: 'text-gray-500',
};
export default function Spinner({ size = 'md', color = 'blue' }: SpinnerProps) {
return (
<Loader2
className={`animate-spin ${sizeMap[size]} ${colorMap[color]}`}
/>
);
}

View File

@ -0,0 +1,96 @@
#!/usr/bin/env python3
"""Phase-38: standalone components — Spinner, Slider, Rating, Chip."""
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 / ".phase38-state.json"
FEATURES: list[Feature] = [
Feature(
name="spinner-component",
description="Spinner mit Size-Varianten",
files=[FileGen(
path="apps/web/src/components/Spinner.tsx",
purpose=(
"Spinner-Component. Props: size?: 'xs'|'sm'|'md'|'lg' (default md), color?: 'blue'|'white'|'gray'. "
"Lucide-react Loader2 mit animate-spin + Tailwind size/color. Export default."
),
)],
),
Feature(
name="slider-component",
description="Range-Slider mit Value-Display",
files=[FileGen(
path="apps/web/src/components/Slider.tsx",
purpose=(
"Slider-Component. Props: value, onChange, min? (default 0), max? (default 100), step? (default 1), label?, showValue?. "
"Native <input type=range> styled mit Tailwind accent-blue-500 + flex layout. "
"Wenn showValue: zeigt aktuellen value rechts. Export default."
),
)],
),
Feature(
name="rating-component",
description="Rating mit Sternen",
files=[FileGen(
path="apps/web/src/components/Rating.tsx",
purpose=(
"Rating-Component. Props: value (0-5), onChange?, max? (default 5), readonly?, size?: 'sm'|'md'|'lg'. "
"5 Star-Icons (lucide-react Star). Gefüllt mit fill-yellow-400 wenn i < value. "
"Klick auf Star ruft onChange(i+1). Tailwind. Export default."
),
)],
),
Feature(
name="chip-component",
description="Chip mit dismiss-Button",
files=[FileGen(
path="apps/web/src/components/Chip.tsx",
purpose=(
"Chip-Component. Props: label, onDismiss?, icon?, variant?: 'default'|'outlined'|'solid', color?. "
"Pill mit Label + optional Icon links + optional X-Button rechts (wenn onDismiss). "
"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-38 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-38 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()))