Redesign the peering dialog; graceful not-enabled state (#131) #133
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/peering-dialog"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Three things Nikola flagged on the live dialog, plus the underlying cause of two of them.
Close button said "peeringClose." The button carried
data-i18n="peeringClose", which is not a real i18n key, sotranslateStaticrendered the key name verbatim. Changed todata-i18n="close", the key every other dialog uses."Not Found" at the bottom, and "generate key does nothing." Same root cause: the admin peering API returns 404 because
peering.statePathis unset on this instance, so the subsystem isn't mounted.peerRefreshwas dumping the raw 404 status text into the message line, and the generate/register POSTs 404ed silently.peerRefreshnow probes enablement first: on 404 it hides the forms and shows a clear notice — "Instance peering is not enabled on this server. An administrator must set peering.statePath in the configuration to turn it on." — instead of a cryptic "Not Found" over dead buttons.Layout. The register-peer form was five bare placeholder inputs in an arbitrary two-column pairing. Now a labelled grid: peer name, URL and key each full-width (key in monospace), users and groups paired on one row (they are the allow-list, a real pair), the fail-closed hint spanning, and the button right-aligned. The dialog widened to 600px, the two sections separated by a rule, and the once-shown key styled as a copyable monospace block. Kept entirely within Cairn's existing visual language — small uppercase labels, glacier accent,
--snow/--lichensurfaces — rather than imposing a new look on one dialog.Six anchored splices,
peeringCloseverified gone, both inline scripts passnode --check. Not visually confirmed at commit time — I'll screenshot the deployed result via the browser after the tag.Note
This makes the not-enabled state honest, but peering still needs
peering.statePathset in config for the panel to actually function. Whether that should default to a path (so the admin panel works out of the box, with the runtimepeeringEnabledtoggle as the real switch) is a design question I'm putting to Nikola separately rather than changing server defaults unilaterally.