From 740093d852a7acb8644bd09c1d853ecaf30fe23b Mon Sep 17 00:00:00 2001 From: decolua Date: Wed, 17 Jun 2026 09:31:46 +0700 Subject: [PATCH] feat: Claude auto-ping to warm 5h window after reset Auto-sends a minimal request right after each Claude OAuth connection's 5h quota window resets, so a fresh window starts immediately without waiting. Per-connection toggle on providers and quota dashboards. - claudeAutoPing scheduler (server-side, 60s tick) hooked into initializeApp - per-connection enable map in settings.claudeAutoPing.connections - toggle + tooltip in ConnectionRow and ProviderLimits (Claude OAuth only) Co-authored-by: Cursor --- .../dashboard/providers/[id]/ConnectionRow.js | 19 ++- .../dashboard/providers/[id]/page.js | 24 ++++ .../usage/components/ProviderLimits/index.js | 39 +++++++ src/shared/constants/config.js | 12 ++ src/shared/services/claudeAutoPing.js | 110 ++++++++++++++++++ src/shared/services/initializeApp.js | 2 + 6 files changed, 204 insertions(+), 2 deletions(-) create mode 100644 src/shared/services/claudeAutoPing.js diff --git a/src/app/(dashboard)/dashboard/providers/[id]/ConnectionRow.js b/src/app/(dashboard)/dashboard/providers/[id]/ConnectionRow.js index bc97317e..d79cdc85 100644 --- a/src/app/(dashboard)/dashboard/providers/[id]/ConnectionRow.js +++ b/src/app/(dashboard)/dashboard/providers/[id]/ConnectionRow.js @@ -3,10 +3,10 @@ import { useState, useEffect, useRef } from "react"; import { getStatusVariant as getConnectionStatusVariant } from "@/shared/utils/connectionStatus"; import PropTypes from "prop-types"; -import { Badge, Toggle } from "@/shared/components"; +import { Badge, Toggle, Tooltip } from "@/shared/components"; import CooldownTimer from "./CooldownTimer"; -export default function ConnectionRow({ connection, proxyPools, isOAuth, isFirst, isLast, onMoveUp, onMoveDown, onToggleActive, onUpdateProxy, onEdit, onDelete, oneByOneStatus = null }) { +export default function ConnectionRow({ connection, proxyPools, isOAuth, isFirst, isLast, onMoveUp, onMoveDown, onToggleActive, onUpdateProxy, onEdit, onDelete, oneByOneStatus = null, autoPing = null }) { const [showProxyDropdown, setShowProxyDropdown] = useState(false); const [updatingProxy, setUpdatingProxy] = useState(false); const proxyDropdownRef = useRef(null); @@ -235,6 +235,17 @@ export default function ConnectionRow({ connection, proxyPools, isOAuth, isFirst )} )} + {autoPing && ( + + + + )} + {/* Refresh all button */} + + )}