fix(ui): empty states wait for the first read to settle (#1742)
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:
10 files changed
+28
-7
No files matched your search
@@ -78,6 +78,7 @@ export const useExtensionsStore = defineStore("extensions", () => {
|
||||
const extensions = ref<Extension[]>([]);
|
||||
const catalogue = ref<CatalogueEntry[]>([]);
|
||||
const catalogueError = ref("");
|
||||
const catalogueLoaded = ref(false);
|
||||
const error = ref("");
|
||||
const busy = ref("");
|
||||
|
||||
@@ -97,6 +98,8 @@ export const useExtensionsStore = defineStore("extensions", () => {
|
||||
catalogueError.value = "";
|
||||
} catch (cause) {
|
||||
catalogueError.value = String((cause as Error).message || cause);
|
||||
} finally {
|
||||
catalogueLoaded.value = true;
|
||||
}
|
||||
}
|
||||
async function mutate(key: string, action: () => Promise<unknown>): Promise<boolean> {
|
||||
@@ -119,6 +122,7 @@ export const useExtensionsStore = defineStore("extensions", () => {
|
||||
}
|
||||
const path = (name: string) => `/api/extensions/${encodeURIComponent(name)}`;
|
||||
return {
|
||||
catalogueLoaded,
|
||||
forges,
|
||||
forgeName,
|
||||
extensions,
|
||||
|
||||
Reference in new issue
Block a user