Repository navigation
feat(plugins): allow built-in provider branding per snapshot - #4801
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR lets plugin snapshots select a bundled provider logo while preserving the plugin’s identity and usage source. Example: An aggregator switches from Claude to Codex while usage remains at 75% remaining.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open for a maintainer decision on the additive plugin API; both earlier invalidation findings are fixed, and no further actionable code defect was found. Priority: P2 Decision needed
Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherPlugin engines validate JavaScript results into UsageSnapshot values, which the app’s observation and menu owners render using cached bundled images. flowchart LR
A[Plugin snapshot] --> B[Shared snapshot mapper]
B --> C[UsageSnapshot]
C --> D[Icon observation]
C --> E[Menu reuse signature]
D --> F[Cached branding renderer]
E --> F
Technical reviewBest possible solution: If accepted, keep the optional branding hint in the shared snapshot contract and retain the existing rendering, fallback, and invalidation owners. Do we have a high-confidence way to reproduce the issue? This is a new capability: current main renders plugin branding from the manifest, and source inspection confirms it lacks per-snapshot logo selection. Is this the best way to solve the issue? The implementation is focused and preserves existing ownership: both engines use the shared validator, snapshot copies retain the hint, and existing observation signatures invalidate affected images. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5f93dc3068b3. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 27, 2026, 5:00 AM ET / 09:00 UTC (Revision 2). |
|
Addressed both invalidation findings in the current head:
Added a native controller lifecycle regression using in-memory defaults/stores and synthetic snapshots. It publishes Claude → Codex → manifest at the same 75% remaining and the same timestamp, waits for the real store observer to update the status button (no manual redraw for the transitions), checks its pixels, calls the real menu populate/reuse path, and checks the recreated switcher image. An unchanged follow-up keeps the switcher. This test failed before the fix at both signatures and switcher reuse, and passes now. Runtime output: Compatibility proof: a pre-icon serialized snapshot and version-1 plugin configuration (including opaque plugin settings/secrets) decode and round-trip without losing their data. A separate sandboxed integration run exercised the actual CPAMC consumer against old and new packaged CLIs, both engines, auto and all four provider choices: 20 cases passed, with networking and writes to the real home denied. Focused tests now pass 3 app tests and 5 plugin tests; changed-file strict lint/format and diff checks pass. The initial complete The public API direction still needs maintainer acceptance; I am not treating that as approved or merging this PR. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
The reviewed head is now also packaged and running as a local 0.82.1 build, with the capability-gated aggregator consumer enabled. Installation preserved the existing plugin configuration and approval file unchanged. Bundle integrity and packaged resource/startup checks passed; the controller lifecycle regression and 20 old/new-CLI offline compatibility cases pass on this head. I cannot capture the real menu-bar transitions from the target Mac without its screen-recording permission, so I am not claiming that the requested screenshot/recording proof is complete. The PR remains open for that evidence and maintainer acceptance of the additive API. No further code findings were reported in the latest review. |
Consolidate signature construction while preserving built-in redraw dependencies and the plugin meter fallback. Co-authored-by: Vincent Peng <mail@vincentpeng.me>
Integrate the reviewed selected-window refresh fix while retaining branding-only invalidation for the menu bar and switcher. Co-authored-by: Fabian Kliebhan <fabi@mac-mini.tatex-gmbh.de>
…mmaries and selected-window refresh (#4787, #4801, #4802) Lands the reviewed plugin stack as one merge so each contributor PR keeps its own commits: - #4787: the saved plugin percentage window now feeds the menu-bar icon's observation signature, so a change in only that quota (for example a monthly one) redraws instead of showing a stale percentage. - #4801: plugin snapshots can opt into a built-in provider's branding per snapshot on both plugin engines; branding is display metadata only and never borrows another provider's identity or usage. - #4802: plugins can publish a compact multi-quota menu-bar summary (ordered window-backed items with per-item logos, genuine zero distinct from unavailable, one status item and menu); an empty or omitted summary falls back to the saved percentage window. Co-authored-by: Vincent Peng <mail@vincentpeng.me> Co-authored-by: Fabian Kliebhan <fabi@mac-mini.tatex-gmbh.de>
Summary
Allow each plugin snapshot to choose a bundled provider logo with optional
iconProvider, while keeping plugin identity, credentials and quota ownership unchanged. Omitting the hint restores the manifest logo. The field is validated on both plugin engines, survives snapshot copies/serialization, and is advertised throughctx.env.supportsIconProvider.The menu bar and retained provider switcher refresh when only branding changes. Shared brand images are copied before switcher sizing. Thanks @KLIEBHAN!
Dependency
Land #4787 first. This head includes its selected-window observation fix at
7381b29222729a164b4a74598432946144d8371dand adds branding to the same signature helper.Verification
Head:
0fb9d4289290d8269f4f795e21c84d4a4cf89c94.Result:
Test run with 348 tests in 16 suites passed. Tests ran with the repository's scrubbed test environment through the shared build lock.make checkpassed:Found 0 violations, 0 serious in 3134 files. Catalog precheck andgit diff --checkpassed. Independent P0–P2 review found no actionable issues.CI: https://github.com/steipete/CodexBar/actions/runs/41056936003 — success on the exact head.
Synthetic branding proof
These are cropped logo areas from the synthetic controller test. The test separately asserts unchanged 75% remaining and retained-switcher refresh. No running-app screenshot, account data or credentials were used; capture hooks are not committed.
Manifest → Claude → Codex:
Refs #4787, #4789. Full layout-token integration remains separate from branding.