From c67d475a9211f5555a6ac9946dfc4e802c8ee816 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Sun, 18 Oct 2026 15:54:00 +1100 Subject: [PATCH] fix(ui): distinguish loading, failed and empty lists, one role label set, en dash for no value --- ui/src/accounts/CreateAccount.vue | 5 +++- ui/src/captures/EventTypesCard.vue | 5 +++- ui/src/captures/event-type-state.ts | 5 ++++ ui/src/dashboard/ActivityRow.vue | 6 ++--- ui/src/dashboard/LiveActivityCard.vue | 6 ++--- ui/src/lib/format.ts | 6 ++--- ui/src/org/OrgAgentsPage.vue | 3 ++- ui/src/org/OrgMembersPage.vue | 32 +++++++++++++---------- ui/src/org/OrgWorkspacesPage.vue | 11 +++++--- ui/src/org/org.ts | 8 ++++++ ui/src/settings/ExtensionsPage.vue | 37 +++++++++++++++++---------- ui/src/settings/SecretEnginesPage.vue | 2 +- ui/src/stores/org.ts | 7 +++++ ui/src/tasks/ChangeFileTable.vue | 4 +-- ui/src/workflows/WorkflowsPage.vue | 2 +- ui/src/workflows/labels.ts | 2 +- 16 files changed, 95 insertions(+), 46 deletions(-) diff --git a/ui/src/accounts/CreateAccount.vue b/ui/src/accounts/CreateAccount.vue index f30dec26b..e01e6ccdf 100644 --- a/ui/src/accounts/CreateAccount.vue +++ b/ui/src/accounts/CreateAccount.vue @@ -4,7 +4,10 @@ import { Input } from "@/components/ui/input"; import { Button } from "@/components/ui/button"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { api } from "@/lib/api"; +import { ROLE_LABELS, ROLES } from "@/org/org"; const emit=defineEmits<{created:[]}>(); +// Owner is granted from the member table, not when creating an account. +const assignable = ROLES.filter((role) => role !== "owner"); const name=ref("");const email=ref("");const password=ref("");const role=ref("viewer");const busy=ref(false);const error=ref(""); async function create(){busy.value=true;error.value="";try{await api.createAccount({display_name:name.value,email:email.value,password:password.value,role:role.value});name.value=email.value=password.value="";emit("created")}catch(cause){error.value=String((cause as Error).message||cause)}finally{busy.value=false}} @@ -15,7 +18,7 @@ async function create(){busy.value=true;error.value="";try{await api.createAccou -
+
diff --git a/ui/src/captures/EventTypesCard.vue b/ui/src/captures/EventTypesCard.vue index 5004ee1d1..13ccd5c25 100644 --- a/ui/src/captures/EventTypesCard.vue +++ b/ui/src/captures/EventTypesCard.vue @@ -46,6 +46,7 @@ import { eventTypes, eventTypesEnabled, eventTypesError, + eventTypesLoading, nameProposal, pasteExample, pendingDelete, @@ -159,7 +160,9 @@ function fieldCount(schema: Record | null | undefined): number { - +

Loading event types…

+ + No event types yet diff --git a/ui/src/captures/event-type-state.ts b/ui/src/captures/event-type-state.ts index b5f9e592d..2ec9b95a1 100644 --- a/ui/src/captures/event-type-state.ts +++ b/ui/src/captures/event-type-state.ts @@ -27,6 +27,9 @@ export const eventTypes = ref([]); export const proposals = ref([]); export const eventTypesEnabled = ref(true); export const eventTypesError = ref(null); +/** True until the first read settled, so the list can wait instead of + * presenting a pending read as an empty one. */ +export const eventTypesLoading = ref(true); /** The editor's modes: naming a proposal, pasting an example, editing a type. */ export type DraftMode = "proposal" | "paste" | "edit"; @@ -55,6 +58,8 @@ export async function loadEventTypes(): Promise { eventTypesError.value = null; } catch (err) { eventTypesError.value = (err as Error).message || String(err); + } finally { + eventTypesLoading.value = false; } } diff --git a/ui/src/dashboard/ActivityRow.vue b/ui/src/dashboard/ActivityRow.vue index 153598ee1..b8fb288b2 100644 --- a/ui/src/dashboard/ActivityRow.vue +++ b/ui/src/dashboard/ActivityRow.vue @@ -30,10 +30,10 @@ function open() { if (taskID.value > 0) emit("open", taskID.value); } -// A missing timestamp gets an em-dash, not a call to ago(): substituting +// A missing timestamp gets a dash, not a call to ago(): substituting // Date.now() would render "just now" for an event whose time the daemon never // recorded -- a claim the row cannot back. -const when = computed(() => (props.event.at ? ago(props.event.at) : "\u2014")); +const when = computed(() => (props.event.at ? ago(props.event.at) : "\u2013"));