The control plane replaces this, rather than extending it (docs/prds/runtime-control-plane.md, "First implementation"). Until now both paths existed: overlay kept dashboard edits in its own SQLite file beside archie.db and layered them over the file config at boot and on every reload, which is the duplicate configuration authority the PRD set out to remove. Gone with it: the --no-config-overlay flag and ARCHIE_SKIP_CONFIG_OVERLAY recovery hatch, which existed because a bad overlay row could brick the boot; ReloadStatus.OverlayUnavailable; and the reload controller's overlay source. The -config-overlay file overlay is a different thing and stays. The dashboard's three write seams went too. UpdateConfig, ResetConfig and UpdateRepoField were assigned only in internal/webui's own tests, so in production they answered 503 and ConfigView.Editable was permanently false (archie-core-j28m). Removing Editable would otherwise have flipped the SPA's controls on, since configEditable read a missing field as true, so the config pages become what they already were in practice: a read of what each process is running with. Configuration is written through the control plane. apply.go survives this deliberately; archie-core-xrux carries the question of whether its map merge is still guarding the file overlay path.
65 lines
2.5 KiB
Vue
65 lines
2.5 KiB
Vue
<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>
|