feat(ui): redesign the dashboard as a package checkpoint

Add overview, packages with quick view, package detail tabs, a merged security page, insights, system and restyled bypasses. Old vulnerable and blocked routes redirect to the matching security tab.
This commit is contained in:
2026-11-24 01:13:09 +00:00
parent 45aa4bcace
commit 671bb0625b
50 changed files with 3022 additions and 1937 deletions
+23
View File
@@ -0,0 +1,23 @@
import { describe, expect, it } from 'vitest'
import { verdictOf, VERDICT_LABELS } from './verdict'
describe('verdictOf', () => {
it.each([
['the server verdict when present', { scanned: true, status: 'vulnerable', verdict: 'bypassed', isBlocked: false }, 'bypassed'],
['held for a blocked package from an older server', { scanned: true, status: 'vulnerable', isBlocked: true }, 'held'],
['cleared for a scanned package from an older server', { scanned: true, status: 'clean' }, 'cleared'],
['pending for an unscanned package', { scanned: false, status: 'pending' }, 'pending'],
] as const)('%s', (_name, vulnerabilities, want) => {
expect(verdictOf({ vulnerabilities: { ...vulnerabilities } })).toBe(want)
})
it('is unscanned when the server sends no scan block, as with scanning off', () => {
expect(verdictOf({})).toBe('unscanned')
})
})
describe('VERDICT_LABELS', () => {
it('uses the checkpoint vocabulary', () => {
expect(VERDICT_LABELS).toMatchObject({ cleared: 'Cleared', held: 'Held', bypassed: 'Bypassed', pending: 'Awaiting scan' })
})
})