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
-
+
{{error}} Sign in again
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"));
@@ -50,7 +50,7 @@ const when = computed(() => (props.event.at ? ago(props.event.at) : "\u2014"));
describeTimelineEvent({ ...props.event, at: undefined, detail: undefined }).title
}}
{{
- taskID > 0 ? `#${taskID}` : "—"
+ taskID > 0 ? `#${taskID}` : "–"
}}
×{{ alert.count }}
- —
+ –
{{ alert.title }}
@@ -212,7 +212,7 @@ function openTask(taskID: number) {
{{
- group.taskID > 0 ? `#${group.taskID}` : "—"
+ group.taskID > 0 ? `#${group.taskID}` : "–"
}}
= [
["min", 60],
@@ -27,7 +27,7 @@ export function ago(value: string | number | Date | null | undefined): string {
/** Compact number: 2_400_000 -> "2.4M". Long digit strings do not scan. */
export function compact(n: number | null | undefined): string {
- if (n == null || Number.isNaN(n)) return "—";
+ if (n == null || Number.isNaN(n)) return "–";
return new Intl.NumberFormat(undefined, {
notation: "compact",
maximumFractionDigits: 1,
diff --git a/ui/src/org/OrgAgentsPage.vue b/ui/src/org/OrgAgentsPage.vue
index d6d227232..87d9c754e 100644
--- a/ui/src/org/OrgAgentsPage.vue
+++ b/ui/src/org/OrgAgentsPage.vue
@@ -181,7 +181,8 @@ const isAgent = (value: Identity) =>
-
+ Loading agents…
+
No identities yet
diff --git a/ui/src/org/OrgMembersPage.vue b/ui/src/org/OrgMembersPage.vue
index ed8aee96f..dd16307cc 100644
--- a/ui/src/org/OrgMembersPage.vue
+++ b/ui/src/org/OrgMembersPage.vue
@@ -4,7 +4,7 @@ import CreateAccount from "@/accounts/CreateAccount.vue";
import { Card, CardContent } from "@/components/ui/card";
import { storeToRefs } from "pinia";
import { computed, onMounted, ref } from "vue";
-import { Plus } from "@lucide/vue";
+import { Plus, Trash2 } from "@lucide/vue";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
@@ -26,7 +26,7 @@ import {
} from "@/components/ui/table";
import { api } from "@/lib/api";
import { useOrgStore } from "@/stores/org";
-import { ROLES, type Member, type Role } from "./org";
+import { ROLE_LABELS, ROLES, type Member, type Role } from "./org";
/**
* The org's members and the role each holds. A membership is org-wide, or
@@ -35,6 +35,7 @@ import { ROLES, type Member, type Role } from "./org";
*/
const members = ref([]);
const error = ref("");
+const loading = ref(true);
const busy = ref("");
const identities = useOrgStore();
const { org } = storeToRefs(identities);
@@ -61,12 +62,13 @@ async function load(): Promise {
onMounted(async () => {
try {
await identities.loadOrg();
+ identities.watchIdentities();
+ await load();
} catch (cause) {
error.value = String((cause as Error).message || cause);
- return;
+ } finally {
+ loading.value = false;
}
- identities.watchIdentities();
- await load();
});
// Active identities that hold no org-wide membership yet, so Add cannot pick
@@ -159,22 +161,26 @@ const remove = (member: Member) =>
- {{ role }}
+ {{ ROLE_LABELS[role] }}
+ >
-
+
+ Loading members…
+
+
@@ -208,7 +214,7 @@ const remove = (member: Member) =>
- {{ role }}
+ {{ ROLE_LABELS[role] }}
-
+
+ Loading workspaces…
+
+
diff --git a/ui/src/org/org.ts b/ui/src/org/org.ts
index 7b8508c79..6be7dbe2b 100644
--- a/ui/src/org/org.ts
+++ b/ui/src/org/org.ts
@@ -16,6 +16,14 @@ export type Role = "owner" | "admin" | "developer" | "viewer";
/** The roles the domain accepts, in descending authority. */
export const ROLES: Role[] = ["owner", "admin", "developer", "viewer"];
+/** How a role reads wherever the dashboard offers one. */
+export const ROLE_LABELS: Record = {
+ owner: "Owner",
+ admin: "Admin",
+ developer: "Developer",
+ viewer: "Viewer",
+};
+
export interface Member {
identity_id: string;
kind: string;
diff --git a/ui/src/settings/ExtensionsPage.vue b/ui/src/settings/ExtensionsPage.vue
index 4dab0384c..4c3b9e1d7 100644
--- a/ui/src/settings/ExtensionsPage.vue
+++ b/ui/src/settings/ExtensionsPage.vue
@@ -1,6 +1,6 @@