Compare commits

...
3 Commits
Author SHA1 Message Date
lukaszraczylo 5518d02599 fix(ui): size the last table column for the full sort button bleed
The sort button is 1rem wider than its cell but shifts left only by the cell padding. The last column now pads by the difference, so no table scrolls sideways.
2026-11-24 02:23:05 +00:00
lukaszraczylo 547f41677a fix(ui): stop the package tables scrolling sideways by a few pixels
The library sort button bleeds 0.5rem past its cell. The workbench
pack pads cells by 0.4rem, so the last column overflowed the table
and showed a horizontal scrollbar.
2026-11-24 02:19:45 +00:00
lukaszraczylo 7b8ff467b8 fix(ui): load each overview panel once
The download trend, leaderboards and scanner health sat inside the
stats loading branch. A stats refresh unmounted and remounted them,
so every panel fetched its data twice on each visit.
2026-11-24 02:19:44 +00:00
3 changed files with 27 additions and 6 deletions
+9
View File
@@ -46,6 +46,15 @@ async function open() {
}
describe('Overview', () => {
it('fetches each panel once while the stats load', async () => {
await open()
const urls = vi.mocked(axios.get).mock.calls.map(([url]) => String(url))
const count = (prefix: string) => urls.filter((u) => u.startsWith(prefix)).length
expect(count('/api/stats/timeseries')).toBe(1)
expect(count('/api/analytics/trending')).toBe(1)
expect(urls.filter((u) => u.includes('layout=rows')).length).toBe(1)
})
it('counts each verdict from the stats', async () => {
const { wrapper, problems } = await open()
expect(problems).toEqual([])
+13 -6
View File
@@ -40,17 +40,25 @@
<template #icon><Icon :icon="tile.icon" :class="VERDICT_TEXT[tile.verdict]" /></template>
</KpiTile>
</StatGroup>
</template>
<div class="grid items-start gap-6 xl:grid-cols-3">
<CacheCapacity :used="displayStats?.total_size ?? 0" :max-size="displayStats?.max_cache_size ?? 0" :registries="registries" />
<DownloadTrend class="xl:col-span-2" />
</div>
<!-- Outside the stats loading chain: a stats refresh must not remount these and refetch their data. -->
<div class="grid items-start gap-6 xl:grid-cols-3">
<CacheCapacity
v-if="displayStats"
:used="displayStats.total_size ?? 0"
:max-size="displayStats.max_cache_size ?? 0"
:registries="registries"
/>
<LoadingState v-else-if="loading" variant="card" label="Loading cache capacity..." />
<DownloadTrend class="xl:col-span-2" />
</div>
<TopPackages />
<div class="grid gap-6 lg:grid-cols-2">
<ScannerHealth />
<Card class="min-w-0" data-testid="ws-event-feed">
<Card v-if="!(error && !displayStats)" class="min-w-0" data-testid="ws-event-feed">
<CardHeader>
<CardTitle as="h2">Live activity</CardTitle>
<CardDescription>What the proxy just did.</CardDescription>
@@ -67,7 +75,6 @@
</CardContent>
</Card>
</div>
</template>
</div>
</template>
+5
View File
@@ -134,3 +134,8 @@ html {
scroll-behavior: auto !important;
}
}
/* The library sort button is 1rem wider than its cell but shifts left only by the cell padding, so the last column overflows the table. */
[data-slot='table-head']:last-child {
padding-right: calc(1rem - var(--spacing) * 2);
}