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:
15 files changed
+37
-535
No files matched your search
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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.<name>] 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>
|
||||
@@ -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>
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user