Skip to content

feat: reorder & hide client tabs from Settings (also drives Overview quota cards)#28

Open
savourylie wants to merge 1 commit into
Nanako0129:mainfrom
savourylie:feat/client-tab-order-and-hide
Open

feat: reorder & hide client tabs from Settings (also drives Overview quota cards)#28
savourylie wants to merge 1 commit into
Nanako0129:mainfrom
savourylie:feat/client-tab-order-and-hide

Conversation

@savourylie

Copy link
Copy Markdown

What

Adds user control over the top client tab bar and keeps the Overview in sync with it:

  • Reorder providers by dragging them in Settings → Client tabs (top bar).
  • Show / hide individual providers via a checkbox. Hidden providers stay listed in
    Settings (so you can re-enable or reorder them) but disappear from the top tabs.
  • The saved order + visibility now also drive the Overview → Agent limits quota cards
    (and the Overview charts), so both views stay consistent. Reordering in Settings and
    dragging the limit cards share one persisted order.
  • The active tab falls back to Overview if the user hides it.

How

  • New persistence + helpers in ClientRegistry (Sources/TokenBarCore/ClientRegistry.swift):
    tabOrderKey / tabHiddenKey, hiddenClients(), displayClients(present:).
  • SettingsPanel gains a "Client tabs (top bar)" section with drag-to-reorder + visibility toggles.
  • PopoverView, SettingsWindowView, and AgentLimitsCard consume ClientRegistry.displayClients(...)
    so ordering/hiding applies to the tab row, the keyboard shortcuts (⌘1–9, [ / ]), and the
    Overview quota cards. The tab-row view (DashboardTabs) itself is unchanged.

Compatibility

  • Preferences live in UserDefaults (tokenbar.tabs.order, tokenbar.tabs.hidden); the
    limits-card order key is unified with the tabs order key.
  • No migration needed — with no saved state, behavior is unchanged (all present clients shown
    in the historical order).
  • Rebased onto current main; builds clean (swift build). The diff touches 5 files and leaves
    the tab-row scroll behavior as-is.

…quota cards)

Adds user control over the top client tab bar and keeps the Overview in sync:

- Reorder providers by dragging them in Settings -> "Client tabs (top bar)".
- Show/hide individual providers via a checkbox; hidden providers stay listed in
  Settings (so you can re-enable or reorder them) but disappear from the top tabs.
- The saved order + visibility also drive the Overview -> Agent limits quota cards
  (and the Overview charts), so both views stay consistent. Reordering in Settings
  and dragging the limit cards share one persisted order.
- The active tab falls back to Overview if the user hides it.

Persistence in UserDefaults (tokenbar.tabs.order, tokenbar.tabs.hidden); the
limits-card order key is unified with the tabs order key. No migration needed:
with no saved state, behavior is unchanged. The tab-row view (DashboardTabs) is
untouched.
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.

1 participant