From a5b8e66d87c21610ffb032dffcbba7fd21a4051d Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 31 Mar 2026 04:53:26 +0200 Subject: [PATCH] Refactor status display in App.tsx --- src/app/App.tsx | 71 +++++++++++-------------------------------------- 1 file changed, 15 insertions(+), 56 deletions(-) diff --git a/src/app/App.tsx b/src/app/App.tsx index abb4d8ef..a1f607d0 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -83,11 +83,6 @@ const FACE_LABELS: Record = { const STARTER_MATERIAL_ORDER = new Map(STARTER_MATERIAL_LIBRARY.map((material, index) => [material.id, index])); -const DIAGNOSTIC_BADGE_LABELS = { - document: "Document", - build: "Run" -} as const; - function formatVec3(vector: Vec3): string { return `${vector.x}, ${vector.y}, ${vector.z}`; } @@ -390,6 +385,9 @@ export function App({ store, initialStatusMessage }: AppProps) { const diagnostics = [...documentValidation.errors, ...documentValidation.warnings, ...runValidation.errors, ...runValidation.warnings]; const blockingDiagnostics = diagnostics.filter((diagnostic) => diagnostic.severity === "error"); const warningDiagnostics = diagnostics.filter((diagnostic) => diagnostic.severity === "warning"); + const documentStatusLabel = + documentValidation.errors.length === 0 ? "Valid" : formatDiagnosticCount(documentValidation.errors.length, "error"); + const lastCommandLabel = editorState.lastCommandLabel ?? "No commands yet"; const runReadyLabel = blockingDiagnostics.length > 0 ? "Blocked" @@ -1086,51 +1084,6 @@ export function App({ store, initialStatusMessage }: AppProps) {