Skip to content

bug(nav): Priority+ on /#/perf at ~1080px shows ONLY active pill — high-priority links vanish, More dropdown contains only active route (20th regression) #1391

@Kpa-clawbot

Description

@Kpa-clawbot

Symptom

Operator screenshot of staging at ~1080px-wide viewport on /#/perf: navbar shows ONLY the active-route pill ("Perf"). Brand + a few high-priority links should be visible inline; instead they're gone, AND clicking "More" only shows "Perf" (the active route) — not the missing links that should be there.

This is the 20th distinct nav-Priority+ overflow bug in the recent history (#345, #1097, #1102, #1104, #1106, #1109, #1139, #1148, #1163, #1311/#1312, …). The pattern is the same shape every time: at some narrow-ish viewport, the greedy fits() loop in public/app.js reaches a state where it either drops too much or drops nothing useful.

What's different vs prior fixes

Concrete repro

  1. Open /#/perf on staging at viewport ~1080-1100 px wide.
  2. Observe navbar — should show brand + high-priority links + More. Instead shows only "Perf" pill.
  3. Click More — should list missing links. Instead lists only the active-route pill.

(Width threshold may vary by viewport — operator's screenshot is ~1080px from Firefox dev tools.)

Root cause hypothesis (to verify before fixing)

In public/app.js applyPriorityPlus():

  • overflowQueue order matters. If the active-route pill (e.g. "Perf") is at position 0, the loop adds it first.
  • The high-priority floor (if (overflowQueue[i].dataset.priority === 'high') break;) only breaks on the FIRST hit. If the floor breaks BEFORE adding any non-high link, More is populated with… nothing extra. Then a second pass somewhere ADDS just the active pill to More.
  • The screenshot suggests overflow contains ONLY the active route pill, with no other links — which means inline got cleared but the floor wasn't honored.

Likely the bug is in the interplay between:

  1. The greedy fits() loop (bug(top-nav): Priority+ overflow logic is half-built — CSS hides .is-overflow but NO JS adds the class. Nav links missing on medium-narrow viewports #1311 floor).
  2. The "floor More at >=2 items" promotion (bug(nav): functional regressions reported in prod — hamburger inert + More ▾ shows only 1 item; not reproducible against master #1139 Bug B, line ~1238).
  3. Some new measurement noise from tonight's CSS-var addition.

Diagnose via the existing E2E test test-nav-priority-1311-e2e.js — extend to cover the /perf route at 1080px viewport.

Acceptance criteria

  • Reproduce locally at 1080×800 on /#/perf. Visible inline: brand + at least 3 high-priority links + More. NOT just "Perf" pill alone.
  • Reproduce on at least one non-active high-priority route too (e.g. /#/audio-lab — if it's still around as a high-priority link).
  • Active-route pill MUST always be visible inline (never overflowed to More) at any viewport.
  • Any link in overflow that doesn't fit MUST still be reachable via the More dropdown.
  • If the active route is itself NOT a high-priority link (e.g. /#/perf), the high-priority links must STILL be inline at any viewport ≥768px.
  • E2E regression test: test-nav-priority-1390-e2e.js (or extension of 1311) — at 1080×800 on /#/perf, assert (a) ≥3 visible links inline, (b) More dropdown contains the LINKS that overflowed (not just active route), (c) every high-priority data-priority="high" link is visible inline OR in More.
  • Mutation: revert the fix, assert the new E2E test fails.

Out of scope

  • Redesigning Priority+ as a whole (it's been touched 20 times; the algorithm is the algorithm).
  • Removing /perf from nav (it's a debug surface — not the navbar's fault).
  • Mobile (<768px) — separate hamburger code path.

Refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions