fix(cropper): make load failures visible; loud config errors

'Load next queued' did nothing because the running server had been started
without its env file (a restart used '-f .env' from tools/, where no .env
exists), so the cropper was unconfigured and every action answered 503 —
and none of that was visible, because notifications never rendered either:

- notifications used cds-toast/cds-toast-item, which the Carbon bundle does
  not define; a cds-toast-notification element renders nothing standalone in
  this build. The cropper now uses cds-inline-notification in the fixed
  toast viewport (renders, themed, close button) like the wizard
- an unconfigured deployment now says so on the page (503 'Cropper
  unavailable') instead of rendering actions that all fail, and logs a
  startup warning naming the missing credentials
- tests: notifications use a registered element; unconfigured page 503
This commit is contained in:
2026-10-01 04:36:31 +01:00
parent cb5b151988
commit 95200b6abf
6 changed files with 44 additions and 11 deletions
+10
View File
@@ -20,6 +20,16 @@ const REMOVEBG_URL = 'https://removebg.itcass.net/api/removebg';
* credential is missing — the router then answers 503 and nothing else in the
* app is affected. URLs are hardcoded here; only credentials come from env.
*/
/** Credentials the cropper needs (used for the startup warning). */
export const CROPPER_CREDENTIALS = [
'MINIO_ACCESS_KEY',
'MINIO_SECRET_KEY',
'AZURE_STORAGE_CONNECTION_STRING',
'NODERED_HTTP_USERNAME',
'NODERED_HTTP_PASSWORD',
'CARVEKIT_API_KEY',
];
export function buildCropperClients(env = process.env) {
const {
MINIO_ACCESS_KEY,