fix(failover): improve cache cleanup for provider health and circuit breaker

- Use removeQueries instead of invalidateQueries when stopping proxy to
  completely clear health and circuit breaker caches
- Clear provider health and circuit breaker caches when removing from
  failover queue
- Refresh failover queue after drag-sort since queue order depends on
  sort_index
- Only show health badge when provider is in failover queue
This commit is contained in:
YoVinchen
2025-12-22 23:48:56 +08:00
parent 2c18e125dc
commit f5f7ab7ce2
4 changed files with 24 additions and 4 deletions
+3 -2
View File
@@ -183,7 +183,8 @@ export function ProviderCard({
? "hover:border-emerald-500/50"
: "hover:border-border-active",
// 当前激活的供应商边框样式
shouldUseGreen && "border-emerald-500/60 shadow-sm shadow-emerald-500/10",
shouldUseGreen &&
"border-emerald-500/60 shadow-sm shadow-emerald-500/10",
shouldUseBlue && "border-blue-500/60 shadow-sm shadow-blue-500/10",
!isActiveProvider && "hover:shadow-sm",
dragHandleProps?.isDragging &&
@@ -233,7 +234,7 @@ export function ProviderCard({
</h3>
{/* 健康状态徽章 */}
{isProxyRunning && health && (
{isProxyRunning && isInFailoverQueue && health && (
<ProviderHealthBadge
consecutiveFailures={health.consecutive_failures}
/>