fix: TypeScript build errors in WorkflowStepper and errorCodeHelpers

- 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 <noreply@anthropic.com>
This commit is contained in:
Jan-Henrik Bruhn 2025-12-25 21:53:28 +01:00
parent dabfa3b35a
commit 786464c4c6
2 changed files with 3 additions and 13 deletions

View file

@ -451,7 +451,7 @@ export function WorkflowStepper() {
}; };
const Icon = const Icon =
content.type === "error" content.type === "warning"
? ExclamationTriangleIcon ? ExclamationTriangleIcon
: InformationCircleIcon; : InformationCircleIcon;
@ -492,18 +492,6 @@ export function WorkflowStepper() {
))} ))}
</ul> </ul>
)} )}
{content.type === "error" &&
content.errorCode !== undefined && (
<p
className={`text-xs ${descColorClasses[content.type]} mt-3 font-mono`}
>
Error Code: 0x
{content.errorCode
.toString(16)
.toUpperCase()
.padStart(2, "0")}
</p>
)}
</div> </div>
</div> </div>
</div> </div>

View file

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