Skip to content

fix(ui): prevent dashboard chrome overlap at narrow viewports - #1756

Draft
erichroepke wants to merge 2 commits into
Abilityai:devfrom
erichroepke:fix/1754-responsive-dashboard-chrome
Draft

fix(ui): prevent dashboard chrome overlap at narrow viewports#1756
erichroepke wants to merge 2 commits into
Abilityai:devfrom
erichroepke:fix/1754-responsive-dashboard-chrome

Conversation

@erichroepke

@erichroepke erichroepke commented Jul 23, 2026

Copy link
Copy Markdown

Description

Maintainer action: please apply the ui label to trigger the frontend Playwright workflow. The contributor account cannot assign repository labels.

Fix the narrow-desktop responsive layout across Trinity's shared navigation, Dashboard summary/control bar, and Replay Timeline.

The change:

  • replaces the overfull route strip below 1280px with an accessible compact menu;
  • keeps every primary route, connection text, Operations badge, and build information reachable;
  • adds a clear global-header divider in light and dark themes;
  • keeps Dashboard statistics, telemetry, and controls grouped while wrapping;
  • makes Replay Timeline controls and legend chips wrap as atomic units; and
  • preserves the Timeline canvas as the only horizontal scrolling surface.

Related issue

Fixes #1754

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature
  • Breaking change
  • Documentation update

Testing

  • Reproduced untouched current dev at 714 × 863: Settings/status intersected, toolbar overflowed by 140px, and header border was 0px.
  • Verified fixed current dev at 375, 639, 640, 700, 714, 768, 1024, 1100, 1101, 1279, 1280, and 1440px.
  • At every width: document overflow 0px, Replay toolbar overflow 0px, no Settings/status intersection, 1px header divider, and internal Timeline scrolling preserved.
  • Verified compact menu routes, text connection state, 99+ badge, outside-click closure, Escape closure, and focus return.
  • Verified light and dark header dividers at 714px.
  • Added e2e/dashboard-responsive.spec.js to the @smoke CI set.
  • npm run check:tokens
  • npm run build
  • Playwright discovery with --grep @smoke --list
  • npm run test:e2e:smoke locally (admin credential was intentionally not exposed; CI will execute it)

Checklist

  • Code follows the project's style and design-token conventions.
  • No sensitive data or backend/API changes are included.
  • Maintainer edits are allowed.
  • Intentional Timeline canvas scrolling remains internal.

@github-actions

Copy link
Copy Markdown

⚠️ Nightly unit-suite check skipped — merge conflict against dev.

Resolve by running git merge dev locally and pushing the result. The next nightly run will re-test once the conflict is gone.

…se (Abilityai#1754)

The compact hamburger never opened on a normal click: clicking the icon
targets the <path> inside the trigger, and the v-if/v-else icon swap
detaches that node from the DOM before the document click-outside handler
runs. navRef.contains(detachedTarget) then returns false, so the guard
treated the opening click as an outside click and closed the panel the
instant it opened — leaving every primary route unreachable below xl.

Add @click.stop to the trigger so the opening click never reaches
handleClickOutside. Closing still works via toggle, outside-click on other
elements, Escape, and route change.

The PR's own @smoke test (compact navigation keeps routes reachable) now
passes; all 4 dashboard-responsive smoke tests green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vybe

vybe commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Pushed a fix commit (cb0c12f9) directly to the branch (maintainer edits enabled). Thanks for the solid layout work — the reflow itself is correct: I applied the branch locally and the geometry sweep passes at all 12 breakpoints (375→1440px), the timeline toolbar reflows cleanly, the header divider renders in both themes, and telemetry/dashboard controls wrap as intended.

The one blocker was the compact hamburger — it never opened on a normal click, which matters because this PR moves the desktop route strip to xl:flex, so below 1280px the hamburger is the only path to Agents / Templates / Operations / Settings / Enterprise.

Root cause (confirmed by instrumenting the handlers):

  • Clicking the icon targets the <path> inside the trigger.
  • The v-if/v-else icon swap detaches that <path> from the DOM before the document handleClickOutside runs (event.target.isConnected === false).
  • navRef.contains(detachedTarget) is then false, so the click-outside guard treated the opening click as an outside click and closed the panel the instant it opened.

Proof: clicking the button's padding corner (target = the <button>, which isn't swapped) opened it fine; clicking the icon center did not. The existing user-menu uses the same click-outside pattern and works only because its avatar child isn't swapped.

Fix is one line — @click.stop on the trigger so the opening click never reaches handleClickOutside. Close still works via toggle, outside-click on other elements, Escape, and route change.

Your own @smoke test (compact navigation keeps routes and runtime state reachable) was catching this — it fails on 6be704b6 and passes on cb0c12f9. All 4 dashboard-responsive smoke tests are now green locally (ADMIN_PASSWORD=… npx playwright test e2e/dashboard-responsive.spec.js), and check:tokens + build pass.

Two notes for the record, neither blocking:

  • The route strip now needs ≥1280px (was ≥640px), so 640–1279px widths get the hamburger instead of visible tabs. Reasonable given 7 nav items — just a deliberate behavior change worth calling out.
  • frontend-e2e is advisory and only auto-runs on frontend PRs / with the ui label. It'll now pass, but the failing test wouldn't have blocked merge on its own.

Ready for approval once someone else signs off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants