fix(ui): clearer hold reasons, aligned details and chart states

Render the hold reason as a sentence, pluralise counts, give the details grid a fixed rhythm, use distinct registry colours, label the plotted series, and show a note for a single day of history.
This commit is contained in:
2026-11-24 01:27:22 +00:00
parent 6e8ac5265c
commit ad8295455d
19 changed files with 203 additions and 51 deletions
+2 -1
View File
@@ -123,6 +123,7 @@ import VulnerabilityBadge from './VulnerabilityBadge.vue'
import { usePackageStore, type Package, type VulnerabilityCounts } from '../stores/packages'
import { displayVersion, withVersionPrefix } from '@/lib/format'
import { packageRoute } from '@/lib/packages'
import { humanReason } from '@/lib/reason'
import { faCircleCheck, faRotateRight } from '@/lib/icons'
import { NO_VULNERABILITIES, SEVERITY_LEVELS, formatSeverityName, type SeverityLevel } from '@/lib/severity'
import { verdictOf } from '@/lib/verdict'
@@ -221,7 +222,7 @@ const BASE_COLUMNS: DataTableColumn<Package>[] = [
const SCANNED: DataTableColumn<Package> = { key: 'scanned', header: 'Last scanned', accessor: (p) => Date.parse(p.vulnerabilities?.scannedAt ?? '') || 0 }
function columnsFor(name: TabName): DataTableColumn<Package>[] {
if (name === 'held') return [...BASE_COLUMNS, { key: 'reason', header: 'Why', accessor: (p) => p.vulnerabilities?.reason ?? '' }, SCANNED]
if (name === 'held') return [...BASE_COLUMNS, { key: 'reason', header: 'Why', accessor: (p) => humanReason(p.vulnerabilities?.reason) }, SCANNED]
if (name === 'bypassed') return [...BASE_COLUMNS, { key: 'bypass', header: 'Bypass', accessor: (p) => p.vulnerabilities?.bypass?.created_by ?? '' }, SCANNED]
return [...BASE_COLUMNS, SCANNED]
}