feat(plugins): feed plugin snapshots into the menu bar layout renderer
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- swift
- Domain
- backend-api-design, desktop
Research direction
Start with StatusItemController+Animation.swift and the UsageStore.menuBarLayoutRenderData(provider:…), menuBarLayoutWindows(provider:…), and renderedMenuBarLayoutResolution(for:) paths named in the issue. Read the related work in #4761, #4763, #4720, #4784, and #4787, then adapt the #4761 end-to-end test for countdown scheduling and reset-only refreshes. Done when plugin snapshots flow through the shared layout renderer with the described window, reset, ordering, separator, conditional, cached rendering, and balance behavior.
Written by the indexing model from the issue text.
Description
With Merge icons on, Combined icon source set to Current selection, and a user plugin selected, the merged icon shows only the plugin icon and its percentage (the plugin branch of the merged applyIcon in StatusItemController+Animation.swift). Apart from the window picked with Menu bar metric (#4784), the menu bar layout (reset tokens, order, separators, window-specific tokens, conditionals) applies only to built-in providers, so the Percent + reset layout renders 69% · in 1d 12h for Claude and 37% for a plugin.
When closing #4761 and #4763 you described the shape that fits: plugin snapshots feed the existing layout renderer through one adapter, so order, separators, window selection, and the cached rendering from #4720 keep working. The same adapter carries plugin balance: a menuBarBalanceUsesPrepaidCost manifest flag read from the current manifest, with the amount going through the shared balance extractor and formatter, and the adapter itself not depending on that opt-in.
Today the layout path takes a UsageProvider end to end: UsageStore.menuBarLayoutRenderData(provider:…) and menuBarLayoutWindows(provider:…) build the data, MenuBarLayoutRenderData.provider drives the renderer's descriptor lookups (named-extra titles, lane labels, the reset-text fallback in MenuBarLayoutResetText), and renderedMenuBarLayoutResolution(for:) feeds rendering, the observation signature, and the countdown timers. Plugins arrive as a ProviderInstanceID whose firstPartyProvider is nil, which is why #4761 and #4763 each added a side path.
I'd be glad to build the adapter if you want an outside PR for it. Two questions before I start:
- Identity. #4763 built its render data with
provider: .syntheticas a stand-in, so the renderer's descriptor lookups read the Synthetic provider's metadata. I'd rather have the render data and layout resolution take aProviderInstanceID, keep the descriptor lookups for built-ins, and have the adapter map plugin windows, titles, and reset text from the snapshot, with balance going throughMenuBarLayoutBalanceResolver. Does that match what you had in mind, or would you prefer a different seam? - Which layout. #4784 saves each plugin's Menu bar metric as its own layout in the existing overrides, and
menuBarLayout(forPlugin:)defaults to a lone.percent(window: .automatic), with no.icon, rather than the global layout. Should a plugin without its own layout fall back to the global layout like a built-in provider, with the metric picker saving an override as it does for built-ins? Or should plugins keep a separate layout, which needs an icon in its default and a plugin scope in the layout editor? #4784 hasn't shipped, so either default can change without migrating saved plugin layouts.
The end-to-end test from #4761 (countdown scheduling, plus a reset-only refresh through the real store observer) covers behavior the adapter has to keep, and can be adapted as its regression test. If you'd rather build this yourself, that works too; this issue is just to track it.
Related: #4787 fixes the plugin observation signature so a refresh that changes only the chosen Menu bar metric window redraws; the adapter would take over that signature.
cc @AaronJiTuo, since the same adapter would carry the plugin balance from #4763.
Refs #4761, #4763, #4720, #4784, #4787
🤖 Drafted with Claude Code; reviewed by me.
- Dominant language
- Swift
- Stars
- 22.8k
- Forks
- 2.2k
- Avg merge
- 22h 20m
- Merged PRs (30d)
- 380
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from steipete/CodexBar
-
Improve readability of red pace text in stacked menu bar layoutPossibly taken @steipete claimed this 1 day ago. Openclawsweeper:fix-shape-clear clawsweeper:needs-live-repro clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr impact:ux-friction issue-rating: 🐚 platinum hermit P2
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
steipete/CodexBar#4714 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
clawsweeper:fix-shape-clear clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster P3
Difficulty 5/5 Over a week Newbie friendliness 38/100
steipete/CodexBar#4833 · 4 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
MiniMax China web-session discovery does not include minimax.cnPossibly taken @tangwz claimed this 1 day ago. Openclawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:auth-provider issue-rating: 🦞 diamond lobster P2
Difficulty 4/5 3-5 days Newbie friendliness 35/100
steipete/CodexBar#4831 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
CodexBarClaudeWatchdog post-spawn setpgid EACCES race + kill(-pgid) can signal parent process groupPossibly taken @Quinnod345 claimed this 1 day ago. Openclawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:crash-loop issue-rating: 🦞 diamond lobster no-stale P2
Difficulty 4/5 3-5 days Newbie friendliness 35/100
steipete/CodexBar#4829 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
clawsweeper:needs-product-decision clawsweeper:needs-security-review clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:auth-provider impact:ux-release-blocker issue-rating: 🦞 diamond lobster P0
Difficulty 4/5 3-5 days Newbie friendliness 43/100
steipete/CodexBar#4827 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
All issues in steipete/CodexBar
Similar issues
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
simulator-session.yml の simtunnel の固定先が古く、agentd が無いため simtunnel up --wait / status が準備完了を検知できないOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Ebullioscopic/Atoll#900 ·
Maintainers usually reply within 2 days