feat(webui): inline editing for per-repo allow_concurrent/max_retries/review_enabled

Adds PATCH /api/config/repos/{owner}/{name}, a dedicated seam distinct
from the generic dotted-key PATCH /api/config path: a repository is
one element of []config.Repo, not a flat key. Traced the mechanism
before adding any new plumbing -- overlay.Nest/ApplyOverlayValues
already handle "repos" as a single whole-slice key with no dot, so
the fix is a webui handler plus a bootstrap seam that reads the
daemon's live, untrimmed Repos (never webui.RepoView, which omits
Preflight/TestGlob), mutates the one matched field via the pure
applyRepoFieldUpdate helper, and republishes through the existing
UpdateConfig(ctx, {"repos": repos}) path unchanged.

config-row.js's row() gains an opts.save override so an edit can be
redirected to a different persistence call. The repositories table
renders an autosaving checkbox for the two booleans and a
save-on-blur/Enter input for max_retries, via api.configRepoUpdate.

Closes archie-core-b6ew.6, and with it archie-core-b6ew.
This commit is contained in:
sam committed 2026-09-02 22:35:03 +10:00
1 parent a444253209
commit a4fbd8d6ef
12 files changed
+427 -20

No files matched your search

+10
View File
@@ -100,6 +100,16 @@ export const api = {
if (!res.ok) throw new ApiError(await errorMessage(res), res.status);
return res.json();
},
configRepoUpdate: async (owner, name, field, value) => {
const res = await fetch(`/api/config/repos/${encodeURIComponent(owner)}/${encodeURIComponent(name)}`, {
method: "PATCH",
headers: { Accept: "application/json", "Content-Type": "application/json", "X-Archie-CSRF": "1" },
body: JSON.stringify({ field, value }),
signal: AbortSignal.timeout(15000),
});
if (!res.ok) throw new ApiError(await errorMessage(res), res.status);
return res.json();
},
configReset: async (key) => {
const res = await fetch("/api/config/reset", {
method: "POST",