feat(providers): bring back provider quick-link buttons (#596)#779
Merged
Conversation
Each provider ships quick-link buttons (Status / Dashboard / Usage) in its card's expanded section, opening the provider's own pages in the default browser. Links are declared per-provider (ported from the legacy Tauri edition's manifests) and ride the runtime Provider value, so no layout persistence change is needed. Buttons lay out up to three across and collapse with the caret — part of the expander, not always-visible chrome. - Provider gains a links: [ProviderLink] field (default []) + visibleLinks filter (trim, non-empty, http(s) only) - ProviderLinksView renders the button grid; WidgetGroupedListView pins it at the bottom of the collapsible expanded section - DensitySetting gains expandedGridSpacing for the button grid - Tests cover the visibleLinks boundary filter Co-authored-by: Cursor <cursoragent@cursor.com>
metricTargetIDs only treated the caret as a drop target when a provider had expanded metrics, so a links-only expanded section (buttons, no metrics) never accepted a drop. Gate on hasExpandedContent (metrics OR links) so a metric can be dragged past the caret to tuck it below the fold even when only buttons are showing. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
TL;DR
Brings back per-provider quick-link buttons (Status / Dashboard / Usage) in each provider card's expanded section, opening the provider's own pages in the default browser. Closes #596. Supersedes #774.
What was happening
The native Swift rewrite dropped the legacy Tauri edition's per-provider quick-link buttons (Status / Console / Dashboard / Usage). Issue #596 asked to bring them back. #774 explored a 3-across expanded-metrics grid for #596 but didn't add the links, and that grid overflowed/overlapped text rows (Today / Yesterday / Last 30 Days) at the popover width.
What this changes
Providergains alinks: [ProviderLink]field (default[]) and avisibleLinksfilter (trim, non-empty,http(s)only) — mirrors the legacyvisibleLinksfilter.plugins/*/plugin.json): Claude (Status, Dashboard), Codex (Status, Dashboard), Cursor (Status, Dashboard), Grok (Usage). Devin and Antigravity ship none.ProviderLinksViewrenders the buttons in aLazyVGridup to three across (wrapping when more); each opens its URL in the default browser viaNSWorkspace.WidgetGroupedListViewpins the button row at the bottom of the collapsible expanded section — collapsing the caret hides the buttons along with the expanded metrics. The caret now appears for any provider with expanded content (metrics or links), so a links-only provider still gets a caret.DensitySettinggainsexpandedGridSpacingfor the button grid.ExpandedMetricsGrid(and its test) are removed; expanded metrics stay single-column.Heads-up
Providervalue fromWidgetRegistry; layout persistence is id-based, so no migration.expandedGridSpacing(originally added by feat(dashboard): always-on expand control + 3-across expanded metrics [exploration] (#596) #774 for the metrics grid) — kept for the button spacing.Tests
ProviderLinksTestscoversvisibleLinks: drops empty label/url, whitespace-only, and non-http(s)schemes; trims; keeps validhttp(s).swift buildclean.Screenshots
Attached below — provider card expanded, buttons pinned at the bottom of the expanded section.
Made with Cursor
Confidence Score: 5/5
Safe to merge — additive feature with no changes to existing data paths, URL validation guarded by both the
visibleLinksfilter and theif let url = URL(string:)check in the button action.The change is purely additive: new fields default to empty so existing providers need no update, URL handling is validated at two layers, the new view is well-isolated, and the test suite covers all edge cases of the filter. No existing functionality is modified in a way that could regress.
No files require special attention.
Comments Outside Diff (1)
Sources/OpenUsage/Views/WidgetGroupedListView.swift, line 168-169 (link)Prompt To Fix With AI
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Reviews (2): Last reviewed commit: "fix(dashboard): allow tucking a metric p..." | Re-trigger Greptile