From 52323610e32ae2eccdd1ae5bf367af1e83e67e34 Mon Sep 17 00:00:00 2001 From: Agent Zero Date: Tue, 25 Aug 2026 20:23:02 +0200 Subject: [PATCH] =?UTF-8?q?fix(i-d):=20notifications-DELETE=20+=20agents/s?= =?UTF-8?q?kills=20Brueche=20=E2=80=94=20tote=20Hooks=20eliminiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Verifiziert: useDeleteNotification und useAgentSkills haben NULL Komponenten-Importeure (nur Definitionsdateien). Die echten Komponenten nutzen andere Hooks (useNotifications, useMarkNotificationRead, useUnreadNotificationCount; useAgentTools/useAgentToolsFull). Nach AGENTS.md 0.2 keine Backend-Shims fuer tote Calls: beide Hooks entfernt, ungenutztes apiDelete-Import in notifications.ts bereinigt. Damit sind alle 12 API-Braeche aus dem D5-Triage abgeschlossen: ai/sessions x5 (3e5f13f), policies x4 (86c96f0), mail x4 (86c96f0), notifications DELETE (hier), agents/skills (hier). tsc exit=0. --- frontend/src/api/automation.ts | 11 ----------- frontend/src/api/notifications.ts | 12 +----------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/frontend/src/api/automation.ts b/frontend/src/api/automation.ts index cfcb153..915c730 100644 --- a/frontend/src/api/automation.ts +++ b/frontend/src/api/automation.ts @@ -16,7 +16,6 @@ import type { AutomationSettings, MiniAppDef, AgentToolInfo, - AgentSkillInfo, AgentRunFull, } from '@/types/automation'; @@ -258,16 +257,6 @@ export function useAgentToolsFull() { }); } -export function useAgentSkills() { - return useQuery({ - queryKey: ['agentSkills'], - queryFn: async () => { - const res = await apiGet('/agents/skills'); - return Array.isArray(res) ? res : res.items ?? []; - }, - }); -} - export function useAgentRunsFull(agentId: string) { return useQuery({ queryKey: ['agentRunsFull', agentId], diff --git a/frontend/src/api/notifications.ts b/frontend/src/api/notifications.ts index 3ec70f1..b7ceb30 100644 --- a/frontend/src/api/notifications.ts +++ b/frontend/src/api/notifications.ts @@ -3,7 +3,7 @@ */ import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; -import { apiGet, apiPatch, apiDelete } from './client'; +import { apiGet, apiPatch } from './client'; import { PaginatedResponse } from './types'; // ── Types matching backend schemas ── @@ -64,16 +64,6 @@ export function useMarkNotificationRead() { }); } -export function useDeleteNotification() { - const queryClient = useQueryClient(); - return useMutation({ - mutationFn: (id: string) => apiDelete(`/notifications/${id}`), - onSuccess: () => { - queryClient.invalidateQueries({ queryKey: ['notifications'] }); - }, - }); -} - export function useNotificationTypes() { return useQuery({ queryKey: ['notification-types'],