From 2e26f555c5c795e53cdc793173853c7f3ddfcebc Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Fri, 29 May 2026 14:33:53 +0300 Subject: [PATCH] fix(dashboard): count Recent workloads by source_kind, not raw rows The Recent-workloads badge and empty-state guard used workloads.length (which includes legacy kind:site rows with empty source_kind) while the list renders pluginWorkloads (source_kind != ''). With one legacy row and no real workloads the badge showed "1" over an empty list and the empty state never appeared. Both now use pluginWorkloads, matching the list and the headline Total count. --- web/src/routes/+page.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/routes/+page.svelte b/web/src/routes/+page.svelte index 55bd0e1..7ff495f 100644 --- a/web/src/routes/+page.svelte +++ b/web/src/routes/+page.svelte @@ -186,7 +186,7 @@ 0 ? String(workloads.length) : ''} + badge={!loading && pluginWorkloads.length > 0 ? String(pluginWorkloads.length) : ''} > {#if loading}
@@ -205,7 +205,7 @@ {$t('dashboard.retry')}
- {:else if workloads.length === 0} + {:else if pluginWorkloads.length === 0}