fix: bump UI on failure=null to clear n/a when server is idle

This commit is contained in:
Troed Sångberg
2026-06-14 19:48:43 +02:00
parent 2dab55f509
commit f473ab98e2
2 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@troed/oc-ls-stats",
"version": "1.0.8",
"version": "1.0.10",
"type": "module",
"exports": {
"./tui": {
+8 -1
View File
@@ -313,6 +313,7 @@ const tui: TuiPlugin = async (api) => {
continue
}
tracker.failure = null
bump()
debug(`poll baseUrl=${baseUrl} slots=${JSON.stringify(slotList)}`)
@@ -324,7 +325,13 @@ const tui: TuiPlugin = async (api) => {
for (const slotId of prevProcessingSlotIds) {
if (!currProcessingSlotIds.has(slotId)) {
delete tracker.prevNdBySlot[slotId]
const prev = tracker.prevNdBySlot[slotId]
if (prev) {
prev.hasIncreased = false
prev.baseline = 0
} else {
delete tracker.prevNdBySlot[slotId]
}
}
}