feat(admin): guided tuning editor that sends only the changes
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / postgres-tools (push) Successful in 28s
Foundation / server-image (push) Successful in 4m48s
Foundation / image (push) Successful in 5m37s

DEV's ingress refuses request bodies over about 1 KB, so adopting a whole
revamp file (5 KB) failed with a 413 the portal misreported as the API's 64 KiB
limit. POST /api/tuning?base=baseline|REV now takes only changed `key = value`
lines, applies them to the baseline file or the newest revision (409 stale_base
for an older one), keeping its comments, then checks and stores as before.

The Tuning page becomes a guided editor: sections, a field per setting with its
unit, plain reading and comment, a changes list with Check and Apply (or Adopt
as is), and loading a past revision or the baseline as changes. The full-text
editor stays as Text mode and names a proxy refusal plainly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-28 12:09:54 -04:00
co-authored by Claude Opus 5.5
parent 8dedde454d
commit 23ea24080e
7 changed files with 464 additions and 71 deletions
+33
View File
@@ -588,3 +588,36 @@ textarea.tuning {
textarea.tuning:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.action { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.action .row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
/* Guided tuning editor: sections, fields, changes. */
.tuning-guided { display: grid; grid-template-columns: 230px minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
@media (max-width: 1250px) { .tuning-guided { grid-template-columns: 210px minmax(0, 1fr); } .tuning-guided > .side { grid-column: 1 / -1; } }
@media (max-width: 800px) { .tuning-guided { grid-template-columns: minmax(0, 1fr); } }
.tuning-guided .side { display: flex; flex-direction: column; gap: 14px; }
.tuning-guided .side .card + .card { margin-top: 0; }
.nav-card { position: sticky; top: 72px; padding: 12px; }
.section-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.section-link { display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: transparent; color: var(--text); padding: 7px 10px; border-radius: var(--radius-sm); font-weight: 500; }
.section-link .grow { flex: 1; }
.section-link:hover { background: var(--panel-3); color: var(--text); }
.section-link.on { background: var(--accent-soft); color: var(--accent); }
.tuning-section + .tuning-section { margin-top: 14px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 8px 20px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.field-row.changed .field-label { color: var(--accent); }
.field-row.changed .input-unit input, .field-row.changed .input-unit select { border-color: var(--accent); }
.field-row.bad .input-unit input { border-color: var(--bad); }
.field-label { font-weight: 600; }
.field-key { color: var(--faint); font-size: 11.5px; margin-top: 1px; overflow-wrap: anywhere; }
.field-note { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.field-input { display: flex; flex-direction: column; gap: 3px; }
.input-unit { display: flex; align-items: center; gap: 6px; }
.input-unit input, .input-unit select { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; text-align: right; }
.input-unit select { text-align: left; font-family: inherit; }
.input-unit .unit { color: var(--muted); font-size: 12px; white-space: nowrap; min-width: 48px; }
.gloss { color: var(--muted); font-size: 12px; text-align: right; padding-right: 86px; min-height: 0; }
.gloss:empty, .field-problem:empty { display: none; }
.field-problem { font-size: 12px; text-align: right; padding-right: 86px; color: var(--accent); }
.field-row.bad .field-problem { color: var(--bad); }
.changes-card { position: sticky; top: 72px; }
.changes-card .wide { margin-top: 10px; }
@media (max-width: 1250px) { .changes-card, .nav-card { position: static; } }