feat(webui): make the dashboard responsive and add loading and empty states

Every tab row scrolls sideways instead of being clipped by its card.
On phones this hid tabs, such as the Config change helper's last forms
at 360-390px. The login button has a larger touch target, and long
names are truncated with a tooltip.

Loading and empty states:
- Skeletons show only while a selection has no data yet, never over
  data already on screen during a refresh.
- Empty states name the next step to take.
- Error states offer a Retry button that shows progress, and each card
  keeps its own error.
- Toasts confirm copies and key generation, and report background
  failures once per streak through polite and assertive live regions.

Other changes:
- The access matrix switches between Models, MCP servers and Agents,
  and says "none configured" only once its data has loaded.
- Home ranks the top 5 users by cost, requests or tokens. It requests
  only the needed metrics and warns before a range exceeds the
  server's key cap.
- MCP and agent deep links accept a bare target name.

admin_assets_gen.go is regenerated.

Claude-Session: https://claude.ai/code/session_01V5jYJNxpDFdJkyyExpADrv
This commit is contained in:
2026-09-23 23:02:22 +01:00
parent 95a3a0e235
commit cf308624af
57 changed files with 3621 additions and 446 deletions
+17 -2
View File
@@ -119,12 +119,27 @@ export const useReliabilityStore = defineStore('reliability', {
}),
actions: {
async fetch(): Promise<void> {
const dashboard = useDashboardStore()
/**
* dashboard.overview not having loaded yet (live-preview fix) means
* the fleet's provider list is UNKNOWN, not genuinely zero — a
* no-op here, rather than falling into the zero-providers
* short-circuit below, which used to resolve `lastUpdated`/`buckets`
* as "loaded, empty" before the dashboard's own first poll had even
* landed, briefly rendering an empty chart grid on a cold reload
* instead of a skeleton. ReliabilityPage.vue's own watch on
* `dashboard.overview?.providers.length` re-fires this fetch the
* moment overview actually loads, so nothing is lost by skipping it
* here — this.loading/buckets/error are left exactly as they were.
*/
const overview = dashboard.overview
if (overview === null) return
const requestId = ++this.reqId
this.loading = true
try {
const filters = useFiltersStore()
const dashboard = useDashboardStore()
const providerNames = (dashboard.overview?.providers ?? []).map((p) => p.name)
const providerNames = overview.providers.map((p) => p.name)
if (providerNames.length === 0) {
if (requestId !== this.reqId) return