Add a dev-only kitchen simulation to the order status page

- "Simulate kitchen (dev)" button advances each placed/paid item's
  Preparation Steps as a Machine would, polling fresh status per item
- Each simulated step takes 10–30s, scaled from its estimated duration
- Timeline connector fills in with a Framer Motion animation when a
  step completes; finished steps and the line now use the success green

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-30 23:25:52 +02:00
co-authored by Claude Opus 5.5
parent 815939cbc6
commit c124b0415a
2 changed files with 130 additions and 10 deletions
@@ -55,6 +55,28 @@
font-size: 0.85rem;
}
.simulateButton {
margin: 0 0 $space-4;
padding: $space-1 $space-3;
border: 1px dashed $color-text-muted;
border-radius: $radius;
background: none;
color: $color-text-muted;
font-size: 0.85rem;
cursor: pointer;
transition: border-color 0.15s ease, color 0.15s ease;
&:hover:not(:disabled) {
border-color: $color-primary;
color: $color-primary;
}
&:disabled {
opacity: 0.6;
cursor: not-allowed;
}
}
.error {
color: $color-danger;
}
@@ -130,8 +152,7 @@
z-index: 1;
}
.stepMarker::after {
content: '';
.stepConnector {
position: absolute;
top: 15px;
bottom: -$space-3;
@@ -139,9 +160,17 @@
width: 2px;
background: $color-border;
transform: translateX(-50%);
overflow: hidden;
}
.step:last-child .stepMarker::after {
.stepConnectorFill {
position: absolute;
inset: 0;
background: $color-success;
transform-origin: top;
}
.step:last-child .stepConnector {
display: none;
}
@@ -158,12 +187,8 @@
.step[data-status='done'] {
.stepDot {
border-color: $color-primary;
background: $color-primary;
}
.stepMarker::after {
background: $color-primary;
border-color: $color-success;
background: $color-success;
}
.stepLabel {