Skip to content

feat(ui): Agent Detail tabs overflow into a "More" dropdown (#1114) - #1127

Merged
vybe merged 1 commit into
devfrom
feature/1114-overflow-tabs
Jun 10, 2026
Merged

vybe merged 1 commit into
devfrom
feature/1114-overflow-tabs

Conversation

@vybe

@vybe vybe commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replaces the Agent Detail tab bar's overflow-x-auto horizontal scroll with a reusable OverflowTabs.vue "priority+" component: render as many tabs as fit, collapse the trailing remainder into a right-aligned "More ▾" disclosure menu.
  • Re-measures on container resize (ResizeObserver) and after web-font load; the active tab is reflected whether it lands inline or in overflow.
  • Pure frontend — no backend, store, API, or DB changes. v-model over AgentDetail's activeTab string ref, so ?tab= deep-linking is unaffected.

Changes

  • src/frontend/src/components/OverflowTabs.vue — new reusable component (hidden zero-layout mirror row measures {id,label,badge?} widths; deterministic inline/overflow split; rAF-debounced + width-diff-guarded RO; document.fonts.ready re-measure; derived-signature watch for badge/label changes).
  • src/frontend/src/views/AgentDetail.vue — swap the overflow-x-auto <nav> for <OverflowTabs :tabs="visibleTabs" v-model="activeTab" /> + import.
  • src/frontend/e2e/agent-detail-tabs-overflow.spec.js — new Playwright e2e (6 behaviors).
  • docs/memory/architecture.md, docs/memory/feature-flows.md, docs/memory/feature-flows/agent-detail-tab-overflow.md — docs.

Acceptance criteria (all verified)

  • All tabs inline when they fit — no "More", no scroll (verified on a small-tab agent)
  • Overflow → right-aligned "More ▾" dropdown; clicking an item activates it
  • Re-measures/reflows on resize via ResizeObserver
  • Active tab in overflow → trigger reflects active state (underline + dot)
  • Badges render inline and in the dropdown
  • Dark mode + touch (pointerdown) + keyboard (focus-first, Escape closes + returns focus)
  • ?tab= deep-linking unaffected (component reflects whatever activeTab is, inline or overflow)

Design notes

  • A11y: plain <button> disclosure (NOT role="menu"), consistent with the page's existing plain-button tabs — advertising menu semantics without arrow-key roving would be worse than an honest disclosure.
  • Reusable by design: generic {tabs, modelValue} API so the Operations.vue ?tab= strip can adopt it next (deferred follow-up).
  • Pre-existing, out of scope: AgentDetail's fresh-load ?tab= deep-link doesn't reliably apply the requested tab on a hard page load — confirmed present on the original code too (stash-tested), so not a regression from this PR. Worth a separate issue.

Test Plan

  • e2e pass locally: cd src/frontend && ADMIN_PASSWORD=… npx playwright test agent-detail-tabs-overflow → 7/7
  • Manual: light + dark mode, viewport 640→2400, dropdown open/select/Escape/outside-click
  • CI frontend-e2e (label-gated)

Fixes #1114

🤖 Generated with Claude Code

Replace the Agent Detail tab bar's horizontal scroll with a reusable
OverflowTabs.vue "priority+" component: render as many tabs as fit and
collapse the trailing remainder into a right-aligned "More ▾" disclosure.

- Hidden zero-layout mirror row measures every {id,label,badge?} tab width
  (+ a worst-case More button); visible row renders the computed split.
- Re-measures on container resize (ResizeObserver on the outer wrapper,
  width-diff-guarded + rAF-debounced) and after document.fonts.ready;
  re-measures on tab/label/badge change via a derived-signature watch.
- Defaults to all-inline before first measure (no first-paint snap; no
  "More" when everything fits — no regression).
- Active-in-overflow reflected on the trigger (underline + dot), tab order
  unchanged. Plain <button> disclosure (not role=menu): Tab-traversable,
  Escape closes + returns focus, outside-pointerdown closes; dark-mode aware.
- v-model over AgentDetail's activeTab string ref — ?tab= deep-linking
  unaffected. Pure frontend; no backend/store changes.

Tests: src/frontend/e2e/agent-detail-tabs-overflow.spec.js (6 Playwright
behaviors, 7/7 pass). Docs: architecture.md + feature-flows index + new
agent-detail-tab-overflow.md flow.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@vybe vybe added the ui PR touches the frontend UI — triggers Playwright e2e tests label Jun 10, 2026
@vybe
vybe merged commit f66e386 into dev Jun 10, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui PR touches the frontend UI — triggers Playwright e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant