fix(webui): the legacy config catalog stops advertising fields the control plane owns

skills_dir, plugin_dir, secret_engine_dir and containers.* were listed as
editable in /api/config's schema while the plugin-settings and
container-runtime-policies resources own those values at runtime; nothing
could save them there. Drop them from the catalog, and delete the settings
components that rendered the catalog, none of which any page used.
This commit is contained in:
sam committed 2026-09-25 15:29:31 +10:00
1 parent c327f17c35
commit b5c98a0ccc
15 files changed
+37 -535

No files matched your search

+19 -41
View File
@@ -84,13 +84,9 @@ type ConfigSection struct {
// writing:
// - reloadableFields lists BotUser, BotEmail, Label, DiffCapLines, Budgets,
// Models -- all reloadable.
// - reloadableSubFields["Containers"] allows only VolumeTTL --
// every other Containers field (Image, MaxConcurrency,
// MaxUptime, PullPolicy, Network) requires a restart.
// - reloadableSubFields["Forge"] allows only Host -- Forge.Type requires a
// restart even though the dashboard already renders it as editable.
// - Web, SkillsDir, PluginDir, SecretEngineDir are absent from both
// allowlists entirely, so they require a restart.
// - Web is absent from both allowlists entirely, so it requires a restart.
// - WorkDir and DatabaseURL are locked (configuration.DeniedKeys), not merely
// restart-required -- the dashboard cannot change them at all.
func configFieldDescriptors() []ConfigSection {
@@ -143,21 +139,12 @@ func configFieldDescriptors() []ConfigSection {
},
{
ID: "storage",
Label: "Storage & sandboxing",
Description: "Where archied keeps its state, and how it isolates task execution.",
Label: "Storage",
Description: "Where archied keeps its state.",
Fields: []ConfigField{
{Key: "work_dir", Label: "Work directory", Type: FieldString, Editable: false},
{Key: "state_dir", Label: "State directory", Description: "Embedded NATS store, task logs and the readiness disk probe.", Type: FieldString, Editable: false},
{Key: "database_url", Label: "PostgreSQL URL", Description: "The State Store's database connection; set at boot, restart required.", Type: FieldString, Editable: false},
{Key: "skills_dir", Label: "Shared skills directory", Description: "Empty uses the work directory.", Type: FieldString, Editable: true, RestartRequired: true},
{Key: "plugin_dir", Label: "Daemon plugin directory", Description: "Empty means no daemon plugins.", Type: FieldString, Editable: true, RestartRequired: true},
{Key: "secret_engine_dir", Label: "Secret engine plugin directory", Description: "Empty means built-in secret engines only.", Type: FieldString, Editable: true, RestartRequired: true},
{Key: "containers.image", Label: "Agent image", Type: FieldString, Editable: true, RestartRequired: true},
{Key: "containers.max_concurrency", Label: "Max concurrent tasks", Description: "0 means unlimited.", Type: FieldInt, Editable: true, RestartRequired: true},
{Key: "containers.max_uptime", Label: "Container max lifetime", Type: FieldDuration, Editable: true, RestartRequired: true},
{Key: "containers.volume_ttl", Label: "Persistent volume retention", Type: FieldDuration, Editable: true},
{Key: "containers.pull_policy", Label: "How images are refreshed", Description: `"missing" pulls only when the image isn't present locally; "always" pulls before every run.`, Type: FieldEnum, Options: []string{"missing", "always"}, Editable: true, RestartRequired: true},
{Key: "containers.network", Label: "Docker network", Description: "Empty auto-detects the Docker network.", Type: FieldString, Editable: true, RestartRequired: true},
},
},
{
@@ -179,31 +166,22 @@ func configFieldDescriptors() []ConfigSection {
// field safe to show."
func configFieldValues(view ConfigView) map[string]any {
return map[string]any{
"bot_user": view.Identity.BotUser,
"bot_email": view.Identity.BotEmail,
"label": view.Identity.Label,
"forge.type": view.Identity.ForgeType,
"forge.host": view.Identity.ForgeHost,
"diff_cap_lines": view.Identity.DiffCapLines,
"repos": view.Repositories,
"models": view.Models,
"providers": view.Providers,
"budgets.max_steps": view.Budgets.MaxSteps,
"budgets.wall_clock": view.Budgets.WallClock,
"budgets.gate_max_failures": view.Budgets.GateMaxFailures,
"work_dir": view.Storage.WorkDir,
"state_dir": view.Storage.StateDir,
"database_url": view.Storage.DatabaseURL,
"skills_dir": view.Storage.SkillsDir,
"plugin_dir": view.Storage.PluginDir,
"secret_engine_dir": view.Storage.SecretEngineDir,
"containers.image": view.Containers.Image,
"containers.max_concurrency": view.Containers.MaxConcurrency,
"containers.max_uptime": view.Containers.MaxUptime,
"containers.volume_ttl": view.Containers.VolumeTTL,
"containers.pull_policy": view.Containers.PullPolicy,
"containers.network": view.Containers.Network,
"web.listen": view.Web.Listen,
"bot_user": view.Identity.BotUser,
"bot_email": view.Identity.BotEmail,
"label": view.Identity.Label,
"forge.type": view.Identity.ForgeType,
"forge.host": view.Identity.ForgeHost,
"diff_cap_lines": view.Identity.DiffCapLines,
"repos": view.Repositories,
"models": view.Models,
"providers": view.Providers,
"budgets.max_steps": view.Budgets.MaxSteps,
"budgets.wall_clock": view.Budgets.WallClock,
"budgets.gate_max_failures": view.Budgets.GateMaxFailures,
"work_dir": view.Storage.WorkDir,
"state_dir": view.Storage.StateDir,
"database_url": view.Storage.DatabaseURL,
"web.listen": view.Web.Listen,
}
}
+17 -28
View File
@@ -64,9 +64,7 @@ func TestConfigFieldDescriptorsAreComplete(t *testing.T) {
"bot_user", "bot_email", "label", "forge.type", "forge.host", "diff_cap_lines",
"repos", "models", "providers",
"budgets.max_steps", "budgets.wall_clock", "budgets.gate_max_failures",
"work_dir", "state_dir", "database_url", "skills_dir", "plugin_dir", "secret_engine_dir",
"containers.image", "containers.max_concurrency", "containers.max_uptime",
"containers.volume_ttl", "containers.pull_policy", "containers.network",
"work_dir", "state_dir", "database_url",
"web.listen",
}
for _, key := range wantKeys {
@@ -87,31 +85,22 @@ func TestConfigFieldDescriptorsAreComplete(t *testing.T) {
// defaulting to false ("this takes effect immediately") when it does not.
func TestConfigFieldDescriptorsRestartRequiredIsDeliberate(t *testing.T) {
want := map[string]bool{
"bot_user": false,
"bot_email": false,
"label": false,
"forge.type": true, // reloadableSubFields["Forge"] allows only Host
"forge.host": false,
"diff_cap_lines": false,
"repos": false,
"models": false,
"providers": false,
"budgets.max_steps": false,
"budgets.wall_clock": false,
"budgets.gate_max_failures": false,
"work_dir": false, // locked, not merely restart-required
"state_dir": false, // locked, not merely restart-required
"database_url": false, // locked, not merely restart-required
"skills_dir": true, // absent from reloadableFields
"plugin_dir": true,
"secret_engine_dir": true,
"containers.image": true, // absent from reloadableSubFields["Containers"]
"containers.max_concurrency": true,
"containers.max_uptime": true,
"containers.volume_ttl": false, // reloadableSubFields["Containers"] allows VolumeTTL
"containers.pull_policy": true,
"containers.network": true,
"web.listen": true, // Web is absent from both allowlists entirely
"bot_user": false,
"bot_email": false,
"label": false,
"forge.type": true, // reloadableSubFields["Forge"] allows only Host
"forge.host": false,
"diff_cap_lines": false,
"repos": false,
"models": false,
"providers": false,
"budgets.max_steps": false,
"budgets.wall_clock": false,
"budgets.gate_max_failures": false,
"work_dir": false, // locked, not merely restart-required
"state_dir": false, // locked, not merely restart-required
"database_url": false, // locked, not merely restart-required
"web.listen": true, // Web is absent from both allowlists entirely
}
for _, section := range configFieldDescriptors() {
for _, f := range section.Fields {
+1 -1
View File
@@ -1,2 +1,2 @@
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){:root,:host{--shimmer-angle:20deg}*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-scrollbar-thumb:#0000;--tw-scrollbar-track:#0000;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--scroll-fade-t:0;--scroll-fade-b:0;--scroll-fade-s:0;--scroll-fade-e:0;--scroll-fade-mask:initial;--shimmer-image:initial;--shimmer-text-fill:initial}}}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-greek-wght-normal.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-cyrillic-ext-400-normal.woff2)format("woff2"),url(/assets/ibm-plex-mono-cyrillic-ext-400-normal.woff)format("woff");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-cyrillic-400-normal.woff2)format("woff2"),url(/assets/ibm-plex-mono-cyrillic-400-normal.woff)format("woff");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-vietnamese-400-normal.woff2)format("woff2"),url(/assets/ibm-plex-mono-vietnamese-400-normal.woff)fLine truncated
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){:root,:host{--shimmer-angle:20deg}*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-scrollbar-thumb:#0000;--tw-scrollbar-track:#0000;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--scroll-fade-t:0;--scroll-fade-b:0;--scroll-fade-s:0;--scroll-fade-e:0;--scroll-fade-mask:initial;--shimmer-image:initial;--shimmer-text-fill:initial}}}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-greek-wght-normal.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-cyrillic-ext-400-normal.woff2)format("woff2"),url(/assets/ibm-plex-mono-cyrillic-ext-400-normal.woff)format("woff");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-cyrillic-400-normal.woff2)format("woff2"),url(/assets/ibm-plex-mono-cyrillic-400-normal.woff)format("woff");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-vietnamese-400-normal.woff2)format("woff2"),url(/assets/ibm-plex-mono-vietnamese-400-normal.woff)fLine truncated
-22
View File
@@ -1,22 +0,0 @@
<script setup lang="ts">
/**
* The key/value grid the configuration rows sit in.
*
* The list owns the three column tracks and every row adopts them with
* subgrid, so all values start at the same x (the widest label's edge) and
* every action column lines up. A row that declared its own tracks cannot do
* that: a `max-content` label track resolves per row and the values come out
* ragged (the fault this layout was rewritten for).
*
* An engine without subgrid gets a single-column list, so each row is still a
* full-width item and the row's own bounded tracks do the alignment instead.
*/
</script>
<template>
<div
class="grid grid-cols-1 md:supports-[grid-template-columns:subgrid]:grid-cols-[max-content_minmax(0,1fr)_auto]"
>
<slot />
</div>
</template>
-22
View File
@@ -1,22 +0,0 @@
<script setup lang="ts">
import { computed } from "vue";
import { Alert, AlertDescription } from "@/components/ui/alert";
import { config } from "./state";
/**
* What the running configuration says about itself: whether the last reload was
* applied. The running config is unchanged after a failed reload, so the notice
* is a statement about state rather than a warning about the values below it.
*/
const lastError = computed(() => config.value?.reload?.last_error ?? "");
</script>
<template>
<Alert v-if="lastError" class="mb-4">
<AlertDescription
>The last config reload failed; the running config is unchanged:
{{ lastError }}</AlertDescription
>
</Alert>
</template>
-89
View File
@@ -1,89 +0,0 @@
<script setup lang="ts">
import { computed } from "vue";
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { cn } from "@/lib/utils";
import { valueText } from "./config-field";
import type { ConfigField } from "./types";
/**
* One row of a key/value list: the label and the value the process is running
* with. Configuration is written through the control plane, so this list
* reports what is in effect and never offers a control of its own.
*
* A locked field shows the reason it stays bootstrap-owned: those keys are the
* daemon's own startup inputs and the control plane deliberately does not
* manage them.
*
* Every row is a subgrid of the list's three tracks, so the columns line up
* across rows; see ConfigList.
*/
const props = defineProps<{
label: string;
value?: unknown;
/** The descriptor carrying the row's description and locked reason. */
field?: ConfigField;
}>();
const text = computed(() => valueText(props.value));
const lockedReason = computed(() => props.field?.locked_reason ?? "");
</script>
<template>
<div
class="grid grid-cols-1 items-center gap-x-4 gap-y-1 border-t border-border py-2 first:border-t-0 hover:bg-muted/40 md:grid-cols-[minmax(8rem,16rem)_minmax(0,1fr)_auto] md:supports-[grid-template-columns:subgrid]:col-span-full md:supports-[grid-template-columns:subgrid]:grid-cols-subgrid"
>
<!-- The field's own description is the row's tooltip: the line that
explains a setting is the one place that explanation fits without
pushing every row apart. -->
<Tooltip v-if="field?.description">
<TooltipTrigger as-child>
<!--
tabindex="0" is the keyboard path to the description: reka wires the
trigger's focus/blur to the tooltip's open state, so Tab reaches the
label and holding focus keeps the description on screen. The
aria-label carries the label and the description together, because
the tooltip content itself is out of the accessibility tree when the
trigger is not hovered or focused.
-->
<span
tabindex="0"
:aria-label="`${label}: ${field.description}`"
class="text-sm text-fg-muted"
>{{ label }}</span
>
</TooltipTrigger>
<TooltipContent :side-offset="8" class="max-w-80">{{
field.description
}}</TooltipContent>
</Tooltip>
<span v-else class="text-sm text-fg-muted">{{ label }}</span>
<!-- min-w-0 is load-bearing: a grid item refuses to shrink below its
content by default, which is what pushed long paths into the action
column and truncated them against the buttons. -->
<slot name="value">
<span
:class="
cn(
'min-w-0 break-words font-mono text-sm md:truncate',
text === '—' ? 'text-fg-subtle' : 'text-foreground',
lockedReason && 'text-fg-muted',
)
"
:title="text"
>{{ text }}</span
>
</slot>
<span
v-if="lockedReason"
class="col-span-full text-xs text-fg-subtle md:col-span-2 md:col-start-2"
>{{ lockedReason }}</span
>
</div>
</template>
-37
View File
@@ -1,37 +0,0 @@
<script setup lang="ts">
import { computed } from "vue";
import ConfigCard from "./ConfigCard.vue";
import ConfigList from "./ConfigList.vue";
import ConfigRow from "./ConfigRow.vue";
import { sectionRows, sectionsFor } from "./sections";
import { config } from "./state";
/**
* The generic schema rows for one page. The daemon serves one catalog of
* sections (internal/webui/config_schema.go) and this renders the ones that
* belong to the route it is handed, so a field added on the backend appears
* here without a frontend change.
*/
const props = defineProps<{ ids: string[] }>();
const sections = computed(() => sectionsFor(config.value?.schema, props.ids));
</script>
<template>
<ConfigCard
v-for="section in sections"
:key="section.id"
:title="section.label"
>
<ConfigList>
<ConfigRow
v-for="field in sectionRows(section)"
:key="field.key"
:label="field.label"
:value="field.value"
:field="field"
/>
</ConfigList>
</ConfigCard>
</template>
-37
View File
@@ -1,37 +0,0 @@
<script setup lang="ts">
import { Card, CardContent } from "@/components/ui/card";
import {
Empty,
EmptyDescription,
EmptyHeader,
EmptyTitle,
} from "@/components/ui/empty";
import { configError } from "./state";
/**
* What a System page shows in place of its content when there is none to
* render: a failed read, or archied running without a config file wired into
* the dashboard. The page renders this instead of its cards rather than beside
* them -- half a page that quietly omitted the rest would read as the whole.
*/
</script>
<template>
<Card class="mb-4">
<CardContent>
<Empty>
<EmptyHeader>
<EmptyTitle>{{
configError ? "Cannot reach archied" : "No configuration loaded"
}}</EmptyTitle>
<EmptyDescription v-if="configError">{{
configError
}}</EmptyDescription>
<EmptyDescription v-else>
archied is running without a config file wired into the dashboard.
</EmptyDescription>
</EmptyHeader>
</Empty>
</CardContent>
</Card>
</template>
-47
View File
@@ -1,47 +0,0 @@
<script setup lang="ts">
import { computed } from "vue";
import {
Empty,
EmptyDescription,
EmptyHeader,
EmptyTitle,
} from "@/components/ui/empty";
import ConfigList from "./ConfigList.vue";
import ConfigRow from "./ConfigRow.vue";
import { config } from "./state";
/**
* Which model handles each stage of work. The role keys are the server's
* (lowercase, underscored) and are read as words here.
*/
const entries = computed(() => Object.entries(config.value?.models ?? {}));
function roleLabel(role: string): string {
if (!role) return "Unknown role";
return role.charAt(0).toUpperCase() + role.slice(1).replace(/_/g, " ");
}
</script>
<template>
<h3 class="mt-5 mb-2 text-sm font-semibold text-fg-muted first:mt-0">
Model roles
</h3>
<Empty v-if="!entries.length">
<EmptyHeader>
<EmptyTitle>No model roles configured</EmptyTitle>
<EmptyDescription
>Assign a model to at least one role (e.g. "builder") in
[models].</EmptyDescription
>
</EmptyHeader>
</Empty>
<ConfigList v-else>
<ConfigRow
v-for="[role, model] in entries"
:key="role"
:label="roleLabel(role)"
:value="model"
/>
</ConfigList>
</template>
-18
View File
@@ -1,18 +0,0 @@
<script setup lang="ts">
import ConfigCard from "./ConfigCard.vue";
import ModelRoleList from "./ModelRoleList.vue";
import ProviderTable from "./ProviderTable.vue";
/**
* Which model handles each stage of work, and which LLM providers back them.
* One card with two lists: the providers exist to serve the roles, so reading
* them apart would hide the pairing.
*/
</script>
<template>
<ConfigCard title="Models & providers">
<ModelRoleList />
<ProviderTable />
</ConfigCard>
</template>
-68
View File
@@ -1,68 +0,0 @@
<script setup lang="ts">
import { computed } from "vue";
import { Badge } from "@/components/ui/badge";
import {
Empty,
EmptyDescription,
EmptyHeader,
EmptyTitle,
} from "@/components/ui/empty";
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from "@/components/ui/table";
import { config } from "./state";
/**
* The LLM providers wired up, and whether their credentials are actually
* present. Only the environment variable NAME is shown, never its value; a
* provider with no credential form set is not an error, just unusable, which
* is what the status column says.
*/
const providers = computed(() => Object.entries(config.value?.providers ?? {}));
</script>
<template>
<h3 class="mt-5 mb-2 text-sm font-semibold text-fg-muted">Providers</h3>
<Empty v-if="!providers.length">
<EmptyHeader>
<EmptyTitle>No providers configured</EmptyTitle>
<EmptyDescription
>Add a [providers.&lt;name&gt;] entry so a model role above has
something to run on.</EmptyDescription
>
</EmptyHeader>
</Empty>
<Table v-else>
<TableHeader>
<TableRow>
<TableHead>Provider</TableHead>
<TableHead>Class</TableHead>
<TableHead>Base URL</TableHead>
<TableHead>API key env var</TableHead>
<TableHead>Status</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow v-for="[name, provider] in providers" :key="name">
<TableCell class="font-medium">{{ name }}</TableCell>
<TableCell>{{ provider.class }}</TableCell>
<TableCell class="font-mono">{{
provider.base_url || "default"
}}</TableCell>
<TableCell class="font-mono">{{
provider.api_key_env || "—"
}}</TableCell>
<TableCell>
<Badge v-if="provider.configured" variant="ok">configured</Badge>
<Badge v-else variant="warn">missing credentials</Badge>
</TableCell>
</TableRow>
</TableBody>
</Table>
</template>
-83
View File
@@ -1,83 +0,0 @@
<script setup lang="ts">
import { computed } from "vue";
import {
Empty,
EmptyDescription,
EmptyHeader,
EmptyTitle,
} from "@/components/ui/empty";
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from "@/components/ui/table";
import ConfigCard from "./ConfigCard.vue";
import { config } from "./state";
/**
* Each repository Archie polls, and the quality gate a change must pass before
* it opens a pull request.
*
* Concurrent tasks, retries and self-review are per-repository policy. They
* are edited as the repository-policies control-plane resource, so this table
* reports what each repository is running with.
*/
const repos = computed(() => config.value?.repositories ?? []);
/** The gate is shell argv lists, so it reads as the commands an operator would
* type, joined by the arrow the pipeline follows. */
function gateSummary(gate?: string[][]): string {
if (!gate?.length) return "—";
return gate.map((cmd) => cmd.join(" ")).join(" → ");
}
</script>
<template>
<ConfigCard v-if="!repos.length">
<Empty>
<EmptyHeader>
<EmptyTitle>No repositories configured</EmptyTitle>
<EmptyDescription
>Add a [[repos]] entry in config.toml so Archie has somewhere to
work.</EmptyDescription
>
</EmptyHeader>
</Empty>
</ConfigCard>
<ConfigCard v-else>
<Table>
<TableHeader>
<TableRow>
<TableHead>Repository</TableHead>
<TableHead>Base branch</TableHead>
<TableHead>Ecosystem</TableHead>
<TableHead>Quality gate</TableHead>
<TableHead>Protected paths</TableHead>
<TableHead>Concurrent</TableHead>
<TableHead>Max retries</TableHead>
<TableHead>Self-review</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow v-for="(repo, index) in repos" :key="index">
<TableCell class="font-medium"
>{{ repo.owner }}/{{ repo.name }}</TableCell
>
<TableCell class="font-mono">{{ repo.base }}</TableCell>
<TableCell>{{ repo.ecosystem || "go" }}</TableCell>
<TableCell class="font-mono">{{ gateSummary(repo.gate) }}</TableCell>
<TableCell class="font-mono">{{
repo.protect?.length ? repo.protect.join(", ") : "—"
}}</TableCell>
<TableCell>{{ repo.allow_concurrent ? "yes" : "no" }}</TableCell>
<TableCell class="font-mono">{{ repo.max_retries ?? 0 }}</TableCell>
<TableCell>{{ repo.review_enabled ? "yes" : "no" }}</TableCell>
</TableRow>
</TableBody>
</Table>
</ConfigCard>
</template>
-6
View File
@@ -1,6 +0,0 @@
/** The empty marker. A value the server did not send is shown as an em dash,
* which is a fact about the running config, not a missing render. */
export function valueText(value: unknown): string {
if (value === null || value === undefined || value === "") return "—";
return String(value);
}
-30
View File
@@ -1,30 +0,0 @@
import type { ConfigField, ConfigSection } from "./types";
/**
* Which schema section belongs to which Route.
*
* The daemon serves one catalog (internal/webui/config_schema.go); the split
* of that catalog across six routes is the UI's, so the mapping lives here
* rather than in a per-page filter. Sections whose only fields are structured
* (repositories, models) are absent deliberately: their dedicated editors own
* those, not the generic row renderer.
*/
export const TASKS_SECTIONS = ["budgets"];
export const ADVANCED_SECTIONS = ["identity", "storage"];
/** sectionRows drops the structured fields: the generic renderer does not own
* them, so a section left with none renders nothing at all. */
export function sectionRows(section: ConfigSection): ConfigField[] {
return section.fields.filter((f) => f.type !== "structured");
}
/** sectionsFor returns the sections this page renders, in catalog order. */
export function sectionsFor(
schema: ConfigSection[] | undefined,
ids: string[],
): ConfigSection[] {
return (schema ?? []).filter(
(s) => ids.includes(s.id) && sectionRows(s).length > 0,
);
}
-6
View File
@@ -38,10 +38,4 @@ test("Task settings shows settings instead of lifecycle reference data", async (
"utf8",
);
assert.doesNotMatch(page, /LifecycleCard|ReadOnlyNotice/);
const sections = await readFile(
new URL("../src/settings/ConfigSections.vue", import.meta.url),
"utf8",
);
assert.doesNotMatch(sections, /section\.description/);
});