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
+3 -2
View File
@@ -4,6 +4,7 @@
* Account selection is integrated into the folder tree (left pane).
*/
import { asError } from '@/utils/errorTypes';
import React, { useState, useEffect, useCallback, useRef, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';
@@ -778,8 +779,8 @@ export function MailPage() {
await loadMails();
toast.success(t('mail.syncSuccess'));
}
} catch (err: any) {
const msg = err?.message || err?.detail || (typeof err === 'string' ? err : 'Sync failed');
} catch (err: unknown) { const errObj = asError(err);
const msg = errObj?.message || errObj?.detail || (typeof errObj === 'string' ? errObj : 'Sync failed');
toast.error(msg);
} finally {
setIsSyncing(false);