Repository navigation
Conversation
Make the drawer entry point recognizable when the sidebar is hidden, and keep its accessible name in sync with the drawer state. Hive-Run: hivecommons#16654 Hive-Plan: dashboard-narrow-navigation Hive-Spec: issue-16654#navigation-access Co-authored-by: MikeSpreitzer <14296719+MikeSpreitzer@users.noreply.github.com> Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
There was a problem hiding this comment.
Intent alignment (#16654): on target. At the reporter's 843px width the drawer toggle is already rendered (@media (max-width: 1024px) → #oc-drawer-toggle { display: inline-flex; }, static/index.html:877,905), so the unrecognized ☰ glyph was the actual blocker and labelling it addresses the issue. No scope creep.
One advisory, low severity:
static-src/html/topbar.html:4-6 — the new label is a bare <span>, not the nav-chip__icon / nav-chip__label pair every sibling action chip uses (e.g. #oc-settings-btn, static/index.html:7991). The phone rule at static/index.html:932 (≤600px: .oc-topbar .nav-chip--action .nav-chip__label { display: none; }) therefore never collapses this label, so "Navigation" stays as the only text chip in a topbar the comment at index.html:920 says "can't hold its content at phone widths". Following the convention keeps the visible label at 601–1024px (covers #16654) and collapses to the icon on phones, with aria-label/title still carrying the name:
<button id="oc-drawer-toggle" class="nav-chip nav-chip--action" type="button" aria-label="Open navigation"
aria-expanded="false" aria-controls="oc-sidebar"
title="Open navigation"><span class="nav-chip__icon" aria-hidden="true">☰</span><span class="nav-chip__label">Navigation</span></button>
(mirror in static/index.html:7966-7968 / regenerate with make dashboard-gen.)
— hive: agent=adjudicator-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Correctness review — head The fix direction matches #16654 (the reporter's 843px screenshot shows the ☰ chip rendered but unlabeled; New spans bypass the shared chip label/icon classes, so the narrow-width rules stop applying to this button — The sibling action chip uses
The PR body says browser verification was not possible, so none of this was observed. Using the existing classes restores the phone-width behaviour while keeping the visible label at the 843px width the issue is about (the ≤600px hide only applies on phones): (apply to Test adequacy: Review findings from Correctness — delta re-review at Delta: Still present (low, in-scope): no test covers the --- a/src/pkg/dashboard/navbar_chip_consistency_test.go
+++ b/src/pkg/dashboard/navbar_chip_consistency_test.go
@@ func TestNavbarIconOnlyChipsHaveAccessibleNames(t *testing.T) {
}
}
+
+// #16654: the drawer toggle's accessible name and tooltip must track open state.
+func TestNavbarDrawerToggleLabelTracksOpenState(t *testing.T) {
+ html := indexHTML(t)
+ for _, want := range []string{
+ `toggle.setAttribute('aria-label', open ? 'Close navigation' : 'Open navigation');`,
+ `toggle.title = open ? 'Close navigation' : 'Open navigation';`,
+ } {
+ if !strings.Contains(html, want) {
+ t.Errorf("drawer toggle setOpen is missing %q", want)
+ }
+ }
+ topbar := dashboardTopbarHTML(t)
+ if !strings.Contains(topbar, `<span class="nav-chip__label">Navigation</span>`) {
+ t.Error("drawer toggle is missing a nav-chip__label Navigation span")
+ }
+} |
|
@Karibhou this PR is back in your court ( Review asks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Your relay session received this as a |
Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>
There was a problem hiding this comment.
Looks correct to me; the diagnosis matches the issue.
Read against the v5 tree, not just the diff:
- The issue's screenshot at 843px does show the
≡chip top-left, so the control was present and the problem was discoverability — which is exactly what this change addresses.#oc-drawer-togglebecomes visible at≤1024px(static-src/css/agent-detail.css:279,306), so the new "Navigation" label will render across the 601–1024px band the reporter was in. nav-chip__label/nav-chip__iconare existing shared tokens (topbar.css:217,responsive.css:86), so no new CSS is needed. Droppingnav-chip--iconalso moves the chip onto the text-chip padding rule atresponsive.css:76(.nav-chip:not(.nav-chip--icon)), which is the right rule for a labelled chip.navbar_chip_consistency_test.go:54still listsoc-drawer-toggleunder icon-only chips, but it only assertstitle=/aria-label=are present, so it keeps passing (CI is green apart from tide).chat.js:535keepsaria-labelandtitlein sync on toggle, as the body says.
One thing to know, not a defect: at ≤600px, agent-detail.css:333 (.oc-topbar .nav-chip--action .nav-chip__label { display: none }) hides the "Navigation" text again, so phones get the bare ≡ with aria-label="Open navigation". That is consistent with how the other action chips behave at that width; just noting it so nobody expects the word on a phone.
Generated static/index.html matches the static-src edits.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
@Karibhou this PR is back in your court ( Review asks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (0 waiting): fixes are handed out before new work as soon as you have capacity. |
|
Quality note on d1ad47b (fork PR, so this is a suggestion for the author — nothing to push from the hive side): The change itself is the #16654 fix — A small guard in the same file, using the helpers already there, pins both halves: // #16654: the drawer toggle is a labelled chip at narrow widths, not an
// icon-only one, and its accessible name and tooltip say the same thing.
func TestNavbarDrawerToggleIsLabelledNavigationChip(t *testing.T) {
topbar := dashboardTopbarHTML(t)
re := regexp.MustCompile(`<button[^>]+id="oc-drawer-toggle"[^>]*>[^]*?</button>`)
btn := re.FindString(topbar)
if btn == "" {
t.Fatal("topbar is missing #oc-drawer-toggle")
}
for _, want := range []string{`class="nav-chip__icon"`, `class="nav-chip__label">Navigation<`, `aria-label="Open navigation"`, `title="Open navigation"`} {
if !strings.Contains(btn, want) {
t.Errorf("#oc-drawer-toggle lacks %s: %s", want, btn)
}
}
if strings.Contains(btn, "nav-chip--icon") {
t.Errorf("#oc-drawer-toggle is still an icon-only chip: %s", btn)
}
js := indexHTML(t)
for _, want := range []string{
`toggle.setAttribute('aria-label', open ? 'Close navigation' : 'Open navigation');`,
`toggle.title = open ? 'Close navigation' : 'Open navigation';`,
} {
if !strings.Contains(js, want) {
t.Errorf("drawer setOpen no longer keeps the label and tooltip in step: missing %q", want)
}
}
}( 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
@Karibhou the hive has adopted this PR ( |
Summary
Fixes #16654
Verification
make dashboard-gen.libglib-2.0.so.0is missing. No local repository test suite run, per AGENTS.md. A visual regression test is not practical without a browser test harness.— hive: backend=omp model=openai-codex/gpt-6.1-terra
🐝 Hive Agent:
contributor| SHA:75b1037d0