v0.5.110: stop carrying stale live badges; probe live status in local serve.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+8
-6
@@ -4749,9 +4749,9 @@ function syncStreamerCardLive(card, row) {
|
||||
|
||||
/**
|
||||
* Visit-triggered live refresh: the Pages Function coalesces concurrent
|
||||
* visitors through a 5-minute edge cache. Local `serve_relations.py` returns
|
||||
* an empty stub (no probing), so that path keeps the data.json is_live
|
||||
* fallback. Fires at most once per page load.
|
||||
* visitors through a 5-minute edge cache; the local development server uses
|
||||
* the same platform probes with a short in-memory cache. Fires at most once
|
||||
* per page load.
|
||||
*/
|
||||
let liveStatusFetched = false;
|
||||
|
||||
@@ -4776,9 +4776,11 @@ function refreshStreamerLiveStatus() {
|
||||
for (const row of rows) {
|
||||
const cell = row && row.id ? probed[row.id] : null;
|
||||
if (!cell || typeof cell.is_live !== "boolean") continue;
|
||||
if (cell.stale) console.info(`live-status: ${row.id} using stale carry-over`);
|
||||
if (row.is_live !== cell.is_live) {
|
||||
row.is_live = cell.is_live;
|
||||
// A failed/stale probe is unknown, never evidence that a room is live.
|
||||
const isLive = cell.stale ? false : cell.is_live;
|
||||
if (cell.stale) console.info(`live-status: ${row.id} probe stale; hiding badge`);
|
||||
if (row.is_live !== isLive) {
|
||||
row.is_live = isLive;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user