diff --git a/CHANGELOG.md b/CHANGELOG.md index 041911f..3f4717b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ## Changelog +### v0.167.1 — Center the sidebar logo (2026-07-24) + +CSS one-liner + test. `.sidebar-logo` gains `margin: 0 auto` so the 140px logo is horizontally +centered within the header instead of left-aligned — applies to both the desktop sidebar and the +mobile drawer (same element). Pin: `TestSidebarLogo_Centered` (red-proof verified). + ### v0.167.0 — Outlined logo + favicon (Part 4, the v0.166.0 gated follow-up) (2026-07-24) No agent coupling; MinAgent unchanged. Embedded-asset constants + one test only — no backend, no diff --git a/controller/internal/web/mobile_nav_test.go b/controller/internal/web/mobile_nav_test.go index 57232fd..c05ccb0 100644 --- a/controller/internal/web/mobile_nav_test.go +++ b/controller/internal/web/mobile_nav_test.go @@ -88,6 +88,24 @@ func TestMobileCSS_StripRemovedDrawerPresent(t *testing.T) { } } +// The sidebar logo is horizontally centered in its header (desktop sidebar + mobile drawer share +// the element). Red-proof: revert to `margin-bottom: 0.25rem` (no auto side-margins) → this FAILS. +func TestSidebarLogo_Centered(t *testing.T) { + data, err := StyleCSS() + if err != nil { + t.Fatalf("StyleCSS(): %v", err) + } + css := string(data) + i := strings.Index(css, ".sidebar-logo {") + if i < 0 { + t.Fatal(".sidebar-logo rule not found") + } + rule := css[i : i+strings.Index(css[i:], "}")] + if !strings.Contains(rule, "margin: 0 auto") { + t.Errorf(".sidebar-logo is not centered (no `margin: 0 auto`); rule was:\n%s", rule) + } +} + // Group A — drawer markup (Scenario A/C), asserted through the real layout render. // // Red-proof: remove aria-controls from the burger button in layout.html → the aria-controls diff --git a/controller/internal/web/templates/style.css b/controller/internal/web/templates/style.css index ed069e8..74e85b8 100644 --- a/controller/internal/web/templates/style.css +++ b/controller/internal/web/templates/style.css @@ -92,7 +92,7 @@ body { width: 140px; height: auto; display: block; - margin-bottom: 0.25rem; + margin: 0 auto 0.25rem; } .login-logo { width: 200px;