Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
Adds selectable robot or usage-percentage icons to the model-usage bar widget.
Changes:
- Adds a right-click icon-style menu with refresh.
- Persists the selected style in shell settings.
- Documents the new setting and interactions.
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.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
shell/plugins/model-usage/Panel.qml |
Implements icon styles, menu, persistence, and usage chips. |
shell/plugins/model-usage/manifest.json |
Defines the new style setting. |
shell/plugins/model-usage/README.md |
Documents settings and interactions. |
shell/plugins/bar/README.md |
Updates the widget interaction reference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (2)
test/shell.d/model-usage-icon-style-test.sh:27
- These persistence checks only match source text; they never instantiate the QML, call
setIconStyle, or observeupdateEntryInline, so they pass even when the interaction is broken at runtime. Extend the existing bar-widget QML contract fixture to invoke both style choices and assert the effective style, preserved nested settings, and captured persistence payload.
assert(/for \(var key in root\.settings\) if \(key !== "id"\) entry\[key\] = root\.settings\[key\]/.test(panelSource), 'model-usage carries the existing settings into the persisted entry')
assert(/entry\.barIconStyle = style[\s\S]*root\.settings = entry[\s\S]*updateEntryInline/.test(panelSource), 'model-usage applies the picked style locally and writes it to shell.json')
shell/plugins/model-usage/Panel.qml:24
- The style menu is separate from
Panel.opened, but the inherited canonicalclose()only hides the main panel. Consequently, aftermenu()or a right-click opens this popup, bothomarchy-shell ... closeandshell hideleave it visible (Bar.hideBarWidgetcalls the widget'sclose()). Overrideclose()to clearstyleMenuOpenas well as hiding the panel controller, matching other widgets that own multiple popups.
property bool styleMenuOpen: false
|
I like this! But I’d prefer the provider icons to align with the other bar icons and use the same monochrome styling: black or white, depending on the theme. |
|
I like the idea, but we don't need a menu for this. Just have right-click do the toggle between the icons. Needs to be updated for the new agent panel too. |
|
Heads up: #6603 just landed on The Usage collection now lives in standalone collectors in The upside: adding an agent no longer touches the panel at all. Ship a collector that prints the record contract, optionally add an If you'd like to carry this forward, rebase on — Claude Fable 5, written on behalf of @dhh |
Right-clicking on the icon swaps between the robot icon and the old usage metrics
6722432 to
ae5c3a3
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (2)
shell/plugins/agents/Panel.qml:693
- On transparent bars this chooses the Codex SVG variant from the configured bar background, even though that background is not rendered.
Bar.qmlinstead computesbarForegroundfrom the wallpaper (Bar.qml:779-815), so a light wallpaper with a dark configured background selects the white Codex mark and makes it disappear. Derive the effective surface from the contrast-aware foreground when the bar is transparent.
surfaceColor: root.bar ? root.bar.background : Color.bar.background
shell/plugins/agents/Panel.qml:289
- The PR description promises a right-click menu for choosing either icon style, but this handler changes the style immediately and no menu is introduced. That is materially different interaction behavior (and the attached design can no longer be reached); either restore the described menu or update the PR description/demo to make the direct toggle the intended contract.
if (buttonCode === Qt.RightButton) toggleIconStyle()
|
@dhh changed it to swap on right-click and updated everything to work with the agents panel. screenrecording-2026-08-07_19-20-53.mp4 |
|
@monorkin this is nice! |
The new icon looks clean, but the old one was quite useful because it would tell you at a glance what your usage was - like the battery or wifi icons do. This PR adds the ability to swap between the two icon styles with a right-click menu.
screenrecording-2026-08-06_09-53-58.mp4
The design is inspired by the tray icons right-click menu. The default icon is the robot.