feat(plugins): feed plugin snapshots into the menu bar layout renderer
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- swift
- Ambito
- backend-api-design, desktop
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Swift
- Stelle
- 22.8k
- Fork
- 2.2k
- Merge medio
- 22h 20m
- PR unite (30g)
- 380
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di steipete/CodexBar
-
Improve readability of red pace text in stacked menu bar layoutForse già presa @steipete l’ha presa 1 giorno fa. Apertaclawsweeper: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
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
steipete/CodexBar#4714 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
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
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
steipete/CodexBar#4833 · 4 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
MiniMax China web-session discovery does not include minimax.cnForse già presa @tangwz l’ha presa 1 giorno fa. Apertaclawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:auth-provider issue-rating: 🦞 diamond lobster P2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
steipete/CodexBar#4831 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
CodexBarClaudeWatchdog post-spawn setpgid EACCES race + kill(-pgid) can signal parent process groupForse già presa @Quinnod345 l’ha presa 1 giorno fa. Apertaclawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:crash-loop issue-rating: 🦞 diamond lobster no-stale P2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
steipete/CodexBar#4829 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
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
Difficoltà 4/5 3-5 giorni Idoneità per principianti 43/100
steipete/CodexBar#4827 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di steipete/CodexBar
Issue simili
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
simulator-session.yml の simtunnel の固定先が古く、agentd が無いため simtunnel up --wait / status が準備完了を検知できないAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Ebullioscopic/Atoll#900 ·
I maintainer di solito rispondono entro 2 giorni