feat(webui): five-place top bar with Settings, New task and one connection pill

Dashboard, Tasks, Workflows, Events and Settings replace the Work, Agent
and System menus. Configuration pages move under /settings/* with
redirects from their old paths; Logs and Appearance leave the bar and stay
reachable from Jump to, the Dashboard and the account menu. New task opens
the Start work form in a dialog and lands on the new task. One pill reports
the live stream's state.

Drops docs/prds/dashboard-navigation-groups.md: web UI design is not
tracked in PRDs.
This commit is contained in:
sam committed 2026-09-25 15:09:18 +10:00
1 parent b9292e1911
commit 4ffebb855d
23 files changed
+453 -383

No files matched your search

@@ -0,0 +1,26 @@
<script setup lang="ts">
import { computed } from "vue";
import { storeToRefs } from "pinia";
import { StatusPill } from "@/components/ui/status-pill";
import { connectionStatus } from "@/lib/connection";
import { useLiveUpdatesStore } from "@/stores/live-updates";
const { streamState } = storeToRefs(useLiveUpdatesStore());
const status = computed(() => connectionStatus(streamState.value));
const pill = {
ok: { tone: "neutral", dot: "live" },
warn: { tone: "warn", dot: "warn" },
danger: { tone: "danger", dot: "danger" },
} as const;
</script>
<template>
<StatusPill
:tone="pill[status.tone].tone"
:dot="pill[status.tone].dot"
role="status"
class="max-sm:hidden"
>{{ status.label }}</StatusPill
>
</template>
+2 -2
View File
@@ -63,8 +63,8 @@ function closeMenuSoon() {
@pointerenter="openMenu"
@pointerleave="closeMenuSoon"
>
<template v-for="item in items" :key="item.path">
<DropdownMenuSeparator v-if="item.dividerBefore" />
<template v-for="(item, index) in items" :key="item.path">
<DropdownMenuSeparator v-if="item.dividerBefore && index > 0" />
<DropdownMenuLabel v-if="item.dividerBefore">{{
item.dividerBefore
}}</DropdownMenuLabel>
+1 -6
View File
@@ -26,15 +26,10 @@ import {
</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuItem as-child>
<RouterLink to="/system/appearance" class="w-full cursor-pointer"
<RouterLink to="/settings/appearance" class="w-full cursor-pointer"
>Appearance</RouterLink
>
</DropdownMenuItem>
<DropdownMenuItem as-child>
<RouterLink to="/system/status" class="w-full cursor-pointer"
>Status</RouterLink
>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</template>
+8 -9
View File
@@ -1,11 +1,13 @@
<script setup lang="ts">
import NewTaskButton from "@/tasks/NewTaskButton.vue";
import Brand from "./Brand.vue";
import ConnectionPill from "./ConnectionPill.vue";
import Nav from "./Nav.vue";
import ProfileDropdown from "./ProfileDropdown.vue";
import SearchBar from "./SearchBar.vue";
import SupportLink from "./SupportLink.vue";
defineProps<{ hidden: string[] }>();
const props = defineProps<{ hidden: string[] }>();
</script>
<template>
@@ -13,15 +15,12 @@ defineProps<{ hidden: string[] }>();
class="bg-background/80 sticky top-0 z-40 flex h-14 items-center gap-3 border-b px-3 backdrop-blur-xl sm:px-4"
>
<Brand />
<Nav :hidden="hidden" />
<div class="flex shrink-0 items-center gap-1">
<SearchBar :hidden="hidden" />
<Nav :hidden="props.hidden" />
<div class="flex shrink-0 items-center gap-2">
<SearchBar :hidden="props.hidden" />
<NewTaskButton v-if="!props.hidden.includes('/workflows')" />
<ConnectionPill />
<SupportLink />
<!--
The theme control lives on /system/appearance, not here. Two switches
for one preference is two places to look and one of them to be wrong
(docs/prds/dashboard-navigation-groups.md).
-->
<ProfileDropdown />
</div>
</header>
+13
View File
@@ -0,0 +1,13 @@
import type { StreamState } from "./stream-state";
export type ConnectionState = StreamState | "connecting";
/** What the UI calls the live stream's state, and the tone it is shown in. */
export function connectionStatus(state: ConnectionState): {
label: string;
tone: "ok" | "warn" | "danger";
} {
if (state === "live") return { label: "Connected", tone: "ok" };
if (state === "unavailable") return { label: "Disconnected", tone: "danger" };
return { label: "Connecting", tone: "warn" };
}
+89
View File
@@ -0,0 +1,89 @@
export interface NavEntry {
path: string;
label: string;
description: string;
section?: string;
dividerBefore?: string;
soon?: boolean;
}
export interface NavLink {
kind: "link";
entry: NavEntry;
}
export interface NavGroup {
kind: "group";
label: string;
items: NavEntry[];
}
export type NavNode = NavLink | NavGroup;
export interface NavRoute {
path: string;
meta?: {
label?: string;
description?: string;
section?: string;
soon?: boolean;
};
}
export type NavSpec =
| { kind: "link"; path: string }
| {
kind: "group";
label: string;
sections: { label: string; paths: string[] }[];
};
/**
* buildNav turns the specs into the bar, with the routes the serving
* composition cannot back removed. A group whose every child is hidden is
* dropped; each section's label moves to its first visible item. jumpTargets
* is everything the bar reaches plus the unlisted pages, for the Jump to box.
*/
export function buildNav(
table: NavRoute[],
specs: NavSpec[],
hidden: string[] = [],
unlisted: string[] = [],
): { tree: NavNode[]; jumpTargets: NavEntry[] } {
const entryFor = (path: string): NavEntry => {
const route = table.find((r) => r.path === path);
if (!route) throw new Error(`nav references ${path}, which is not a route`);
return {
path,
label: route.meta?.label ?? path,
description: route.meta?.description ?? "",
section: route.meta?.section,
soon: route.meta?.soon,
};
};
const visible = (path: string) => !hidden.includes(path);
const tree: NavNode[] = [];
for (const spec of specs) {
if (spec.kind === "link") {
if (visible(spec.path))
tree.push({ kind: "link", entry: entryFor(spec.path) });
continue;
}
const items = spec.sections.flatMap((section) =>
section.paths
.filter(visible)
.map(entryFor)
.map((entry, i) =>
i === 0 ? { ...entry, dividerBefore: section.label } : entry,
),
);
if (items.length > 0) tree.push({ kind: "group", label: spec.label, items });
}
const reached = tree.flatMap((node) =>
node.kind === "link" ? [node.entry] : node.items,
);
const extra = unlisted.filter(visible).map(entryFor);
return { tree, jumpTargets: [...reached, ...extra] };
}
+42 -101
View File
@@ -1,121 +1,62 @@
import { routes } from "@/router";
import {
buildNav,
type NavNode,
type NavRoute,
type NavSpec,
} from "./nav-tree";
export interface NavEntry {
path: string;
label: string;
description: string;
section?: string;
dividerBefore?: string;
soon?: boolean;
}
export type { NavEntry, NavGroup, NavLink, NavNode } from "./nav-tree";
export interface NavLink {
kind: "link";
entry: NavEntry;
}
export interface NavGroup {
kind: "group";
label: string;
items: NavEntry[];
}
export type NavNode = NavLink | NavGroup;
interface RouteMeta {
label?: string;
description?: string;
section?: string;
nav?: boolean;
navPath?: string;
soon?: boolean;
}
const table = routes as Array<{ path: string; meta?: RouteMeta }>;
// The bar reads left to right. A destination that is its own top-level thing is
// a link rather than a group of one: Events carries the three surfaces that used
// to sit in a dropdown, and a group whose only child shares its name is a menu
// that says nothing.
type NavSpec =
| { kind: "link"; path: string }
| {
kind: "group";
label: string;
paths: string[];
dividerBefore?: { path: string; label: string };
};
const table = routes as Array<NavRoute & { meta?: { navPath?: string } }>;
// Five places. Configuration lives under Settings, grouped the way the
// settings sidebar groups it (docs/design/ui-redesign/README.md, section 2).
const specs: NavSpec[] = [
{ kind: "link", path: "/" },
{
kind: "group",
label: "Work",
paths: ["/tasks", "/workflows", "/channels", "/logs"],
},
{ kind: "group", label: "Agent", paths: ["/skills", "/curators"] },
{ kind: "link", path: "/tasks" },
{ kind: "link", path: "/workflows" },
{ kind: "link", path: "/events" },
{
kind: "group",
label: "System",
paths: [
"/system/status",
"/system/appearance",
"/system/tasks",
"/system/models",
"/system/repos",
"/system/identities",
"/system/advanced",
label: "Settings",
sections: [
{
label: "Agents",
paths: [
"/settings/models",
"/settings/skills",
"/settings/curators",
"/settings/advanced",
],
},
{
label: "Integrations",
paths: [
"/settings/channels",
"/settings/repositories",
"/settings/identities",
],
},
{
label: "Runtime",
paths: ["/settings/task-execution", "/settings/status"],
},
],
dividerBefore: { path: "/system/tasks", label: "Settings" },
},
];
function entryFor(path: string): NavEntry {
const route = table.find((r) => r.path === path);
if (!route) throw new Error(`nav references ${path}, which is not a route`);
return {
path,
label: route.meta?.label ?? path,
description: route.meta?.description ?? "",
section: route.meta?.section,
soon: route.meta?.soon,
};
}
// Reached from the Dashboard's Logs button and the account menu, and by
// Jump to, but not from the bar.
const unlisted = ["/logs", "/settings/appearance"];
/**
* navTree returns the bar, with routes the serving composition cannot back
* removed. A group whose every child is hidden is dropped; a group left with
* one child stays a group, so the bar has the same shape on every deployment.
*/
export function navTree(hidden: string[] = []): NavNode[] {
const visible = (e: NavEntry) => !hidden.includes(e.path);
const nodes: NavNode[] = [];
for (const spec of specs) {
if (spec.kind === "link") {
const entry = entryFor(spec.path);
if (visible(entry)) nodes.push({ kind: "link", entry });
continue;
}
const items = spec.paths.map(entryFor).filter(visible);
const divided = items.map((item) => ({
...item,
dividerBefore:
item.path === spec.dividerBefore?.path
? spec.dividerBefore.label
: undefined,
}));
if (divided.length > 0)
nodes.push({ kind: "group", label: spec.label, items: divided });
}
return nodes;
return buildNav(table, specs, hidden).tree;
}
/** navEntries flattens the tree to the destinations it can reach. */
export function navEntries(hidden: string[] = []): NavEntry[] {
return navTree(hidden).flatMap((node) =>
node.kind === "link" ? [node.entry] : node.items,
);
/** navEntries lists every destination Jump to can reach. */
export function navEntries(hidden: string[] = []) {
return buildNav(table, specs, hidden, unlisted).jumpTargets;
}
/**
+25 -12
View File
@@ -63,7 +63,7 @@ const routes = [
},
},
{
path: "/skills",
path: "/settings/skills",
name: "skills",
component: SkillsPage,
meta: {
@@ -73,7 +73,7 @@ const routes = [
},
},
{
path: "/curators",
path: "/settings/curators",
name: "curators",
component: CuratorsPage,
meta: {
@@ -93,7 +93,7 @@ const routes = [
},
},
{
path: "/system/status",
path: "/settings/status",
name: "system-status",
component: SystemStatusPage,
meta: {
@@ -114,7 +114,7 @@ const routes = [
},
},
{
path: "/system/appearance",
path: "/settings/appearance",
name: "system-appearance",
component: SystemAppearancePage,
meta: {
@@ -123,17 +123,17 @@ const routes = [
},
},
{
path: "/system/tasks",
path: "/settings/task-execution",
name: "system-tasks",
component: SystemTasksPage,
meta: {
label: "Task settings",
label: "Task execution",
description: "Work lifecycle: statuses, operator actions, and budgets.",
section: "settings",
},
},
{
path: "/system/models",
path: "/settings/models",
name: "system-models",
component: SystemModelsPage,
meta: {
@@ -143,7 +143,7 @@ const routes = [
},
},
{
path: "/system/repos",
path: "/settings/repositories",
name: "system-repos",
component: SystemReposPage,
meta: {
@@ -154,7 +154,7 @@ const routes = [
},
},
{
path: "/system/identities",
path: "/settings/identities",
name: "system-identities",
component: SystemIdentitiesPage,
meta: {
@@ -164,7 +164,7 @@ const routes = [
},
},
{
path: "/channels",
path: "/settings/channels",
name: "channels",
component: ChannelsPage,
meta: {
@@ -174,7 +174,7 @@ const routes = [
},
},
{
path: "/system/advanced",
path: "/settings/advanced",
name: "system-advanced",
component: SystemAdvancedPage,
meta: {
@@ -183,7 +183,20 @@ const routes = [
section: "settings",
},
},
{ path: "/settings", redirect: "/system/status", meta: { nav: false } },
{ path: "/settings", redirect: "/settings/status", meta: { nav: false } },
// Paths from before Settings existed, kept for bookmarks and chat history.
...Object.entries({
"/system/status": "/settings/status",
"/system/appearance": "/settings/appearance",
"/system/tasks": "/settings/task-execution",
"/system/models": "/settings/models",
"/system/repos": "/settings/repositories",
"/system/identities": "/settings/identities",
"/system/advanced": "/settings/advanced",
"/channels": "/settings/channels",
"/skills": "/settings/skills",
"/curators": "/settings/curators",
}).map(([path, redirect]) => ({ path, redirect, meta: { nav: false } })),
];
export { routes };
+3 -8
View File
@@ -6,6 +6,7 @@ import { Badge } from "@/components/ui/badge";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Table, TableBody, TableCell, TableRow } from "@/components/ui/table";
import { api } from "@/lib/api";
import { connectionStatus } from "@/lib/connection";
import { useLiveResource, useLiveUpdatesStore } from "@/stores/live-updates";
interface HealthComponent {
@@ -24,13 +25,7 @@ const report = ref<HealthReport | null>(null);
const error = ref<string | null>(null);
const { streamState } = storeToRefs(useLiveUpdatesStore());
const liveState = computed(() => {
if (streamState.value === "live")
return { label: "Connected", kind: "ok" as const };
if (streamState.value === "unavailable")
return { label: "Unavailable", kind: "danger" as const };
return { label: "Connecting", kind: "warn" as const };
});
const liveState = computed(() => connectionStatus(streamState.value));
const names: Record<string, string> = {
state_db: "State store",
@@ -70,7 +65,7 @@ onMounted(load);
<TableRow>
<TableCell class="font-medium">Live updates</TableCell>
<TableCell class="w-px text-right">
<Badge :variant="liveState.kind">{{ liveState.label }}</Badge>
<Badge :variant="liveState.tone">{{ liveState.label }}</Badge>
</TableCell>
</TableRow>
<TableRow
+61
View File
@@ -0,0 +1,61 @@
<script setup lang="ts">
import { ref, watch } from "vue";
import { useRouter } from "vue-router";
import { Plus } from "@lucide/vue";
import { Button } from "@/components/ui/button";
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import { api } from "@/lib/api";
import StartWorkForm from "@/workflows/StartWorkForm.vue";
import type { WorkflowDefinition } from "@/workflows/workflow-rows";
const router = useRouter();
const open = ref(false);
const definitions = ref<WorkflowDefinition[]>([]);
const error = ref("");
watch(open, async (isOpen) => {
if (!isOpen) return;
try {
const data = await api.workflows<{ definitions?: WorkflowDefinition[] }>();
definitions.value = data?.definitions ?? [];
error.value = definitions.value.length ? "" : "No workflow definitions are served.";
} catch (err) {
error.value = String((err as Error).message || err);
}
});
function started(taskId: number) {
open.value = false;
void router.push(`/tasks/${taskId}`);
}
</script>
<template>
<Dialog v-model:open="open">
<DialogTrigger as-child>
<Button size="sm">
<Plus data-icon="inline-start" /> New task
</Button>
</DialogTrigger>
<DialogContent class="sm:max-w-[640px]">
<DialogHeader>
<DialogTitle>New task</DialogTitle>
<DialogDescription>Enters Archie's admitted task queue.</DialogDescription>
</DialogHeader>
<p v-if="error" class="text-sm text-danger" role="alert">{{ error }}</p>
<StartWorkForm
v-else-if="definitions.length"
:definitions="definitions"
@started="started"
/>
</DialogContent>
</Dialog>
</template>
+53 -67
View File
@@ -1,14 +1,7 @@
<script setup lang="ts">
import { computed, ref, watchEffect } from "vue";
import { computed, ref, useId, watchEffect } from "vue";
import { Button } from "@/components/ui/button";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { Field, FieldGroup, FieldLabel } from "@/components/ui/field";
import { Input } from "@/components/ui/input";
import {
@@ -31,6 +24,8 @@ interface Definition {
}
const props = defineProps<{ definitions: Definition[] }>();
const uid = useId();
const emit = defineEmits<{ started: [taskId: number] }>();
/** Starting work enters Archie's normal admitted task queue, not a side door. */
@@ -64,6 +59,7 @@ async function submit() {
instructions: instructions.value,
});
notice.value = `Queued task #${result.task_id}.`;
emit("started", result.task_id);
identity.value = "";
repository.value = "";
workflow.value = defaultWorkflow.value;
@@ -78,63 +74,53 @@ async function submit() {
</script>
<template>
<Card class="mb-4">
<CardHeader>
<CardTitle>Start work</CardTitle>
<CardDescription
>This enters Archie's normal admitted task queue.</CardDescription
>
</CardHeader>
<CardContent>
<form @submit.prevent="submit">
<FieldGroup>
<Field>
<FieldLabel for="wf-identity">Identity</FieldLabel>
<Input id="wf-identity" v-model="identity" required />
</Field>
<Field>
<FieldLabel for="wf-repository">Repository</FieldLabel>
<Input
id="wf-repository"
v-model="repository"
placeholder="owner/repository"
required
/>
</Field>
<Field>
<FieldLabel for="wf-workflow">Workflow</FieldLabel>
<Select v-model="workflow" required>
<SelectTrigger id="wf-workflow">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectGroup>
<SelectItem v-for="d in enabled" :key="d.id" :value="d.id">
{{ workflowLabel(d.name || d.id) }}
</SelectItem>
</SelectGroup>
</SelectContent>
</Select>
</Field>
<Field>
<FieldLabel for="wf-title">Task title</FieldLabel>
<Input id="wf-title" v-model="title" required />
</Field>
<Field>
<FieldLabel for="wf-instructions">Instructions</FieldLabel>
<Textarea
id="wf-instructions"
v-model="instructions"
:rows="3"
required
/>
</Field>
<Field orientation="horizontal">
<Button type="submit" :disabled="submitting">Start work</Button>
<p v-if="notice" class="text-sm text-fg-muted">{{ notice }}</p>
</Field>
</FieldGroup>
</form>
</CardContent>
</Card>
<form @submit.prevent="submit">
<FieldGroup>
<Field>
<FieldLabel :for="`${uid}-identity`">Identity</FieldLabel>
<Input :id="`${uid}-identity`" v-model="identity" required />
</Field>
<Field>
<FieldLabel :for="`${uid}-repository`">Repository</FieldLabel>
<Input
:id="`${uid}-repository`"
v-model="repository"
placeholder="owner/repository"
required
/>
</Field>
<Field>
<FieldLabel :for="`${uid}-workflow`">Workflow</FieldLabel>
<Select v-model="workflow" required>
<SelectTrigger :id="`${uid}-workflow`">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectGroup>
<SelectItem v-for="d in enabled" :key="d.id" :value="d.id">
{{ workflowLabel(d.name || d.id) }}
</SelectItem>
</SelectGroup>
</SelectContent>
</Select>
</Field>
<Field>
<FieldLabel :for="`${uid}-title`">Task title</FieldLabel>
<Input :id="`${uid}-title`" v-model="title" required />
</Field>
<Field>
<FieldLabel :for="`${uid}-instructions`">Instructions</FieldLabel>
<Textarea
:id="`${uid}-instructions`"
v-model="instructions"
:rows="3"
required
/>
</Field>
<Field orientation="horizontal">
<Button type="submit" :disabled="submitting">Start work</Button>
<p v-if="notice" class="text-sm text-fg-muted">{{ notice }}</p>
</Field>
</FieldGroup>
</form>
</template>
+18 -2
View File
@@ -2,7 +2,13 @@
import { onMounted, ref } from "vue";
import PageHeader from "@/base/PageHeader.vue";
import { Card, CardContent } from "@/components/ui/card";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import {
Empty,
EmptyDescription,
@@ -57,7 +63,17 @@ onMounted(async () => {
<!-- Starting work needs a definition to start: with none served, the form
could only be submitted to fail. -->
<StartWorkForm v-if="definitions.length" :definitions="definitions" />
<Card v-if="definitions.length" class="mb-4">
<CardHeader>
<CardTitle>Start work</CardTitle>
<CardDescription
>This enters Archie's normal admitted task queue.</CardDescription
>
</CardHeader>
<CardContent>
<StartWorkForm :definitions="definitions" />
</CardContent>
</Card>
<Card v-if="error">
<CardContent>