fix(ui): empty states wait for the first read to settle (#1742)
Quality / check (push) Successful in 6m42s
deploy / gate (push) Successful in 4m49s
deploy / archied-image (push) Successful in 3m27s
deploy / agent-image (push) Successful in 11s
deploy / dist-zip (push) Skipped

Skills, curators, QuickTask's workflow list, the alerts bell and the
extensions catalogue now show a loading state until the first read
settles, then the data, the error, or the empty state. Draft-backed lists
(agent profiles, playbooks, credential bindings) show their empty state
only once the draft exists, not beside the load error.
This commit is contained in:
sam committed 2026-11-07 00:54:25 +11:00
1 parent c6f70de82d
commit 820beda72f
10 files changed
+28 -7

No files matched your search

+1 -1
View File
@@ -51,7 +51,7 @@ function patch(key: string, changes: Partial<Profile>) {
<Input v-model="name" aria-label="Profile name" placeholder="Profile name" class="max-w-xs" :disabled="unsaved" />
<Button type="submit" :disabled="unsaved || !name.trim() || !!profiles?.[name.trim()]">Add profile</Button>
</form>
<Empty v-if="!Object.keys(profiles ?? {}).length"><EmptyHeader><EmptyTitle>No agent profiles</EmptyTitle></EmptyHeader></Empty>
<Empty v-if="profiles && !Object.keys(profiles).length"><EmptyHeader><EmptyTitle>No agent profiles</EmptyTitle></EmptyHeader></Empty>
<CardAccordion v-model:open="open" :items="entries" :title="([key]) => key" remove-label="Remove" mono @remove="removeProfile">
<template #default="{ item: [key, profile] }">
<FieldGroup class="@container/field-group">
+1 -1
View File
@@ -51,7 +51,7 @@ function patch(index: number, changes: Partial<Binding>) {
<PageHeader title="Credential bindings"><HistoryLink :kinds="[KIND]" /><Button :disabled="unsaved" @click="add">Add binding</Button></PageHeader>
<ApplyStatusRows :kind="KIND" class="mb-4" />
<Alert v-if="store.catalogError || store.pageErrorFor(KIND)" variant="destructive" class="mb-4"><AlertDescription>{{ store.catalogError || store.pageErrorFor(KIND) }}</AlertDescription></Alert>
<Empty v-if="!bindings?.length"><EmptyHeader><EmptyTitle>No credential bindings</EmptyTitle></EmptyHeader></Empty>
<Empty v-if="bindings && !bindings.length"><EmptyHeader><EmptyTitle>No credential bindings</EmptyTitle></EmptyHeader></Empty>
<CardAccordion v-model:open="open" :items="bindings ?? []" :title="(b) => b.service || 'New binding'" remove-label="Remove" mono @remove="remove">
<template #default="{ item: binding, index }">
<FieldGroup class="@container/field-group">
+2 -1
View File
@@ -96,7 +96,8 @@ const groups = computed(() => {
</ul>
</section>
<Empty v-if="!groups.length" class="py-6">
<p v-if="!store.catalogueLoaded && !store.catalogueError" class="py-6 text-center text-label text-fg-muted" role="status">Loading catalogue…</p>
<Empty v-else-if="!groups.length" class="py-6">
<EmptyHeader>
<EmptyTitle>{{ store.catalogue.length ? "No extensions match" : "The catalogue is empty" }}</EmptyTitle>
</EmptyHeader>
+1 -1
View File
@@ -41,7 +41,7 @@ function remove(index: number) {
<ApplyStatusRows :kind="KIND" class="mb-4" />
<Alert v-if="store.catalogError || store.pageErrorFor(KIND)" variant="destructive" class="mb-4"><AlertDescription>{{ store.catalogError || store.pageErrorFor(KIND) }}</AlertDescription></Alert>
<form class="mb-4 flex flex-wrap gap-2" @submit.prevent="add"><Input v-model="id" aria-label="Playbook ID" placeholder="Playbook ID" class="max-w-xs" :disabled="unsaved" /><Button type="submit" :disabled="unsaved || !id.trim() || collection?.playbooks.some(entry => entry.id === id.trim())">Add playbook</Button></form>
<Empty v-if="!collection?.playbooks.length"><EmptyHeader><EmptyTitle>No playbooks installed</EmptyTitle></EmptyHeader></Empty>
<Empty v-if="collection && !collection.playbooks.length"><EmptyHeader><EmptyTitle>No playbooks installed</EmptyTitle></EmptyHeader></Empty>
<CardAccordion v-model:open="open" :items="collection?.playbooks ?? []" :title="(entry) => entry.id" remove-label="Remove" mono @remove="remove">
<template #default="{ item: entry, index }">
<form.Field v-if="form" v-slot="{ field }" :name="`playbooks[${index}].yaml`">