From e1153c3eca58512e2995d75a40f968092b5a35d2 Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 20:50:00 -0500 Subject: [PATCH 1/2] fix(dashboard): keep the Navigation label visible at phone widths Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- changelog.d/fixed-16690.md | 1 + src/pkg/dashboard/navbar_chip_consistency_test.go | 15 +++++++++++++++ src/pkg/dashboard/static-src/css/agent-detail.css | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 changelog.d/fixed-16690.md diff --git a/changelog.d/fixed-16690.md b/changelog.d/fixed-16690.md new file mode 100644 index 0000000000..7e939e0d01 --- /dev/null +++ b/changelog.d/fixed-16690.md @@ -0,0 +1 @@ +- The drawer toggle's visible "Navigation" label no longer hides at phone widths (≤600px). The drawer toggle inherited the `.nav-chip--action` class intended for other action chips, which were configured to hide their labels on narrow screens; the fix exempts `#oc-drawer-toggle` from that rule ([#16690](https://github.com/hivecommons/hive/issues/16690)). diff --git a/src/pkg/dashboard/navbar_chip_consistency_test.go b/src/pkg/dashboard/navbar_chip_consistency_test.go index d284a08431..97c388f611 100644 --- a/src/pkg/dashboard/navbar_chip_consistency_test.go +++ b/src/pkg/dashboard/navbar_chip_consistency_test.go @@ -1,6 +1,7 @@ package dashboard import ( + "os" "regexp" "strings" "testing" @@ -204,3 +205,17 @@ func TestNavbarRemovedChipSpecificMetricOverrides(t *testing.T) { } } } + +func TestDrawerToggleLabelVisibleAtPhoneWidths(t *testing.T) { + css, err := os.ReadFile("static-src/css/agent-detail.css") + if err != nil { + t.Fatalf("reading agent-detail.css: %v", err) + } + cssStr := string(css) + + // The rule that hides labels for .nav-chip--action must exempt #oc-drawer-toggle + // at phone widths (max-width: 600px) so the Navigation label remains visible. + if !strings.Contains(cssStr, `.oc-topbar .nav-chip--action:not(#oc-drawer-toggle) .nav-chip__label`) { + t.Error("agent-detail.css is missing :not(#oc-drawer-toggle) exemption; drawer toggle label would be hidden at phone widths") + } +} diff --git a/src/pkg/dashboard/static-src/css/agent-detail.css b/src/pkg/dashboard/static-src/css/agent-detail.css index e06e8b40e9..ea2a7cb208 100644 --- a/src/pkg/dashboard/static-src/css/agent-detail.css +++ b/src/pkg/dashboard/static-src/css/agent-detail.css @@ -330,7 +330,7 @@ .oc-topbar-right { grid-column: auto; flex-wrap: wrap; } .widget-dl { display: none; } #oc-project-name { display: none; } - .oc-topbar .nav-chip--action .nav-chip__label, + .oc-topbar .nav-chip--action:not(#oc-drawer-toggle) .nav-chip__label, .oc-topbar .nav-chip--primary .nav-chip__label { display: none; } /* keep the pill one line so the right group wraps as a unit instead of being clipped at the viewport edge */ From ed027ec4fc16bbba0d2a13344d7fb9e44418520e Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 21:01:35 -0500 Subject: [PATCH 2/2] fix(dashboard): regenerate static/index.html for the drawer-toggle label rule TestIndexHTMLIsGenerated pins static/index.html to the concatenation of static-src/; the CSS change needs the artifact committed alongside it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- src/pkg/dashboard/static/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index 7a179d8f2b..c6ae7c93c2 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -929,7 +929,7 @@ .oc-topbar-right { grid-column: auto; flex-wrap: wrap; } .widget-dl { display: none; } #oc-project-name { display: none; } - .oc-topbar .nav-chip--action .nav-chip__label, + .oc-topbar .nav-chip--action:not(#oc-drawer-toggle) .nav-chip__label, .oc-topbar .nav-chip--primary .nav-chip__label { display: none; } /* keep the pill one line so the right group wraps as a unit instead of being clipped at the viewport edge */