feat: reorder & hide client tabs from Settings (also drives Overview quota cards)#28
Open
savourylie wants to merge 1 commit into
Open
feat: reorder & hide client tabs from Settings (also drives Overview quota cards)#28savourylie wants to merge 1 commit into
savourylie wants to merge 1 commit into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds user control over the top client tab bar and keeps the Overview in sync with it:
Settings (so you can re-enable or reorder them) but disappear from the top tabs.
(and the Overview charts), so both views stay consistent. Reordering in Settings and
dragging the limit cards share one persisted order.
How
ClientRegistry(Sources/TokenBarCore/ClientRegistry.swift):tabOrderKey/tabHiddenKey,hiddenClients(),displayClients(present:).SettingsPanelgains a "Client tabs (top bar)" section with drag-to-reorder + visibility toggles.PopoverView,SettingsWindowView, andAgentLimitsCardconsumeClientRegistry.displayClients(...)so ordering/hiding applies to the tab row, the keyboard shortcuts (⌘1–9,
[/]), and theOverview quota cards. The tab-row view (
DashboardTabs) itself is unchanged.Compatibility
UserDefaults(tokenbar.tabs.order,tokenbar.tabs.hidden); thelimits-card order key is unified with the tabs order key.
in the historical order).
main; builds clean (swift build). The diff touches 5 files and leavesthe tab-row scroll behavior as-is.