From 2ada975065efe1169a1fa1058852b479aed638de Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Mon, 23 Nov 2026 15:12:15 +0000 Subject: [PATCH] fix(ui): name trend series by the packages they count The severity series now read "Packages with vulnerabilities", which matches the severity tiles and the snapshot counts. --- frontend/src/components/TrendChart.spec.ts | 2 +- frontend/src/components/TrendChart.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/TrendChart.spec.ts b/frontend/src/components/TrendChart.spec.ts index ed07b00..68ffc9e 100644 --- a/frontend/src/components/TrendChart.spec.ts +++ b/frontend/src/components/TrendChart.spec.ts @@ -79,7 +79,7 @@ describe('TrendChart', () => { expect(critical.attributes('aria-pressed')).toBe('true') expect(vulnerable()).toContain('with lines for critical') - expect(wrapper.text()).toContain('Critical (highest severity)') + expect(wrapper.text()).toContain('Packages with critical vulnerabilities') await critical.trigger('click') await flushPromises() diff --git a/frontend/src/components/TrendChart.vue b/frontend/src/components/TrendChart.vue index a47fe98..8d06e4e 100644 --- a/frontend/src/components/TrendChart.vue +++ b/frontend/src/components/TrendChart.vue @@ -51,7 +51,7 @@ type="multiple" variant="outline" size="sm" - aria-label="Add a line per highest severity" + aria-label="Add a line per severity" > {{ formatSeverityName(level) }} @@ -172,7 +172,7 @@ const vulnerableLabel = computed(() => { const vulnerableSeries = computed(() => [ { name: 'Vulnerable packages', data: values('vulnerable_packages'), tone: 'primary' as const }, ...SEVERITY_LEVELS.filter((level) => severities.value.includes(level)).map((level) => ({ - name: `${formatSeverityName(level)} (highest severity)`, + name: `Packages with ${level} vulnerabilities`, data: values(level), tone: SEVERITY_LINE_TONES[level], })),