feat(webui): Settings sidebar shell

Settings is one top-bar link. Its pages render inside a shell with a
grouped sidebar (Agents, Integrations, Runtime) that turns into tabs at
narrow widths, and content capped at 960px. Channels sits under
Integrations.
This commit is contained in:
sam committed 2026-09-25 15:09:24 +10:00
1 parent 655d714ae9
commit 0d4d86cd2f
6 files changed
+119 -32

No files matched your search

+5 -1
View File
@@ -5,6 +5,7 @@ import { onMounted, ref } from "vue";
import ChatLauncher from "@/chat/ChatLauncher.vue";
import CommandPalette from "@/components/command-palette/CommandPalette.vue";
import Topbar from "@/components/topbar/Topbar.vue";
import SettingsShell from "@/settings/SettingsShell.vue";
import {
Alert,
AlertAction,
@@ -93,7 +94,10 @@ onMounted(() => {
open tab stays open on the next (W11).
-->
<RouterView v-slot="{ Component, route }">
<component :is="Component" :key="route.path" />
<SettingsShell v-if="route.meta.settings">
<component :is="Component" :key="route.path" />
</SettingsShell>
<component :is="Component" v-else :key="route.path" />
</RouterView>
</main>
</div>
+37 -28
View File
@@ -17,35 +17,38 @@ const specs: NavSpec[] = [
{ kind: "link", path: "/tasks" },
{ kind: "link", path: "/workflows" },
{ kind: "link", path: "/events" },
{
kind: "group",
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"],
},
],
},
{ kind: "link", path: "/settings" },
];
// The Settings sidebar, grouped by what is being configured.
const settings: NavSpec = {
kind: "group",
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"],
},
],
};
// 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"];
@@ -56,7 +59,13 @@ export function navTree(hidden: string[] = []): NavNode[] {
/** navEntries lists every destination Jump to can reach. */
export function navEntries(hidden: string[] = []) {
return buildNav(table, specs, hidden, unlisted).jumpTargets;
return buildNav(table, [...specs, settings], hidden, unlisted).jumpTargets;
}
/** settingsNav is the Settings sidebar; each section labels its first item. */
export function settingsNav(hidden: string[] = []) {
const [group] = buildNav(table, [settings], hidden).tree;
return group?.kind === "group" ? group.items : [];
}
/**
+28 -1
View File
@@ -67,6 +67,8 @@ const routes = [
name: "skills",
component: SkillsPage,
meta: {
navPath: "/settings",
settings: true,
label: "Skills",
description: "The SKILL.md capabilities Archie can activate.",
section: "skills",
@@ -77,6 +79,8 @@ const routes = [
name: "curators",
component: CuratorsPage,
meta: {
navPath: "/settings",
settings: true,
label: "Curators",
description: "Scheduled passes that curate Archie's memory and captures.",
section: "curators",
@@ -97,6 +101,8 @@ const routes = [
name: "system-status",
component: SystemStatusPage,
meta: {
navPath: "/settings",
settings: true,
label: "Status",
description:
"Update state, configuration sources, and the listen address.",
@@ -118,6 +124,8 @@ const routes = [
name: "system-appearance",
component: SystemAppearancePage,
meta: {
navPath: "/settings",
settings: true,
label: "Appearance",
description: "Theme and display preferences.",
},
@@ -127,6 +135,8 @@ const routes = [
name: "system-tasks",
component: SystemTasksPage,
meta: {
navPath: "/settings",
settings: true,
label: "Task execution",
description: "Work lifecycle: statuses, operator actions, and budgets.",
section: "settings",
@@ -137,6 +147,8 @@ const routes = [
name: "system-models",
component: SystemModelsPage,
meta: {
navPath: "/settings",
settings: true,
label: "Models",
description: "Model roles and the providers backing them.",
section: "settings",
@@ -147,6 +159,8 @@ const routes = [
name: "system-repos",
component: SystemReposPage,
meta: {
navPath: "/settings",
settings: true,
label: "Repositories",
description:
"Repositories Archie watches, and their per-repo gate overrides.",
@@ -158,6 +172,8 @@ const routes = [
name: "system-identities",
component: SystemIdentitiesPage,
meta: {
navPath: "/settings",
settings: true,
label: "Identities",
description: "Persistent actors and lifecycle.",
section: "settings",
@@ -168,6 +184,8 @@ const routes = [
name: "channels",
component: ChannelsPage,
meta: {
navPath: "/settings",
settings: true,
label: "Channels",
description: "Inbound chat and notification channels, and their state.",
section: "channels",
@@ -178,12 +196,21 @@ const routes = [
name: "system-advanced",
component: SystemAdvancedPage,
meta: {
navPath: "/settings",
settings: true,
label: "Advanced",
description: "Identity, storage, sandboxing, and dangerous actions.",
section: "settings",
},
},
{ path: "/settings", redirect: "/settings/status", meta: { nav: false } },
{
path: "/settings",
redirect: "/settings/models",
meta: {
label: "Settings",
description: "Everything you configure: agents, integrations, runtime.",
},
},
// Paths from before Settings existed, kept for bookmarks and chat history.
...Object.entries({
"/system/status": "/settings/status",
+47
View File
@@ -0,0 +1,47 @@
<script setup lang="ts">
import { computed } from "vue";
import { useRoute } from "vue-router";
import { hidden } from "@/lib/capabilities";
import { settingsNav } from "@/lib/nav";
import { cn } from "@/lib/utils";
const route = useRoute();
const items = computed(() => settingsNav(hidden.value));
</script>
<template>
<div class="flex gap-10 max-lg:flex-col max-lg:gap-4">
<nav
aria-label="Settings"
class="w-60 shrink-0 max-lg:-mx-4 max-lg:w-auto max-lg:overflow-x-auto max-lg:border-b max-lg:px-4"
>
<ul class="flex flex-col gap-0.5 lg:sticky lg:top-6 max-lg:flex-row max-lg:gap-1">
<li v-for="(item, index) in items" :key="item.path" class="contents">
<p
v-if="item.dividerBefore"
:class="cn('mb-1.5 px-3 text-[11px] font-medium tracking-[0.06em] text-fg-subtle uppercase max-lg:hidden', index > 0 && 'mt-5')"
>
{{ item.dividerBefore }}
</p>
<RouterLink
:to="item.path"
:aria-current="route.path === item.path ? 'page' : undefined"
:class="
cn(
'flex h-9 items-center rounded-md px-3 text-[13px] whitespace-nowrap text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring',
route.path === item.path &&
'bg-secondary font-medium text-foreground',
)
"
>
{{ item.label }}
</RouterLink>
</li>
</ul>
</nav>
<div class="min-w-0 max-w-[960px] flex-1">
<slot />
</div>
</div>
</template>