fix(audit): P2 frontend any→concrete types (181→61), heroicons→lucide-react, missing type exports, toast API, Select options, TaskStatus types; P2-9 hooks.py type annotations

This commit is contained in:
Agent Zero
2026-08-17 22:24:24 +02:00
parent 40fd633917
commit 45ebbee26f
52 changed files with 404 additions and 302 deletions
@@ -1,3 +1,4 @@
import { asError } from '@/utils/errorTypes';
import React, { useState, useEffect } from 'react';
// TODO: P2-F21 — Replace hardcoded triggerEventOptions with backend config
import { useTranslation } from 'react-i18next';
@@ -166,17 +167,17 @@ export function WorkflowEditor({ open, workflow, onClose }: WorkflowEditorProps)
toast.success('Workflow erstellt');
}
onClose();
} catch (err: any) {
} catch (err: unknown) { const errObj = asError(err);
// Show detailed validation errors from backend (422)
if (err.validationErrors) {
const details = Object.entries(err.validationErrors)
if (errObj.validationErrors) {
const details = Object.entries(errObj.validationErrors)
.map(([field, msgs]) => `${field}: ${(msgs as string[]).join(', ')}`)
.join('; ');
toast.error(`Validierungsfehler: ${details}`);
} else if (err.detail) {
toast.error(err.detail);
} else if (errObj.detail) {
toast.error(errObj.detail);
} else {
toast.error(err.message || 'Fehler beim Speichern');
toast.error(errObj.message || 'Fehler beim Speichern');
}
}
};