From 7addbb3165ac3fa3295e0f1a588bb93eb3d63bf0 Mon Sep 17 00:00:00 2001
From: ajvpot <553597+ajvpot@users.noreply.github.com>
Date: Sun, 14 Sep 2025 18:26:47 +0200
Subject: [PATCH] update stats and path viz to use 2 day last seen time
---
src/app/(app)/stats/page.tsx | 2 +-
src/app/api/stats/repeater-prefixes/route.ts | 2 +-
src/components/PathVisualization.tsx | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app/(app)/stats/page.tsx b/src/app/(app)/stats/page.tsx
index 13f0754..4a10cba 100644
--- a/src/app/(app)/stats/page.tsx
+++ b/src/app/(app)/stats/page.tsx
@@ -128,7 +128,7 @@ export default function StatsPage() {
Used Repeater Prefixes
- Shows repeater nodes grouped by the first byte of their public key, seen within the last 7 days.
+ Shows repeater nodes grouped by the first byte of their public key, seen within the last 2 days.
diff --git a/src/app/api/stats/repeater-prefixes/route.ts b/src/app/api/stats/repeater-prefixes/route.ts
index ba75c6a..83ab7da 100644
--- a/src/app/api/stats/repeater-prefixes/route.ts
+++ b/src/app/api/stats/repeater-prefixes/route.ts
@@ -17,7 +17,7 @@ export async function GET(req: Request) {
groupArray(node_name) as node_names
FROM meshcore_adverts_latest
WHERE is_repeater = 1
- AND last_seen >= now() - INTERVAL 7 DAY
+ AND last_seen >= now() - INTERVAL 2 DAY
${regionWhereClause}
GROUP BY prefix
ORDER BY node_count DESC, prefix ASC
diff --git a/src/components/PathVisualization.tsx b/src/components/PathVisualization.tsx
index b8147a1..1609153 100644
--- a/src/components/PathVisualization.tsx
+++ b/src/components/PathVisualization.tsx
@@ -132,7 +132,7 @@ export default function PathVisualization({
exact: false,
limit: 20,
is_repeater: true, // Filter for repeaters only
- lastSeen: config?.lastSeen,
+ lastSeen: 60*60*24*2, // 2 days
region: config?.selectedRegion,
enabled: showGraph && prefix.length > 0
}))