Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions src/lib/utilities/ActiveTimer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,7 @@ export function createActiveTimer(lastUpdated: Date | null | undefined, interval
const timeDiffMs = now.getTime() - new Date(date).getTime();
const intervalMs = interval * 60 * 1000;

// Add a maximum threshold for device activity (35 minutes) regardless of interval
const MAX_ACTIVE_TIME_MS = 36 * 60 * 1000; // 35 minutes in milliseconds

// If time difference exceeds our maximum threshold, device is inactive
if (timeDiffMs > MAX_ACTIVE_TIME_MS) {
return false;
}

// Device is active if time difference is less than the configured interval
// Device is active if time difference is less than the configured interval (no hard cap)
return timeDiffMs < intervalMs;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
device.upload_interval || device.cw_device_type?.default_upload_interval || 10
);
const STALE_THRESHOLD_MS = $derived(
// Mark stale if no update in 2 * expected interval (cap between 2min and 30min)
Math.min(30, Math.max(2, EXPECTED_UPLOAD_MINUTES * 2)) * 60 * 1000
// Previously capped at 30 min and multiplied by 2. Now strictly use configured interval (in minutes) with no hard cap.
EXPECTED_UPLOAD_MINUTES * 60 * 1000
);

// Active status timer for THIS device (independent of dashboard list)
Expand Down
8 changes: 4 additions & 4 deletions static/build-info.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"commit": "2f4daa7",
"branch": "workingDateTime",
"commit": "285c3cd",
"branch": "develop",
"author": "Kevin Cantrell",
"date": "2025-08-19T17:11:48.136Z",
"date": "2025-08-24T02:09:26.294Z",
"builder": "kevin@kevin-desktop",
"ipAddress": "192.168.1.100",
"timestamp": 1755623508137
"timestamp": 1756001366295
}
File renamed without changes.