Skip to content

feat: replace provider buttons with dropdown in model usage widget - #6542

Closed
felixzsh wants to merge 1 commit into
omacom:quattrofrom
felixzsh:model-usage-provider-dropdown
Closed

felixzsh wants to merge 1 commit into
omacom:quattrofrom
felixzsh:model-usage-provider-dropdown

Conversation

@felixzsh

@felixzsh felixzsh commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

this prepares the widget for a lot more providers

multiple provider dropdown navigation

screenrecording-2026-08-07_12-19-31.mp4

Copilot AI balanced review requested due to automatic review settings August 3, 2026 21:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Replaces model-usage provider buttons with a scalable dropdown embedded in the hero header.

Changes:

  • Adds provider dropdown selection and tooltip.
  • Routes popup keyboard input away from panel navigation.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread shell/plugins/model-usage/Panel.qml Outdated
providerDropdown.containsMouse = on
if (on) header.focusHero()
}
onChanged: function(v) { header.selectProviderById(v) }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alredy fixed in last commit

@felixzsh felixzsh changed the title feat: replace hero buttons with dropdown in model usage widget feat: replace provider buttons with dropdown in model usage widget Aug 3, 2026
Copilot AI review requested due to automatic review settings August 3, 2026 21:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@rlimberger rlimberger mentioned this pull request Aug 6, 2026
4 of 7 tasks
@dhh

dhh commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Heads up: #6603 just landed on quattro and restructured this whole area, so this PR needs a rework before it can merge.

The model-usage plugin is gone. It's been renamed to omarchy.agents (shell/plugins/agents/), and the panel is now strictly a display: it watches JSON records under ~/.local/state/omarchy/agents/usage/ and draws whatever appears there. All the in-plugin machinery this PR touches — providers/*.qml adapters and scripts/*_usage_scanner.py — no longer exists.

Usage collection now lives in standalone collectors in bin/. One omarchy-agent-usage-<agent> script per agent prints a complete, display-ready usage record (identity, tier, status, rate limits, today/week/all-time stats), and omarchy-agent-usage-update runs every collector it finds and writes the records atomically to the state directory.

The upside: adding an agent no longer touches the panel at all. Ship a collector that prints the record contract, optionally add an assets/<id>.svg mark (with an -light twin if it needs one for light surfaces), and the panel gains a tab on its own. See shell/plugins/agents/README.md for the contract and the claude/codex collectors in bin/ as reference implementations — #6604 (Cursor) is a good example of a provider PR in the new style.

If you'd like to carry this forward, rebase on quattro and rework it against the new omarchy.agents panel — the change may look quite different there, or may already be moot. Happy to answer questions here.

— Claude Fable 5, written on behalf of @dhh

Copilot AI review requested due to automatic review settings August 7, 2026 16:47
@felixzsh
felixzsh force-pushed the model-usage-provider-dropdown branch 2 times, most recently from 805c830 to 9d7107b Compare August 7, 2026 16:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings August 7, 2026 16:51
@felixzsh
felixzsh force-pushed the model-usage-provider-dropdown branch from 9d7107b to 0ae4c63 Compare August 7, 2026 16:51
@felixzsh

felixzsh commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Heads up: #6603 just landed on quattro and restructured this whole area, so this PR needs a rework before it can merge.

The model-usage plugin is gone. It's been renamed to omarchy.agents (shell/plugins/agents/), and the panel is now strictly a display: it watches JSON records under ~/.local/state/omarchy/agents/usage/ and draws whatever appears there. All the in-plugin machinery this PR touches — providers/*.qml adapters and scripts/*_usage_scanner.py — no longer exists.

Usage collection now lives in standalone collectors in bin/. One omarchy-agent-usage-<agent> script per agent prints a complete, display-ready usage record (identity, tier, status, rate limits, today/week/all-time stats), and omarchy-agent-usage-update runs every collector it finds and writes the records atomically to the state directory.

The upside: adding an agent no longer touches the panel at all. Ship a collector that prints the record contract, optionally add an assets/<id>.svg mark (with an -light twin if it needs one for light surfaces), and the panel gains a tab on its own. See shell/plugins/agents/README.md for the contract and the claude/codex collectors in bin/ as reference implementations — #6604 (Cursor) is a good example of a provider PR in the new style.

If you'd like to carry this forward, rebase on quattro and rework it against the new omarchy.agents panel — the change may look quite different there, or may already be moot. Happy to answer questions here.

— Claude Fable 5, written on behalf of @dhh

rebased and adapted, ready to merge

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

shell/plugins/agents/Panel.qml:326

  • PanelKeyCatcher handles Tab, Enter/Space, and Down with Keys.BeforeItem, but it is blocked only after the popup is already open. Consequently, a keyboard user cannot focus or open this dropdown; the popup is reachable only by clicking, despite rendering the panel cursor ring. Expose the dropdown's toggle() through header and invoke it from onActivateRequested (the existing r shortcut can remain the refresh action).
      blocked: header.dropdownOpen

Copilot AI review requested due to automatic review settings August 7, 2026 17:09
@felixzsh
felixzsh force-pushed the model-usage-provider-dropdown branch from 0ae4c63 to 5eba5c4 Compare August 7, 2026 17:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (1)

shell/plugins/agents/README.md:63

  • The new dropdown documentation conflicts with the Panel overview above, which still says the subscription switch renders “one chip per enabled agent” and that a switch row appears. Update that section to describe the hero dropdown so the README no longer documents the removed UI.
- Panel: `h`/`l` switch subscription, `j`/`k` scroll, `r` refresh, Enter opens
  the provider dropdown while the hero cursor is active (otherwise refresh),

@felixzsh
felixzsh force-pushed the model-usage-provider-dropdown branch from 5eba5c4 to cf4963c Compare August 7, 2026 17:20
Copilot AI review requested due to automatic review settings August 7, 2026 17:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (1)

shell/plugins/agents/Panel.qml:337

  • When only one provider is available, pressing h/l still sets cursorActive = true, but this branch then calls toggleDropdown(), which deliberately does nothing for providerCount <= 1. Enter consequently stops refreshing even though no dropdown exists. Gate this branch on the dropdown actually being available so the documented fallback refresh remains usable.
      onActivateRequested: if (root.cursorActive) { header.toggleDropdown() } else { root.refreshNow() }

Copilot AI review requested due to automatic review settings August 7, 2026 17:25
@felixzsh
felixzsh force-pushed the model-usage-provider-dropdown branch from cf4963c to b8bde6b Compare August 7, 2026 17:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@felixzsh
felixzsh force-pushed the model-usage-provider-dropdown branch from 6fff6a0 to 3606e20 Compare August 28, 2026 21:17
@omarchybot omarchybot added the enhancement New feature or request label Sep 27, 2026
@dhh

dhh commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for this! The agents panel was redesigned in #13770 into a single page with every agent and account at once, so there's no provider switcher left to turn into a dropdown. Closing.

@dhh dhh closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants