feat(stepper-component): Stepper für Wizard-Flows [tsc:fail]
This commit is contained in:
parent
239d2f9e17
commit
d6bddc51ed
@ -5,6 +5,7 @@
|
|||||||
"attempted_features": [
|
"attempted_features": [
|
||||||
"input-component",
|
"input-component",
|
||||||
"textarea-component",
|
"textarea-component",
|
||||||
"select-component"
|
"select-component",
|
||||||
|
"search-box-component"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
5
.phase37-state.json
Normal file
5
.phase37-state.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"completed_features": [],
|
||||||
|
"current_feature": "stepper-component",
|
||||||
|
"started_at": "2026-05-23T10:03:26.504746"
|
||||||
|
}
|
||||||
@ -3949,3 +3949,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>,
|
||||||
|
- `09:59:39` **INFO** Committed feature search-box-component
|
||||||
|
- `09:59:39` **INFO** Pushed: rc=0
|
||||||
|
|
||||||
|
## Phase-36 Run beendet (2026-05-23 09:59:39)
|
||||||
|
|
||||||
|
- `09:59:39` **INFO** OK: 0, Attempted: 4, Total: 4
|
||||||
|
|
||||||
|
## 🚀 Phase-37 Codegen-Run gestartet (2026-05-23 10:03:26)
|
||||||
|
|
||||||
|
|
||||||
|
## Phase-3 Feature: stepper-component (2026-05-23 10:03:26)
|
||||||
|
|
||||||
|
- `10:03:26` **INFO** Description: Stepper für Wizard-Flows
|
||||||
|
- `10:03:26` **INFO** Generating apps/web/src/components/Stepper.tsx (Stepper-Component. Props: steps (array {label, description?}), current…)
|
||||||
|
- `10:03:45` **INFO** wrote 2446 chars in 19.4s (attempt 1)
|
||||||
|
- `10:03:45` **INFO** Running tsc --noEmit on api…
|
||||||
|
- `10:03:47` **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>,
|
||||||
|
|||||||
73
apps/web/src/components/Stepper.tsx
Normal file
73
apps/web/src/components/Stepper.tsx
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Check } from 'lucide-react';
|
||||||
|
|
||||||
|
interface Step {
|
||||||
|
label: string;
|
||||||
|
description?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface StepperProps {
|
||||||
|
steps: Step[];
|
||||||
|
currentStep: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
const Stepper: React.FC<StepperProps> = ({ steps, currentStep }) => {
|
||||||
|
return (
|
||||||
|
<div className="w-full py-4">
|
||||||
|
<div className="flex items-start justify-between w-full">
|
||||||
|
{steps.map((step, index) => {
|
||||||
|
const isCompleted = index < currentStep;
|
||||||
|
const isActive = index === currentStep;
|
||||||
|
const isPending = index > currentStep;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div key={index} className="relative flex flex-col items-center flex-1">
|
||||||
|
{/* Connector Line */}
|
||||||
|
{index !== steps.length - 1 && (
|
||||||
|
<div
|
||||||
|
className={`absolute top-5 left-1/2 w-full h-0.5 transition-colors duration-300 ${
|
||||||
|
isCompleted ? 'bg-green-500' : 'bg-gray-200'
|
||||||
|
}`}
|
||||||
|
style={{ left: '50%' }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Step Circle */}
|
||||||
|
<div
|
||||||
|
className={`relative z-10 flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all duration-300 ${
|
||||||
|
isCompleted
|
||||||
|
? 'bg-green-500 border-green-500 text-white'
|
||||||
|
: isActive
|
||||||
|
? 'bg-white border-blue-600 text-blue-600 ring-4 ring-blue-50'
|
||||||
|
: 'bg-white border-gray-300 text-gray-400'
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
{isCompleted ? (
|
||||||
|
<Check className="w-6 h-6" strokeWidth={3} />
|
||||||
|
) : (
|
||||||
|
<span className="text-sm font-semibold">{index + 1}</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Labels */}
|
||||||
|
<div className="mt-3 text-center px-2">
|
||||||
|
<p className={`text-sm font-medium transition-colors duration-300 ${
|
||||||
|
isActive ? 'text-blue-600' : isCompleted ? 'text-green-600' : 'text-gray-500'
|
||||||
|
}`}>
|
||||||
|
{step.label}
|
||||||
|
</p>
|
||||||
|
{step.description && (
|
||||||
|
<p className="text-xs text-gray-400 mt-1 max-w-[120px] mx-auto">
|
||||||
|
{step.description}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Stepper;
|
||||||
96
scripts/phase37_features.py
Normal file
96
scripts/phase37_features.py
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Phase-37: standalone components — Stepper, Timeline, SkeletonBlock, EmptyChart."""
|
||||||
|
|
||||||
|
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 / ".phase37-state.json"
|
||||||
|
|
||||||
|
FEATURES: list[Feature] = [
|
||||||
|
Feature(
|
||||||
|
name="stepper-component",
|
||||||
|
description="Stepper für Wizard-Flows",
|
||||||
|
files=[FileGen(
|
||||||
|
path="apps/web/src/components/Stepper.tsx",
|
||||||
|
purpose=(
|
||||||
|
"Stepper-Component. Props: steps (array {label, description?}), currentStep (number, 0-indexed). "
|
||||||
|
"Horizontaler Stepper mit Kreisen + Verbindungslinien. "
|
||||||
|
"Active: blue, completed: green mit Check-Icon, pending: gray. Tailwind. Export default."
|
||||||
|
),
|
||||||
|
)],
|
||||||
|
),
|
||||||
|
Feature(
|
||||||
|
name="timeline-component",
|
||||||
|
description="Timeline für Activity-Feed",
|
||||||
|
files=[FileGen(
|
||||||
|
path="apps/web/src/components/Timeline.tsx",
|
||||||
|
purpose=(
|
||||||
|
"Timeline-Component. Props: items (array {id, title, description?, timestamp, icon?, color?}). "
|
||||||
|
"Vertikale Liste mit linker Linie + Kreisen. Pro item: Icon im Kreis, title + description rechts, timestamp grey. "
|
||||||
|
"Tailwind. Export default."
|
||||||
|
),
|
||||||
|
)],
|
||||||
|
),
|
||||||
|
Feature(
|
||||||
|
name="skeleton-block-component",
|
||||||
|
description="SkeletonBlock für Loading-Placeholders",
|
||||||
|
files=[FileGen(
|
||||||
|
path="apps/web/src/components/SkeletonBlock.tsx",
|
||||||
|
purpose=(
|
||||||
|
"SkeletonBlock-Component. Props: width?, height? (default 'full'/'4'), rounded?: 'none'|'sm'|'md'|'full'. "
|
||||||
|
"Div mit bg-zinc-200 dark:bg-zinc-700 + animate-pulse + Tailwind w/h Klassen. Export default."
|
||||||
|
),
|
||||||
|
)],
|
||||||
|
),
|
||||||
|
Feature(
|
||||||
|
name="empty-chart-component",
|
||||||
|
description="EmptyChart-Placeholder für Charts ohne Daten",
|
||||||
|
files=[FileGen(
|
||||||
|
path="apps/web/src/components/EmptyChart.tsx",
|
||||||
|
purpose=(
|
||||||
|
"EmptyChart-Component. Props: message? (default 'Keine Daten verfügbar'), height? (default '200px'). "
|
||||||
|
"Zentriert: BarChart-Icon (lucide-react, grey, large) + message text. "
|
||||||
|
"Border dashed. 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-37 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-37 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