From 8d39586de5a12d8a44602c9765ebb09fb91187b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Thu, 3 Sep 2026 12:47:09 +0100 Subject: [PATCH] two minutes, not ten MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The way this gets used is: ship a plugin, open the page, look for the badge. Ten minutes of that is indistinguishable from the feature not working — a release tagged at 12:42 was invisible at 12:45 because the last fetch was at 12:37, which is correct and no comfort. Bounded by the page being open: nothing fetches when nobody is looking. Co-Authored-By: Claude Opus 5 (1M context) --- src/servers/plugins/release.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/servers/plugins/release.ts b/src/servers/plugins/release.ts index 40a2fe9c..3dc90259 100644 --- a/src/servers/plugins/release.ts +++ b/src/servers/plugins/release.ts @@ -73,7 +73,18 @@ export type ReleaseState = { * Failure is silence. A checkout with no remote, an unreachable host, a repository that has moved — none * of those should surface as anything, because the list still has a true answer without them. */ -const REFRESH_MS = 10 * 60 * 1000; +/* + Two minutes, and the number is chosen for how releases are actually watched. + + It was ten. The way this gets used is: ship a plugin, open the page, look for the badge — and ten + minutes of that is indistinguishable from the feature not working. A release tagged at 12:42 was + invisible at 12:45 because the last fetch happened at 12:37, which is correct behaviour and no comfort. + + The cost is bounded by the page being open: nothing fetches when nobody is looking, and the fetches are + chained, so the worst case is one small round trip per plugin every two minutes while somebody watches + the plugins screen. +*/ +const REFRESH_MS = 2 * 60 * 1000; const fetchedAt = new Map(); let queue: Promise = Promise.resolve();