fix(frontend): show load failures as errors and add a not-found route

A failed request left the store error set while the view kept its own
empty-list branch, so the page said nothing was cached. Every view now
checks loading, then error, then content, and the retry button refetches.
Unknown paths render a NotFound page with a link to the dashboard. The brand
shares the sidebar left edge, and a stopped socket reads Live updates paused
in a neutral tone; the client already retries with backoff.
This commit is contained in:
2026-11-23 02:29:14 +00:00
parent 24dfb6eace
commit 81e3f9c74f
13 changed files with 253 additions and 85 deletions
+8 -5
View File
@@ -16,16 +16,16 @@
<SearchInput v-model="searchTerm" aria-label="Search packages" placeholder="Search packages..." class="w-full sm:ms-auto sm:w-64" />
</div>
<LoadingState v-if="loading" variant="table" label="Loading packages..." />
<ErrorState
v-if="error"
v-else-if="error"
variant="card"
title="Could not load packages"
:message="error"
@retry="store.fetchPackages()"
/>
<LoadingState v-if="loading" variant="table" label="Loading packages..." />
<Card v-else>
<CardContent>
<EmptyState
@@ -282,8 +282,11 @@ async function deletePackage() {
showDeleteModal.value = false
packageToDelete.value = null
const label = `${target.name}@${target.version}`
if (store.error) toasts.error('Could not delete package', `${label}: ${store.error}`)
else toasts.success('Package deleted', label)
if (store.error) {
toasts.error('Could not delete package', `${label}: ${store.error}`)
// The toast reports it; the list loaded fine, so it must not be replaced by a load error.
store.error = null
} else toasts.success('Package deleted', label)
}
function showVulnerabilityDetails(registry: string, name: string, version: string) {