From 786464c4c61b7b7fb38a785630194eacd7a650b8 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Bruhn Date: Thu, 25 Dec 2025 21:53:28 +0100 Subject: [PATCH] fix: TypeScript build errors in WorkflowStepper and errorCodeHelpers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove unreachable error type check in WorkflowStepper icon selection - Remove error code display block that accessed non-existent properties - Add missing shortName property to fallback error info objects 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- src/components/WorkflowStepper.tsx | 14 +------------- src/utils/errorCodeHelpers.ts | 2 ++ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/components/WorkflowStepper.tsx b/src/components/WorkflowStepper.tsx index 853445c..7f2b01f 100644 --- a/src/components/WorkflowStepper.tsx +++ b/src/components/WorkflowStepper.tsx @@ -451,7 +451,7 @@ export function WorkflowStepper() { }; const Icon = - content.type === "error" + content.type === "warning" ? ExclamationTriangleIcon : InformationCircleIcon; @@ -492,18 +492,6 @@ export function WorkflowStepper() { ))} )} - {content.type === "error" && - content.errorCode !== undefined && ( -

- Error Code: 0x - {content.errorCode - .toString(16) - .toUpperCase() - .padStart(2, "0")} -

- )} diff --git a/src/utils/errorCodeHelpers.ts b/src/utils/errorCodeHelpers.ts index 5c13548..0d1e7c4 100644 --- a/src/utils/errorCodeHelpers.ts +++ b/src/utils/errorCodeHelpers.ts @@ -388,6 +388,7 @@ export function getErrorDetails( if (errorTitle) { return { title: errorTitle, + shortName: errorTitle.length > 15 ? "Machine Error" : errorTitle, description: "Please check the machine display for more information.", solutions: [ "Consult your machine manual for specific troubleshooting steps", @@ -400,6 +401,7 @@ export function getErrorDetails( // Unknown error code return { title: `Machine Error 0x${errorCode.toString(16).toUpperCase().padStart(2, "0")}`, + shortName: "Machine Error", description: "The machine has reported an error code that is not recognized.", solutions: [