Skip to content

Add per-provider menu bar percent window picker - #3124

Merged
steipete merged 1 commit into
steipete:mainfrom
J2TeamNNL:upstream-pr/menu-bar-percent-window
Sep 9, 2026
Merged

steipete merged 1 commit into
steipete:mainfrom
J2TeamNNL:upstream-pr/menu-bar-percent-window

Conversation

@J2TeamNNL

@J2TeamNNL J2TeamNNL commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Choose Auto, Session, or Weekly as the percent window in provider settings. Choices follow provider capabilities, and the picker appears only for applicable Icon and Percent layouts. It edits top-level percent tokens for that provider while preserving the global style, custom conditional tokens, and direct lane tokens.

Built on the landed reset-window support in #3481. Paired V3 tests verify explicit reset tokens, conditional libraries, and other providers’ overrides survive a percent change and reload.

Validation: focused picker/renderer tests, paired persistence tests, a full standalone suite, and independent review passed. Signed native pointer proof changed Codex to Weekly while Claude stayed Auto, then verified reconstruction. The final combined tree passes 122 focused tests and formatting/lint; its full suite and exact-head CI are the final landing gates.

Includes UI documentation and an Unreleased entry. Thanks @J2TeamNNL!

Synthetic proof captures:

Synthetic provider percent pickers before changing Codex

Synthetic Codex Weekly selection with Claude remaining Auto

@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@J2TeamNNL

Copy link
Copy Markdown
Contributor Author

Heads up: this touches the same spot in PreferencesProviderDetailView.swift as #3123. They are independent changes — whichever lands second needs a one-line rebase in that file.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0964dfd42e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Sources/CodexBar/ProviderMenuBarPercentWindowSettingsView.swift Outdated
Comment thread Sources/CodexBar/ProviderMenuBarPercentWindowSettingsView.swift Outdated
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 21, 2026
@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed September 9, 2026, 1:47 PM ET / 17:47 UTC (Revision 5).

ClawSweeper review

What this changes

Adds an Auto, Session, or Weekly percentage picker to provider settings, reusing existing layout storage while preserving other tokens and the global icon style.

Merge readiness

Ready for maintainer review

This remains a useful, maintainer-engaged usability improvement. Both earlier findings are resolved, native evidence demonstrates the picker interaction, and no blocking defect was found. Repository policy also excludes automatic closure.

Priority: P3
Reviewed head: 7ccdbbee2cd8db630cfa52404333471240905983

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable change with native interaction proof and regression coverage for the previously reported defects.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected native before/after captures exercise the production provider picker in a synthetic macOS host, showing Codex changing to Weekly while Claude remains Auto; owner-reported reconstruction and focused persistence coverage support the saved result.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected native before/after captures exercise the production provider picker in a synthetic macOS host, showing Codex changing to Weekly while Claude remains Auto; owner-reported reconstruction and focused persistence coverage support the saved result.
Evidence reviewed 7 items Repository policy and review scope: Read the complete root AGENTS.md. No nested AGENTS.md or maintainer-notes directory was found. Applied guidance on preserving provider isolation, reusing helpers, modern observation, and avoiding Keychain access. Builds and tests were not executed under the read-only review contract.
Complete introduced change inspected: Inspected all seven introduced files against the pinned base: 220 production lines, 300 test lines, and five documentation/changelog lines added. The checkout remains clean.
Earlier findings resolved: Visibility now requires Icon and Percent mode, persistence calls the provider layout setter without changing global style, and available choices derive from descriptor capabilities and semantic windows. Tests cover balance-only Mistral, OpenRouter, Codex, and preservation of Critters style. Owner replies explicitly confirm both repairs: #3124 (comment) and #3124 (comment).
Findings None None.
Security None None.

How this fits together

CodexBar turns provider usage snapshots and saved menu bar layouts into status-item text. The new picker edits the selected provider’s percentage tokens before the existing renderer consumes that layout.

flowchart LR
  A[Provider capabilities] --> C[Provider settings picker]
  B[Existing layout and icon style] --> C
  C --> D[Update top-level percent tokens]
  D --> E[Saved provider layout]
  E --> F[Menu bar renderer]
  G[Provider usage snapshot] --> F
  F --> H[Menu bar percentage]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test growth production +220, tests +300 Production growth implements the simpler settings control; tests cover capability filtering, token preservation, persistence, and native interaction.

Technical review

Best possible solution:

Keep the simplified picker as a thin editor over existing provider layouts, with advanced token composition remaining in the layout editor.

Do we have a high-confidence way to reproduce the issue?

Not applicable to this usability feature; the supplied native captures demonstrate the new selection flow, and source inspection confirms the earlier defects are repaired.

Is this the best way to solve the issue?

Yes. The picker reuses the existing provider override and renderer rather than creating competing persisted state, and owner discussion supports the narrowed behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 07c8794735fd.

Labels

Label justifications:

  • P3: This improves discoverability of an existing layout capability without addressing an urgent runtime failure.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected native before/after captures exercise the production provider picker in a synthetic macOS host, showing Codex changing to Weekly while Claude remains Auto; owner-reported reconstruction and focused persistence coverage support the saved result.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected native before/after captures exercise the production provider picker in a synthetic macOS host, showing Codex changing to Weekly while Claude remains Auto; owner-reported reconstruction and focused persistence coverage support the saved result.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected native before/after captures exercise the production provider picker in a synthetic macOS host, showing Codex changing to Weekly while Claude remains Auto; owner-reported reconstruction and focused persistence coverage support the saved result.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincent-peng: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-08-21T16:22:53.296Z sha 0964dfd :: needs real behavior proof before merge. :: [P1] Keep non-percent menu-bar styles unchanged | [P2] Offer only windows the provider can render
  • reviewed 2026-09-04T10:34:47.100Z sha 370b399 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-09T16:42:51.390Z sha df4c25d :: needs changes before merge. :: none
  • reviewed 2026-09-09T17:15:27.826Z sha 7ccdbbe :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. and removed P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Sep 4, 2026
@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 9, 2026
Preserve provider capabilities, conditional and reset tokens, and the global icon style; verify V3 reconstruction and native picker interaction.

Co-authored-by: Nguyễn Nam Long <j2teamnnl@gmail.com>
@steipete
steipete force-pushed the upstream-pr/menu-bar-percent-window branch from df4c25d to 7ccdbbe Compare September 9, 2026 17:11
@steipete
steipete merged commit 8f0ee6b into steipete:main Sep 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants