fix(webui): drop the config schema's editability advert

No process writes configuration through the dashboard: the write
handlers, their UpdateConfig/ResetConfig/UpdateRepoField seams and
ConfigView.Editable were deleted with the runtime config overlay
(31622ec5), and database-backed settings are written through the control
plane. That left producer-side residue behind:

- ConfigField.Editable and the descriptor literals setting it, which
  emitted editable=true for fields no process can change, and which
  ui/src/settings/types.ts's ConfigField deliberately omits from the
  reader side of the wire shape
- ErrConfigUpdateUnavailable/ErrConfigUpdateInvalid, with neither a
  producer nor a consumer since handleConfigUpdate was deleted
- comments pointing at handleConfigUpdate/UpdateConfig,
  ConfigView.Editable, the overlay's overridden markers and a deleted
  test name

The two Editable-only descriptor tests go with the field; the deleted
write path is what they pinned.
This commit is contained in:
sam committed 2026-09-30 11:38:44 +10:00
1 parent 9f6eaccd71
commit 58c4e17451
5 files changed
+78 -111

No files matched your search

+6 -25
View File
@@ -3,7 +3,6 @@ package webui
import (
"context"
"encoding/json"
"errors"
"fmt"
"maps"
"net/http"
@@ -15,21 +14,6 @@ import (
"github.com/samcharles93/archie-core/internal/infrastructure/configuration"
)
// Sentinel errors for handleConfigUpdate status classification. The
// composition root wraps its UpdateConfig errors with these so the
// handler can answer 400 (invalid input) or 503 (unavailable) without
// reaching into infrastructure internals.
var (
// ErrConfigUpdateUnavailable reports that config editing is not
// wired (no UpdateConfig seam, or the overlay is skipped by the
// recovery flag).
ErrConfigUpdateUnavailable = errors.New("config editing unavailable")
// ErrConfigUpdateInvalid reports a rejected update: a denylisted
// key, a failed validation of the materialised config, or an
// unparseable value.
ErrConfigUpdateInvalid = errors.New("config update invalid")
)
// ChannelView is one conversational front-end as shown on the dashboard's
// Channels page: whether it is reachable today, and what configuring it
// would unlock.
@@ -168,12 +152,12 @@ type ConfigView struct {
// deployment, whose forge is Identity above.
Identities []ForgeIdentityView `json:"identities,omitempty"`
// Schema is the field-descriptor catalog (archie-core-b6ew) attached to
// this view's own values, locked reasons, and overridden markers -- see
// config_schema.go. The dashboard's generic renderer (archie-core-b6ew.3)
// reads this instead of the flat fields above to decide labels,
// sections, types, and editability; the flat fields stay for existing
// consumers (structured cards, provenance, reload/lock plumbing) rather
// than being removed in the same change that adds their replacement.
// this view's own values and locked reasons -- see config_schema.go. It
// carries the labels, sections and types a generic configuration renderer
// needs, instead of making each rendering process hardcode them; the flat
// fields stay for existing consumers (structured cards, provenance,
// reload/lock plumbing) rather than being removed in the same change that
// adds their replacement.
Schema []ConfigSection `json:"schema"`
}
@@ -363,9 +347,6 @@ type CatalogProviderView struct {
// It is deliberately a function, not a method: rendering the view is not a
// property of an HTTP server, and the process that owns configuration is not
// the process that serves this page (archie-core-ml30).
//
// Editable is not set here. It describes the rendering process's own write
// path, so handleConfig decides it -- see ConfigView.Editable.
func BuildConfigView(in ConfigViewInput) ConfigView {
cfg := in.Config
provenance := append([]ConfigOrigin(nil), in.Provenance...)