From 45e9b62d833ad152af904d7b7650e0db15fe4209 Mon Sep 17 00:00:00 2001 From: VrianCao <45995071+VrianCao@users.noreply.github.com> Date: Thu, 11 Jun 2026 22:41:34 +0800 Subject: [PATCH] Use true 60-day availability bars --- Develop/LOCAL-TESTING.md | 6 ++--- Develop/REVIEW.md | 2 +- apps/web/src/components/MonitorCard.tsx | 4 ++-- apps/web/src/i18n/messages.ts | 24 +++++++++---------- apps/worker/scripts/seed-local.sql | 6 ++--- apps/worker/src/public/data.ts | 2 +- apps/worker/src/public/homepage.ts | 4 ++-- apps/worker/src/public/status-refresh.ts | 2 +- apps/worker/src/schemas/public-status.ts | 4 ++-- apps/worker/src/snapshots/public-homepage.ts | 2 +- .../internal-sharded-public-snapshot.test.ts | 2 +- .../test/snapshots-public-homepage.test.ts | 2 +- 12 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Develop/LOCAL-TESTING.md b/Develop/LOCAL-TESTING.md index 603451bf..b5f267b7 100644 --- a/Develop/LOCAL-TESTING.md +++ b/Develop/LOCAL-TESTING.md @@ -611,9 +611,9 @@ pnpm format --- -### Public Status (30-day uptime bars) +### Public Status (60-day uptime bars) -The public status page now uses the daily rollup table (`monitor_daily_rollups`) to render a 30-day uptime bar per monitor. +The public status page now uses the daily rollup table (`monitor_daily_rollups`) to render a 60-day uptime bar per monitor. To generate rollup data locally (yesterday's rollup): @@ -621,7 +621,7 @@ To generate rollup data locally (yesterday's rollup): curl "http://localhost:8787/__scheduled?cron=0+0+*+*+*" ``` -The UI will show up to 30 bars when data exists. If there is no rollup data yet, uptime fields may be empty. +The UI will show up to 60 bars when data exists. If there is no rollup data yet, uptime fields may be empty. ## 常见问题 diff --git a/Develop/REVIEW.md b/Develop/REVIEW.md index bd78460a..0677b797 100644 --- a/Develop/REVIEW.md +++ b/Develop/REVIEW.md @@ -8,7 +8,7 @@ The following are implemented and deployed: - Worker: Hono + Zod API (`/api/v1/public/*`, `/api/v1/admin/*`), scheduled monitor engine, retention, daily rollups - Storage: D1 schema + migrations (monitors/state/results/outages/incidents/maintenance/notifications/settings/snapshots) -- Public: status snapshot, status page payload (monitors + 30d uptime bars + incidents + maintenance), latency/uptime/outages endpoints +- Public: status snapshot, status page payload (monitors + 60d uptime bars + incidents + maintenance), latency/uptime/outages endpoints - Admin: monitor CRUD + test, notification channel CRUD + test, incidents CRUD + updates + resolve, maintenance windows CRUD, analytics + CSV exports, settings - CI/CD: GitHub Actions (lint + typecheck + test + auto-deploy) diff --git a/apps/web/src/components/MonitorCard.tsx b/apps/web/src/components/MonitorCard.tsx index facaa05c..30902208 100644 --- a/apps/web/src/components/MonitorCard.tsx +++ b/apps/web/src/components/MonitorCard.tsx @@ -21,7 +21,7 @@ import { } from '../utils/uptime'; const HEARTBEAT_BARS = 60; -const AVAILABILITY_BARS = 30; +const AVAILABILITY_BARS = 60; type PublicMonitorLike = Pick< PublicMonitor, @@ -189,7 +189,7 @@ export function MonitorCard({ - {/* Availability (30d) */} + {/* Availability (60d) */}