Redesign the peering dialog; graceful not-enabled state (#131) #133

Merged
Cordy merged 1 commit from fix/peering-dialog into main 2026-08-07 00:57:47 +00:00
Owner

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, so translateStatic rendered the key name verbatim. Changed to data-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.statePath is unset on this instance, so the subsystem isn't mounted. peerRefresh was dumping the raw 404 status text into the message line, and the generate/register POSTs 404ed silently. peerRefresh now 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/--lichen surfaces — rather than imposing a new look on one dialog.

Six anchored splices, peeringClose verified gone, both inline scripts pass node --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.statePath set 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 runtime peeringEnabled toggle as the real switch) is a design question I'm putting to Nikola separately rather than changing server defaults unilaterally.

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, so `translateStatic` rendered the key name verbatim. Changed to `data-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.statePath` is unset on this instance, so the subsystem isn't mounted. `peerRefresh` was dumping the raw 404 status text into the message line, and the generate/register POSTs 404ed silently. `peerRefresh` now 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`/`--lichen` surfaces — rather than imposing a new look on one dialog. Six anchored splices, `peeringClose` verified gone, both inline scripts pass `node --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.statePath` set 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 runtime `peeringEnabled` toggle as the real switch) is a design question I'm putting to Nikola separately rather than changing server defaults unilaterally.
fix(ui): redesign peering dialog, graceful not-enabled state, close-button label (#131)
All checks were successful
ci / test-and-build (pull_request) Successful in 33s
90d5cfe307
Cordy merged commit 035f72c72b into main 2026-08-07 00:57:47 +00:00
Cordy deleted branch fix/peering-dialog 2026-08-07 00:57:50 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#133
No description provided.