carlos / platform Public

design-console-secrets

Settings and secrets in the console (slice 2)

The app settings page's Environments section becomes editable. Any account member can now do there what carlos env set|unset and carlos secrets set|unset do, under the same rules.

Spec: docs/superpowers/specs/2026-11-08-console-secrets-design.md (rev 3.1, approved by Paul 2026-11-08). Plan: docs/superpowers/plans/2026-11-08-console-secrets.md. Approved mockup: docs/superpowers/specs/2026-11-08-console-secrets-mockup-v3.html.

What changes

  • Settings page: one card per bundle, "All environments" first. Each card has compact variable rows, Edit, Replace and Remove, an add row with a Secret box, and a save bar that appears only while something is staged. One Save makes one conditional write of one bundle, at the version the page showed. Save requests no restart.
  • Secrets are sealed in the browser: the inline configseal.js uses WebCrypto with the app's key, in the same v1/v2 envelope format as appconfig/crypto.go. The console never sees the plaintext. Secret controls are disabled without JavaScript; ordinary settings still work without it.
  • After you save: the page sorts the routes the write reaches using one shared classifier, appconfig.ClassifyWrite: updates itself, restart it yourself (with how), asleep or not running, can't see from here, plus blocked, couldn't check and doesn't get these. AwaitingRestart is now its projection, and its legacy output is unchanged.
  • Config door and CLI: additive self, yours, starting, unseen and unresolved_routes fields on the restart object. The CLI prints them when present, and older CLIs read exactly what they read before. The CLI door uses this box's facts only; the page's Save also reads provision records and box reports.
  • Shared validation: checkConfigSets, checkConfigEnvironment and writeConfig serve both the JSON door and the form door. The JSON door's responses are byte-identical.
  • CAS: appconfig.GetBundle, BundleVersion and ApplyAtVersion. Unsetting a key that is already gone writes nothing.
  • Box reports: an additive HostRollout.Managed field, set only by the rollout manager. Until boxes are released with it, sidecars report "restart it yourself", which is the safe direction.

Rulings

  • Paul (2026-11-09, stopping rule 2): refuse up front. Any storage failure on a form Save, or any bundle read failure on a form post, makes the section unavailable for that request, and nothing submitted is drawn back.
  • Controller rulings are listed in the session report to the coordinator. Among them: one bundle per Save, and a Save is refused when another card has edits; the CLI door uses local facts only; "Asleep" requires the new Managed field.

Tests and reviews

  • Targeted tests per task, including headless Chromium and node interop: browser envelopes open with Go Open, and v2 fails for the wrong account or app. JS and Go value predicates are checked against one shared case table.
  • Astra reviews: classifier (READY after fixes), CAS and shared validation (R2 READY), browser sealing (R2 READY), form door (R1 5 P1, R2 2 P1 then stopping rule 2 and Paul's cut, R3 READY after fixes), whole branch (R1 READY after fixes, five P2s fixed and scoped-checked).
  • Copy: Luna pass under Paul's delegation, with four controller overrides.
  • Census: approved on #280 at 3eaf36e5, envelope . re-approved at a2c27984.
  • CI: see branch status.

Follow-ups

  • Mockup-kit generated whitespace (P3).
  • Pre-existing: a console with no bucket panics when rendering app pages.
  • Box release for the Managed field.
Commits 41
Discussions 4 4 open
Tasks 0/0 done

Activity