Skip to content

feat(providers): bring back provider quick-link buttons (#596)#779

Merged
robinebers merged 2 commits into
mainfrom
feat/provider-links
Jun 27, 2026
Merged

feat(providers): bring back provider quick-link buttons (#596)#779
robinebers merged 2 commits into
mainfrom
feat/provider-links

Conversation

@robinebers

@robinebers robinebers commented Jun 27, 2026

Copy link
Copy Markdown
Owner

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

  • Provider gains a links: [ProviderLink] field (default []) and a visibleLinks filter (trim, non-empty, http(s) only) — mirrors the legacy visibleLinks filter.
  • Each provider declares its links inline (ported from the legacy plugins/*/plugin.json): Claude (Status, Dashboard), Codex (Status, Dashboard), Cursor (Status, Dashboard), Grok (Usage). Devin and Antigravity ship none.
  • New ProviderLinksView renders the buttons in a LazyVGrid up to three across (wrapping when more); each opens its URL in the default browser via NSWorkspace.
  • WidgetGroupedListView pins 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.
  • DensitySetting gains expandedGridSpacing for the button grid.
  • feat(dashboard): always-on expand control + 3-across expanded metrics [exploration] (#596) #774's broken ExpandedMetricsGrid (and its test) are removed; expanded metrics stay single-column.

Heads-up

Tests

  • ProviderLinksTests covers visibleLinks: drops empty label/url, whitespace-only, and non-http(s) schemes; trims; keeps valid http(s).
  • swift build clean.

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 visibleLinks filter and the if 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)

  1. Sources/OpenUsage/Views/WidgetGroupedListView.swift, line 168-169 (link)

    P2 The docstring still says the toggle is only shown for providers with expanded metrics, but after this change it is also shown for providers that have links and no expanded rows. Any future provider added with links-only would see the correct caret but a misleading doc comment here.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: Sources/OpenUsage/Views/WidgetGroupedListView.swift
    Line: 168-169
    
    Comment:
    The docstring still says the toggle is only shown for providers with expanded metrics, but after this change it is also shown for providers that have links and no expanded rows. Any future provider added with links-only would see the correct caret but a misleading doc comment here.
    
    
    
    How can I resolve this? If you propose a fix, please make it concise.

    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!

    Fix in Cursor Fix in Claude Code Fix in Codex

Reviews (2): Last reviewed commit: "fix(dashboard): allow tucking a metric p..." | Re-trigger Greptile

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>
@robinebers robinebers merged commit bf7fa4d into main Jun 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bring back provider buttons.

1 participant