fix(ui): trim settings prose, inline switches, wrap narrow add forms

This commit is contained in:
sam committed 2026-10-18 15:02:00 +11:00
1 parent bd83be3862
commit 6368cc783a
18 files changed
+48 -85

No files matched your search

+1 -1
View File
@@ -38,7 +38,7 @@ function tools(profile: Profile, value: string | number) {
<PageHeader title="Agent profiles"><HistoryLink :kinds="[KIND]" /></PageHeader>
<ApplyStatusRows :kind="KIND" class="mb-4" />
<p v-if="store.catalogError || store.pageErrorFor(KIND)" class="mb-4 text-sm text-destructive" role="alert">{{ store.catalogError || store.pageErrorFor(KIND) }}</p>
<form class="mb-4 flex gap-2" @submit.prevent="add">
<form class="mb-4 flex flex-wrap gap-2" @submit.prevent="add">
<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>
+2 -3
View File
@@ -9,9 +9,8 @@ import {
} from "@/components/ui/card";
/**
* One titled card of the System surface. Every card on the six pages opens the
* same way, so it is a component rather than six copies of the same CardHeader
* markup. A description is reserved for context the card cannot show itself.
* One titled card of the System surface. A description is reserved for context
* the card cannot show itself.
*
* The card owns its own bottom margin: the pages stack cards directly, with
* nothing between them.
-5
View File
@@ -61,11 +61,6 @@ function addConnection() {
class="mb-4"
/>
<p class="mb-4 max-w-prose text-sm text-muted-foreground">
Connect your organisation to GitHub or another Git service, then choose which agents can
access your repositories.
</p>
<p v-if="catalogError || error" class="mb-4 text-sm text-danger" role="alert">
{{ catalogError || error }}
</p>
+2 -3
View File
@@ -21,9 +21,8 @@ import HistoryLink from "./HistoryLink.vue";
const KIND = "container-runtime-policies";
// The stored document is containerRuntimePolicies on the wire, with snake_case
// keys and durations as Go duration strings (archie-core-qna6). Named agent
// profiles are no longer part of it: they moved to the agent-profiles resource.
// The stored document is containerRuntimePolicies on the wire: snake_case keys
// and durations as Go duration strings.
interface ContainerRuntime {
image: string;
max_concurrency: number;
+1 -1
View File
@@ -82,7 +82,7 @@ const tones = {
</div>
<Badge v-if="tones[stage(extension)].tone" :variant="tones[stage(extension)].tone">{{ tones[stage(extension)].label }}</Badge>
<div v-if="extension.pending" class="w-full rounded-md border border-border px-3 py-2">
<p class="text-xs font-medium">Update waiting for approval, it adds:</p>
<p class="text-xs font-medium">Update awaiting approval. It adds:</p>
<ul class="font-mono text-xs">
<li v-for="line in grants(extension.pending.added).filter((l) => !l.startsWith('network:'))" :key="line">{{ line }}</li>
</ul>
+7 -7
View File
@@ -152,20 +152,20 @@ const restorable = (entry: AuditEntry) =>
<Table class="table-fixed">
<TableHeader>
<TableRow>
<TableHead class="w-28">When</TableHead>
<TableHead class="w-48">Section</TableHead>
<TableHead class="w-40">Field</TableHead>
<TableHead class="w-20">When</TableHead>
<TableHead class="w-36">Section</TableHead>
<TableHead class="w-24">Field</TableHead>
<TableHead>Change</TableHead>
<TableHead class="w-16">Version</TableHead>
<TableHead class="w-56">Changed by</TableHead>
<TableHead class="w-24"><span class="sr-only">Actions</span></TableHead>
<TableHead class="w-14">Version</TableHead>
<TableHead class="w-32">Changed by</TableHead>
<TableHead class="w-20"><span class="sr-only">Actions</span></TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow v-for="entry in rows" :key="entry.id" class="align-top">
<TableCell class="text-fg-muted" :title="entry.at">{{ entry.at ? ago(entry.at) : "" }}</TableCell>
<TableCell class="truncate">{{ titles.get(entry.record_key) ?? entry.record_key }}</TableCell>
<TableCell class="truncate font-mono text-xs">{{ entry.field || "whole value" }}</TableCell>
<TableCell class="truncate font-mono text-xs" :title="entry.field">{{ entry.field || "whole value" }}</TableCell>
<TableCell class="font-mono text-xs whitespace-normal">
<button
type="button"
+3 -6
View File
@@ -97,11 +97,8 @@ const args = computed({
</label>
</template>
<div class="flex flex-wrap items-center gap-x-6 gap-y-2 text-sm">
<label class="flex items-center gap-2">
<Switch v-model="server.parallel_tool_calls" />
Parallel tool calls</label>
<span v-if="server.headers_configured" class="text-xs text-fg-subtle">Headers supplied at startup</span>
</div>
<label class="flex items-center gap-2 text-sm">
<Switch v-model="server.parallel_tool_calls" />
Parallel tool calls</label>
</div>
</template>
+1 -1
View File
@@ -33,7 +33,7 @@ function add() {
<PageHeader title="Playbooks"><HistoryLink :kinds="[KIND]" /></PageHeader>
<ApplyStatusRows :kind="KIND" class="mb-4" />
<p v-if="store.catalogError || store.pageErrorFor(KIND)" class="mb-4 text-sm text-destructive" role="alert">{{ store.catalogError || store.pageErrorFor(KIND) }}</p>
<form class="mb-4 flex 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>
<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>
<p v-if="!collection?.playbooks.length" class="text-sm text-fg-muted">No playbooks installed.</p>
<CardAccordion v-model:open="open" :items="collection?.playbooks ?? []" :title="(entry) => entry.id" remove-label="Remove" mono @remove="collection!.playbooks.splice($event, 1)">
<template #default="{ item: entry, index }">
+2 -1
View File
@@ -15,8 +15,9 @@ useIntervalFn(store.load, 15_000);
<PageHeader title="Secret engines">
<Button variant="outline" size="sm" @click="store.load">Refresh</Button>
</PageHeader>
<p class="mb-4 text-sm text-fg-muted">Installed secret engines. Manage extension engines under <RouterLink to="/settings/extensions" class="underline">Extensions</RouterLink>.</p>
<p class="mb-4 text-sm text-fg-muted">Extension engines: <RouterLink to="/settings/extensions" class="underline">Extensions</RouterLink></p>
<p v-if="store.error" class="text-sm text-danger" role="alert">{{ store.error }}</p>
<p v-else-if="store.engines && !store.engines.length" class="text-sm text-fg-muted" role="status">No secret engines installed.</p>
<Table v-else-if="store.engines">
<TableHeader><TableRow><TableHead>Engine</TableHead><TableHead>Version</TableHead><TableHead>Source</TableHead></TableRow></TableHeader>
<TableBody><TableRow v-for="engine in store.engines" :key="engine.name"><TableCell class="font-mono">{{ engine.name }}</TableCell><TableCell class="font-mono">{{ engine.version || '—' }}</TableCell><TableCell>{{ engine.source }}</TableCell></TableRow></TableBody>
-5
View File
@@ -58,7 +58,6 @@ const count = computed(() =>
// Invalid fields block Save, and are listed in the bar so the operator knows
// before opening the review. Both read the store's one draft diff.
const invalid = computed(() => store.invalidFields);
const needsRestart = computed(() => sections.value.some((s) => s.restart));
function discardAll() {
for (const kind of store.dirtyKinds) store.resetDraft(kind);
@@ -118,10 +117,6 @@ async function save() {
</SheetDescription>
</SheetHeader>
<div class="flex-1 space-y-3 overflow-y-auto px-4 pb-4">
<p
v-if="needsRestart"
class="rounded-md border border-warn/40 bg-warn-soft px-3 py-2 text-sm text-warn"
>Restart required for some changes.</p>
<p
v-if="invalid.length"
class="rounded-md border border-danger/40 bg-danger-soft px-3 py-2 text-sm text-danger"
-4
View File
@@ -27,10 +27,6 @@ const chars = computed(() => soul.value?.text.length ?? 0);
<HistoryLink :kinds="resources.map((r) => r.kind)" />
</PageHeader>
<ApplyStatusRows v-for="resource in resources" :key="resource.kind" :kind="resource.kind" class="mb-4" />
<p class="mb-4 max-w-prose text-sm text-muted-foreground">
These instructions are set at the organisation level. All agent runs use them by default,
along with any instructions given afterward.
</p>
<p v-if="catalogError || error" class="mb-4 text-sm text-danger" role="alert">
{{ catalogError || error }}
+2 -5
View File
@@ -17,11 +17,8 @@ const { density, motion, theme, tooltipsEnabled } = storeToRefs(appearance);
const { setDensity, setMotion, setTheme, setTooltips } = appearance;
/**
* Appearance: how the dashboard looks, on this browser.
*
* These preferences are browser-local and apply immediately. They are grouped
* into one bounded surface so labels and controls can be read together instead
* of making the operator scan opposite edges of several full-width cards.
* Appearance: how the dashboard looks, on this browser. These preferences are
* browser-local and apply immediately.
*/
function chooseTheme(value: unknown): void {
if (value === "system" || value === "light" || value === "dark")
+1 -1
View File
@@ -199,7 +199,7 @@ const eyebrow = "mb-2 text-[11px] font-medium tracking-[0.06em] text-fg-subtle u
<Trash2 />
</Button>
</div>
<form class="flex gap-2 border-t border-border px-4 py-3" @submit.prevent="addAlias">
<form class="flex flex-wrap gap-2 border-t border-border px-4 py-3" @submit.prevent="addAlias">
<Input v-model="newAlias" class="max-w-56 font-mono" placeholder="alias" aria-label="New alias" />
<Button type="submit" variant="outline" size="sm" :disabled="!newAlias.trim()"><Plus data-icon="inline-start" />Add alias</Button>
</form>
+1 -1
View File
@@ -237,7 +237,7 @@ async function checkAccess(repo:Repo):Promise<void>{
</template>
</CardAccordion>
<div class="flex gap-2">
<div class="flex flex-wrap items-center gap-2">
<Input v-model="newRepo" class="max-w-72 font-mono" placeholder="owner/repository" aria-label="New repository" :disabled="unsaved" @keydown.enter="addRepo" />
<Button variant="outline" size="sm" :disabled="unsaved || !/^[^/\s]+\/[^/\s]+$/.test(newRepo.trim())" @click="addRepo">
<Plus data-icon="inline-start" /> Add repository</Button>
-1
View File
@@ -37,7 +37,6 @@ onUnmounted(() => clearInterval(timer));
<CardTitle>Startup settings</CardTitle>
</CardHeader>
<CardContent>
<p class="mb-2 text-fg-subtle">Restart required for changes.</p>
<Table>
<TableBody>
<TableRow v-for="(reason, key) in config.bootstrap" :key="key">
+12 -16
View File
@@ -84,7 +84,7 @@ watch(
},
);
const eyebrow = "mb-1 text-[11px] font-medium tracking-[0.06em] text-fg-subtle uppercase";
const eyebrow = "text-[11px] font-medium tracking-[0.06em] text-fg-subtle uppercase";
</script>
<template>
@@ -114,13 +114,11 @@ const eyebrow = "mb-1 text-[11px] font-medium tracking-[0.06em] text-fg-subtle u
</div>
</div>
<h2 :class="[eyebrow, 'mt-10']">MiniMax</h2>
<SettingRow label="Enabled">
<div class="flex flex-wrap items-center gap-3">
<Switch v-model="tools.minimax.enabled" aria-label="MiniMax enabled" />
<DraftHint :kind="KIND" path="minimax.enabled" />
</div>
</SettingRow>
<div class="mt-10 flex items-center gap-3">
<h2 :class="[eyebrow, 'flex-1']">MiniMax</h2>
<DraftHint :kind="KIND" path="minimax.enabled" />
<Switch v-model="tools.minimax.enabled" aria-label="MiniMax enabled" />
</div>
<SettingRow label="API key">
<SecretRefField
v-model="tools.minimax.api_key_ref"
@@ -129,16 +127,14 @@ const eyebrow = "mb-1 text-[11px] font-medium tracking-[0.06em] text-fg-subtle u
/>
</SettingRow>
<SettingRow label="MiniMax URL" for="minimax-url">
<SettingRow label="URL" for="minimax-url">
<div class="flex flex-wrap items-center gap-3"><Input id="minimax-url" v-model="tools.minimax.base_url" class="max-w-md font-mono" /><DraftHint :kind="KIND" path="minimax.base_url" /></div>
</SettingRow>
<h2 :class="[eyebrow, 'mt-10']">Web fetch</h2>
<SettingRow label="Enabled">
<div class="flex flex-wrap items-center gap-3">
<Switch v-model="webFetchOn" aria-label="Web fetch enabled" />
<DraftHint :kind="KIND" path="web_fetch.enabled" />
</div>
</SettingRow>
<div class="mt-10 flex items-center gap-3">
<h2 :class="[eyebrow, 'flex-1']">Web fetch</h2>
<DraftHint :kind="KIND" path="web_fetch.enabled" />
<Switch v-model="webFetchOn" aria-label="Web fetch enabled" />
</div>
<SettingRow label="Max download" for="wf-bytes">
<div class="flex flex-wrap items-center gap-3">
<ByteSizeInput id="wf-bytes" v-model="tools.web_fetch.max_bytes" :disabled="!webFetchOn" />
+12 -22
View File
@@ -15,13 +15,9 @@ import {
import { ApiError, api } from "@/lib/api";
/**
* Per-component versions and the update that applies them.
*
* Everything behind this card already exists: /api/version reports what is
* running, what the check command claims, what is available, and the honest
* status between those (ok, update_available, drift, unknown); the install
* endpoint re-validates freshness and refuses a stale snapshot. This card
* only surfaces them.
* Per-component versions and the update that applies them: /api/version reports
* what is running, what the check command claims, what is available and the
* status between those (ok, update_available, drift, unknown).
*/
interface ComponentVersion {
@@ -97,8 +93,8 @@ async function load(): Promise<void> {
}
}
// The snapshot the install endpoint demands is the one the operator saw --
// the endpoint re-checks freshness and answers 409 when releases moved.
// The snapshot the install endpoint demands is the one the operator saw: the
// endpoint re-checks freshness and answers 409 when releases moved.
function installableSnapshot(): unknown {
return snapshot.value && available.value.length ? snapshot.value : null;
}
@@ -168,19 +164,13 @@ onMounted(load);
</TableBody>
</Table>
<div
v-if="canInstall && updateable.length"
class="mt-4 flex flex-col gap-2"
>
<Button class="self-start" :disabled="installing" @click="install">
{{
installing
? "Installing…"
: `Install ${updateable.map((c) => c.label || c.id).join(", ")}`
}}
</Button>
<p v-if="installing" class="text-xs text-fg-muted">Restart continues in the background.</p>
</div>
<Button class="mt-4 self-start" :disabled="installing" @click="install">
{{
installing
? "Installing…"
: `Install ${updateable.map((c) => c.label || c.id).join(", ")}`
}}
</Button>
<div
v-if="installProgress.length"
+1 -2
View File
@@ -13,8 +13,7 @@ import { parseGoDuration } from "../components/ui/duration-input/duration.ts";
* server's by internal/app/controlplane/testdata/dashboard-validators.json:
* a Go test runs the server validators over that fixture and this file's
* tests run these validators over the same cases, so changing one side alone
* fails a test (archie-core-ui-dashboard-3). Add a case to the fixture, not to
* one side only.
* fails a test. Add a case to the fixture, not to one side only.
*/
/** One field that must be fixed before its section can be saved. `path` is the