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

+4
View File
@@ -23,6 +23,7 @@ const router = useRouter();
const prompt = ref("");
const workflow = ref("");
const definitions = ref<WorkflowDefinition[]>([]);
const loaded = ref(false);
const loadError = ref("");
const error = ref("");
const submitting = ref(false);
@@ -35,6 +36,8 @@ onMounted(async () => {
workflow.value ||= definitions.value[0]?.id ?? "";
} catch (err) {
loadError.value = String((err as Error).message || err);
} finally {
loaded.value = true;
}
});
@@ -90,6 +93,7 @@ async function run() {
<Button type="submit" :disabled="!prompt.trim() || !workflow || submitting"><Spinner v-if="submitting" data-icon="inline-start" />Run</Button>
</div>
<Alert v-if="loadError || error" variant="destructive"><AlertDescription>{{ loadError || error }}</AlertDescription></Alert>
<p v-else-if="!loaded" class="text-caption text-fg-subtle" role="status">Loading workflows…</p>
<p v-else-if="!definitions.length" class="text-caption text-fg-subtle">
No enabled workflows. <RouterLink to="/workflows" class="underline">Enable one</RouterLink>
</p>