@@ -1037,23 +201,20 @@ export function HMSErrorModal({ printerName, errors, onClose, printerId, hasPerm
) : (
{knownErrors.map((error, index) => {
- const { label, color, bgColor, Icon } = getSeverityInfo(error.severity);
+ const { labelKey, color, bgColor, Icon } = getSeverityInfo(error.severity);
const codeNum = parseInt(error.code.replace('0x', ''), 16) || 0;
const shortCode = getShortCode(error.attr, codeNum);
// Runout guidance (#2587): for an AMS per-slot runout on a paused
// print, name the slot the firmware now expects rather than the
// misleading generic "insert into the same slot" text.
- const matchedFullCode =
- !!error.full_code && ERROR_DESCRIPTIONS[error.full_code] !== undefined;
- let description =
- lookupDescription(error.full_code, shortCode) ?? t('hmsErrors.unknownCode');
- // The remedy is Bambuddy's, not Bambu's — their wiki says "update
- // Studio or Handy", which is no help to someone printing from
- // Bambuddy. Same override shape as the runout guidance below.
- const remedy =
- error.full_code === HMS_MQTT_VERIFY_FAILED
- ? t('hmsErrors.mqttVerifyFailedRemedy')
- : null;
+ // An actionable fault can count without text; it still gets a line.
+ let description = error.description || t('hmsErrors.unknownCode');
+ // The text and remedy are Bambuddy's, not Bambu's — their text says
+ // "update Studio or Handy", which is no help to someone printing
+ // from Bambuddy. Same override shape as the runout guidance below.
+ const isVerifyFailed = error.full_code === HMS_MQTT_VERIFY_FAILED;
+ if (isVerifyFailed) description = t('hmsErrors.mqttVerifyFailedDescription');
+ const remedy = isVerifyFailed ? t('hmsErrors.mqttVerifyFailedRemedy') : null;
if (runoutGuidance && AMS_RUNOUT_SHORT_CODES.has(shortCode)) {
if (runoutGuidance.expectedSlotLabel && runoutGuidance.ranOutSlotLabel) {
description = t('hmsErrors.runoutExpectedSlot', {
@@ -1069,14 +230,7 @@ export function HMSErrorModal({ printerName, errors, onClose, printerId, hasPerm
}
}
const hmsHomeUrl = getHMSHomeUrl();
- // Show the printer's own four-group notation when the short code
- // could not identify the error — for those, "0500-0007" matches
- // nothing the user can look up, while "0500-0500-0001-0007" is
- // exactly what the printer screen and the Bambu wiki show.
- const displayCode =
- matchedFullCode && error.full_code!.length === 16
- ? error.full_code!.match(/.{4}/g)!.join('-')
- : shortCode.replace('_', '-');
+ const displayCode = getDisplayCode(error);
return (
[{displayCode}]
- {label}
+ {t(labelKey)}
{description}
@@ -1148,6 +302,25 @@ export function HMSErrorModal({ printerName, errors, onClose, printerId, hasPerm
);
})}
+ {uncountedErrors.length > 0 && (
+