feat: keep live snapshots usable through refresh failures (#149)
CI / lint (pull_request) Successful in 11s
CI / build-frontend (pull_request) Successful in 4s

This commit is contained in:
timmy committed 2026-08-06 23:54:55 +00:00
1 parent db0354a6e5
commit 8ee7dbf79e
4 files changed
+238 -2

No files matched your search

+5 -1
View File
@@ -715,7 +715,11 @@ textarea { resize: vertical; min-height: 120px; }
} else {
setEventStreamStatus('Update failed · showing last activity');
}
if (snapshot.freshness?.revalidating) {
if (snapshot.freshness?.degraded && !snapshot.freshness.revalidating) {
const retrySeconds = Number(snapshot.freshness.retry_in_seconds) || 0;
setEventStreamStatus('Refresh failed · showing last known data' +
(retrySeconds > 0 ? ' · retrying in ' + retrySeconds + 's' : ''));
} else if (snapshot.freshness?.revalidating) {
setEventStreamStatus('Refreshing · showing recent snapshot');
}
}