ui: Central UI density/consistency sweep + Theme 0.4.1

Applies the family-wide admin-UI cleanup playbook to the Central UI so the
Blazor surfaces stop diverging from the shared kit: buttons are grouped rather
than individually sized, long cell values are contained instead of widening
tables, and hard-coded colours give way to theme tokens.

The headline fix is that MainLayout passed Accent="#2f5fd0" to ThemeShell,
which the kit emits as an inline style on the shell root. Being a descendant of
<html>, it beat the [data-bs-theme="dark"] override for the entire app, so the
dark accent had never rendered. Declaring --accent in site.css :root instead
lets both schemes resolve; light is unchanged because the value already matched
the kit's light default.

Theme pins to 0.4.1, which upstreams the local .btn sizing block verbatim, so
that block is deleted here rather than duplicated. Verified byte-identical
before removal; the repo now declares no --bs-btn-* anywhere.

NOT purely cosmetic, contrary to the sweep's stated scope: four detail-modal
surfaces (NotificationReport, ConfigurationAuditLog, ParkedMessages,
SiteCallsReport) were additionally refactored from holding the selected record
to holding its id and re-resolving from the current page each render, with the
resolve doubling as the visibility gate. A background refresh that drops the
row now closes the modal instead of showing a stale snapshot. This is a
behaviour change and is called out rather than buried: a full-suite run turned
up one intermittent CentralUI failure, CloseButton_DismissesModal, whose stack
(GetRequiredEventBindingEntry during DispatchEventAsync) indicates the handler
was disposed between render and click — a window the previous field-held record
made structurally impossible. Treat the modal lifecycle here as unreviewed.

Build 0/0; suite green apart from that one intermittent failure.
This commit is contained in:
Joseph Doherty
2026-08-11 05:50:12 -04:00
parent b6f383a225
commit 9e243493fb
77 changed files with 2197 additions and 1292 deletions
@@ -27,6 +27,9 @@
else
{
<div class="card mb-3">
<div class="card-header">
<span class="fw-semibold">Connection</span>
</div>
<div class="card-body">
<div class="mb-2">
<label class="form-label small">Site</label>
@@ -86,8 +89,16 @@
</div>
</div>
}
</div>
</div>
<h6 class="text-muted mt-3">Primary endpoint</h6>
@* Each endpoint editor is a heavyweight sub-form, so it gets its own card
rather than sharing one body separated only by a muted <h6>. *@
<div class="card mb-3">
<div class="card-header">
<span class="fw-semibold">Primary endpoint</span>
</div>
<div class="card-body">
@if (_protocol == "MxGateway")
{
<MxGatewayEndpointEditor Title="Primary Endpoint"
@@ -106,17 +117,21 @@
Protocol="@_protocol"
Errors="_primaryErrors" />
}
</div>
</div>
<h6 class="text-muted mt-3">
Backup endpoint
@if (!_showBackup)
{
<span class="badge bg-body-secondary text-body-secondary border ms-2">Optional</span>
}
</h6>
<div class="card mb-3">
<div class="card-header d-flex align-items-center">
<span class="fw-semibold">Backup endpoint</span>
@if (!_showBackup)
{
<div class="mb-3">
<span class="badge bg-body-secondary text-body-secondary border ms-2">Optional</span>
}
</div>
<div class="card-body">
@if (!_showBackup)
{
<div class="mb-0">
<button type="button" class="btn btn-outline-secondary btn-sm"
@onclick="EnableBackup">Add Backup Endpoint</button>
</div>
@@ -147,20 +162,22 @@
min="1" max="20" @bind="_formFailoverRetryCount" />
<div class="form-text">Retries before failing over to backup endpoint.</div>
</div>
<div class="mb-3">
<div class="mb-0">
<button type="button" class="btn btn-outline-danger btn-sm"
@onclick="RemoveBackup">Remove Backup</button>
</div>
}
</div>
</div>
@if (_formError != null)
{
<div class="text-danger small mt-2">@_formError</div>
}
<div class="mt-3">
<button class="btn btn-success btn-sm me-1" @onclick="SaveConnection">Save</button>
<button class="btn btn-outline-secondary btn-sm" @onclick="GoBack">Cancel</button>
</div>
@if (_formError != null)
{
<div class="text-danger small mt-2">@_formError</div>
}
<div class="mb-3">
<div class="btn-group btn-group-sm" role="group">
<button class="btn btn-success" @onclick="SaveConnection">Save</button>
<button class="btn btn-outline-secondary" @onclick="GoBack">Cancel</button>
</div>
</div>
}