fix(ui): Steuerungszustand sichtbar auch bei Lade-/API-Fehler
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Failing after 1m12s
Test Suite / k6 /api/health Baseline (push) Has been skipped
Test Suite / playwright-smoke (push) Has been skipped
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped

Vorher wurde das Panel bei fehlendem Snapshot komplett ausgeblendet.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-07-05 15:36:15 +02:00
1 parent e25ff86420
commit 1b19deb728
2 files changed
+40 -6

No files matched your search

@@ -1,7 +1,26 @@
import { PHASE_LABELS } from '../constants/operating.js'
export function SteeringSnapshotPanel({ snapshot }) {
if (!snapshot) return null
export function SteeringSnapshotPanel({ snapshot, loading, error }) {
if (loading) {
return (
<section className="card steering-snapshot">
<p className="muted">Steuerungszustand wird geladen …</p>
</section>
)
}
if (error || !snapshot) {
return (
<section className="card steering-snapshot steering-snapshot--unavailable">
<div className="section-header">
<h2>Steuerungszustand</h2>
</div>
<p className="muted">
{error || 'Snapshot nicht verfügbar — bitte Seite neu laden (Strg+F5).'}
</p>
</section>
)
}
const { operating_phase, phase_signals, counts } = snapshot
const phaseLabel = PHASE_LABELS[operating_phase] || operating_phase