fix: P0 stabilisation — score modifiers, logout cache clear, provider isolation, mutation error feedback

- scoreCalculator: apply dataQuality/confidence modifiers to finalScore (were computed but hardcoded to 0)
- authService: call queryClient.clear() on logout to prevent cross-session data leakage
- queryClient: extract to src/lib/queryClient.ts singleton so services can access it without circular imports
- matchSyncService: new service layer owns match-generation logic; MockupNeedProvider no longer imports other providers directly
- hooks (11 files): add onError + German toast feedback to every useMutation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin SutterandClaude Sonnet 4.6 committed 2026-05-24 00:13:14 +02:00
1 parent 22c195b4a5
commit efc72b720e
17 files changed
+268 -134

No files matched your search

+7
View File
@@ -1,6 +1,7 @@
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'
import { signalPipelineService } from '../services/signalPipelineService'
import type { GateType } from '../domain/signalPipeline'
import { useToastStore } from '../stores/toastStore'
const STALE_PIPELINE = 15_000
@@ -32,6 +33,9 @@ export function useEvaluateGate() {
onSuccess: (_data, { signalId }) => {
queryClient.invalidateQueries({ queryKey: ['signal-pipeline', signalId] })
},
onError: () => {
useToastStore.getState().showToast('Gate-Evaluierung fehlgeschlagen.', 'error')
},
})
}
@@ -44,5 +48,8 @@ export function usePublishToFutureAvailability() {
queryClient.invalidateQueries({ queryKey: ['signal-audit-trail', signalId] })
queryClient.invalidateQueries({ queryKey: ['market-signals'] })
},
onError: () => {
useToastStore.getState().showToast('Veröffentlichung fehlgeschlagen. Bitte versuchen Sie es erneut.', 'error')
},
})
}