From 2539710075042801ad1ce8c18a50d2e42c753c36 Mon Sep 17 00:00:00 2001 From: LTbinglingfeng Date: Sat, 24 Jan 2026 17:17:29 +0800 Subject: [PATCH] fix(status-bar): extend health monitor window to 200 minutes --- src/utils/usage.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/usage.ts b/src/utils/usage.ts index 48ac4df..a01e3c4 100644 --- a/src/utils/usage.ts +++ b/src/utils/usage.ts @@ -903,11 +903,11 @@ export function calculateStatusBarData( authIndexFilter?: number ): StatusBarData { const BLOCK_COUNT = 20; - const BLOCK_DURATION_MS = 5 * 60 * 1000; // 5 minutes - const HOUR_MS = 60 * 60 * 1000; + const BLOCK_DURATION_MS = 10 * 60 * 1000; // 10 minutes + const WINDOW_MS = 200 * 60 * 1000; // 200 minutes const now = Date.now(); - const hourAgo = now - HOUR_MS; + const windowStart = now - WINDOW_MS; // Initialize blocks const blockStats: Array<{ success: number; failure: number }> = Array.from( @@ -921,7 +921,7 @@ export function calculateStatusBarData( // Filter and bucket the usage details usageDetails.forEach((detail) => { const timestamp = Date.parse(detail.timestamp); - if (Number.isNaN(timestamp) || timestamp < hourAgo || timestamp > now) { + if (Number.isNaN(timestamp) || timestamp < windowStart || timestamp > now) { return; }