Skip to content

Add per-provider quota row visibility - #3123

Open
J2TeamNNL wants to merge 1 commit into
steipete:mainfrom
J2TeamNNL:upstream-pr/quota-row-visibility
Open

Add per-provider quota row visibility#3123
J2TeamNNL wants to merge 1 commit into
steipete:mainfrom
J2TeamNNL:upstream-pr/quota-row-visibility

Conversation

@J2TeamNNL

Copy link
Copy Markdown
Contributor

Summary

Providers report a growing number of extra quota lanes beyond session/weekly — Claude's
model-scoped weekly limits (Fable, Design, …), Antigravity's per-model quotas, Factory's
core windows — and the menu renders all of them. Today the only way to trim that list is a
one-off toggle per lane family (claudeDailyRoutinesUsageVisible,
codexSparkUsageVisible, copilotBudgetExtrasEnabled), which needs new code and a new
setting for every family that appears.

This adds the generic version: a per-provider set of hidden row IDs, so a user can hide the
individual lanes they never use.

Changes

  • QuotaRowVisibilityState: pure set arithmetic for the hidden-ID storage, kept out of
    SettingsStore so it is testable without constructing a store.
  • SettingsStore accessors (hiddenQuotaRowIDs(for:), setQuotaRow(_:visible:for:),
    showAllQuotaRows(for:)) persisted under hiddenQuotaRowIDs, plus menu observation so
    the menu re-renders on change.
  • Model.Input.hiddenQuotaRowIDs filters extraRateWindowMetrics. The existing
    Codex Spark and Daily Routines filters are unchanged and still apply on top.
  • ProviderQuotaRowVisibilitySettingsView: a "Quota rows" section in the provider pane.
    Rows come from the latest snapshot rather than a hard-coded list, so it follows whatever
    the account exposes; rows the user hid stay listed so they can be restored, plus a
    "Show all" button.
  • Only the menu rows are filtered — fetches, quota warnings, and history are untouched.
  • Three new strings, translated in all 22 catalogs.

Commands run

  • swift build --target CodexBar — clean (typechecks the whole module)
  • node Scripts/check-app-locales.mjsApp locales OK: Checked 22 catalogs against 1482 English keys.

Notes

  • The new tests avoid constructing a SettingsStore so they cannot reach Keychain-backed
    stores, per the testing guidance in AGENTS.md.
  • If this direction is welcome, the existing per-family toggles could later fold into the
    same mechanism; this PR deliberately leaves them alone.

Verification caveat

Developed on a machine with only CommandLineTools and no Xcode, so make test and
swiftlint could not run here (Testing module unavailable; swiftlint fails loading
sourcekitdInProc), and there is no screenshot of the new section for the same reason.
Relying on CI for the suite — happy to iterate on anything it flags.

Providers can report a dozen extra quota lanes beyond session/weekly —
Claude's model-scoped weekly limits (Fable, Design, ...), Antigravity's
per-model quotas, and so on — and the menu shows all of them. Today the only
way to trim that list is the one-off toggles that exist per lane family
(claudeDailyRoutinesUsageVisible, codexSparkUsageVisible).

Add a generic per-provider set of hidden row IDs with a checkbox list in the
provider pane, discovered from the latest snapshot rather than hard-coded so it
follows whatever lanes the account actually exposes. Hidden rows stay listed in
settings so they can be restored, alongside a Show all button.

Only the menu rows are filtered; fetches, quota warnings, and history are
untouched.
@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.

@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: 7c735a2ca1

ℹ️ 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".


private func binding(for id: String) -> Binding<Bool> {
Binding(
get: { self.settings.isQuotaRowVisible(id, for: self.provider) },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reflect upstream visibility gates in quota checkboxes

When optional credits/extra usage, Codex Spark usage, or Claude Daily Routines usage is disabled, the snapshot rows remain listed here and this getter still reports them as checked because it consults only the hidden-ID set; however, extraRateWindowMetrics removes those rows through the existing family-level gates. Consequently, a checkbox can claim that a row is visible while it is absent from the menu, and toggling it or using “Show all” cannot restore it. Make these bindings or their enabled/visible state account for the existing gates.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. 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 real behavior proof before merge. Reviewed August 21, 2026, 12:20 PM ET / 16:20 UTC.

ClawSweeper review

What this changes

Adds a stored per-provider hidden-row list and provider-pane checkboxes to suppress reported extra quota rows from the menu.

Merge readiness

Blocked until real behavior proof is added - 9 items remain

Keep open for product sponsorship and repair: the new picker can report rows as visible while existing display settings intentionally suppress them from the menu, and no after-fix UI proof is provided.

Priority: P3
Reviewed head: 7c735a2ca1ea9b3be2d23ef7e3fe127176140dbc
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation has useful focused tests, but an observable P2 settings/menu mismatch and missing real UI proof prevent merge readiness.
Proof confidence 🧂 unranked krab (1/6) Needs real behavior proof before merge: The PR has build and locale-check claims but no after-fix settings-pane/menu demonstration; add a redacted screenshot, recording, terminal output, or runtime log showing hide and restore behavior, then update the PR body for re-review.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR has build and locale-check claims but no after-fix settings-pane/menu demonstration; add a redacted screenshot, recording, terminal output, or runtime log showing hide and restore behavior, then update the PR body for re-review.
Evidence reviewed 6 items Picker ignores existing display gates: The new pane derives every reported extra window from the snapshot and binds each checkbox solely to the hidden-ID set, so it does not represent whether the menu can currently render that row.
Menu retains family-level suppression: The menu still removes all Codex optional extras and Copilot extras, and removes Codex Spark or Claude Daily Routines under their existing settings after the new hidden-ID filtering.
Existing review identifies the same observable mismatch: The posted P2 review explains that the checkboxes remain checked when upstream visibility settings remove the corresponding menu rows, and that Show all cannot restore them.
Findings 1 actionable finding [P2] Reflect existing visibility gates in the row toggles
Security None None.

Live Verification

Command: swift build --target CodexBar

Result: FAIL (failed) — execution before step 1 run: sh -lc pnpm install --ignore-scripts --frozen-lockfile failed: ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-11.22.0.tgz

sh -lc pnpm install --ignore-scripts --frozen-lockfile failed: ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-11.22.0.tgz

Assertions:

  • FAIL expect_output: Build of target: 'CodexBar' complete!

How this fits together

Provider adapters produce usage snapshots containing primary limits and extra quota windows. The provider settings pane stores display preferences, which the menu-card model applies before rendering menu rows.

flowchart LR
    A[Provider usage snapshot] --> B[Extra quota rows]
    B --> C[Provider settings pane]
    C --> D[Per-row visibility preference]
    G[Existing family visibility settings] --> E[Menu-card display decision]
    D --> E
    E --> F[Rendered menu rows]
Loading

Decision needed

Question Recommendation
Should CodexBar adopt a generic persisted per-provider quota-row visibility control alongside its curated family-level display settings? Sponsor the generic control: Keep the feature, but require it to respect existing family-level gates and receive focused UI proof before merge.

Why: The branch adds a broad new user preference rather than repairing an established contract, and the discussion contains no maintainer approval for the lasting settings direction.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR has build and locale-check claims but no after-fix settings-pane/menu demonstration; add a redacted screenshot, recording, terminal output, or runtime log showing hide and restore behavior, then update the PR body for re-review.
  • Reflect existing visibility gates in the row toggles (P2) - The binding only consults the hidden-ID set, but the menu still suppresses rows through the Codex optional-usage, Copilot budget, Codex Spark, and Claude Daily Routines gates. This leaves checked rows that are absent from the menu, and “Show all” cannot restore them; filter or disable the unavailable rows and cover those states.
  • Resolve merge risk (P1) - Existing users who disabled Codex optional extras, Copilot budget extras, or Claude Daily Routines can see enabled row controls for rows that remain absent from the menu.
  • Resolve merge risk (P1) - This adds a persistent generic settings surface without a recorded maintainer decision on whether per-row provider display policy should be supported.
  • Resolve merge risk (P1) - The branch has no after-fix settings-pane/menu evidence, so the UI behavior and restoration path remain unverified.
  • Complete next step (P2) - A maintainer must first sponsor the new generic preference; the contributor must then repair the concrete gate mismatch and provide real UI proof.
  • Improve patch quality - Make row controls reflect the existing family-level visibility gates and add focused regression coverage.
  • Improve patch quality - Post redacted after-fix proof showing a quota row disappear from and return to the menu.

Findings

  • [P2] Reflect existing visibility gates in the row toggles — Sources/CodexBar/ProviderQuotaRowVisibilitySettingsView.swift:66-69
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Source and test delta production +247/-3, tests +117/-0 Most production growth is the new persisted setting, SwiftUI pane, and 23 localized catalogs; the tests currently cover hidden-ID arithmetic but not the existing gate interaction.
Files affected 33 files affected; 23 localization catalogs changed The feature spans menu rendering, settings persistence, UI, tests, and all app-localization catalogs.

Merge-risk options

Maintainer options:

  1. Preserve existing visibility semantics (recommended)
    Make checkbox state and Show all account for the existing Codex, Copilot, and Claude family-level gates, with focused regression coverage.
  2. Pause for settings-direction review
    Do not merge the new persistent preference until a maintainer confirms that generic per-row configuration is a supported product direction.

Technical review

Best possible solution:

If sponsored, make the row picker reflect the existing display gates, add regression coverage for those gate combinations, and provide a redacted after-fix settings-to-menu demonstration.

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

Yes—source inspection provides a high-confidence path: disable an existing family-level gate while its snapshot still has extra rows; the new pane marks them visible while the menu removes them.

Is this the best way to solve the issue?

No—the branch does not yet preserve the established visibility gates. A row picker must reflect both the global/family gate and the per-row preference.

Full review comments:

  • [P2] Reflect existing visibility gates in the row toggles — Sources/CodexBar/ProviderQuotaRowVisibilitySettingsView.swift:66-69
    The binding only consults the hidden-ID set, but the menu still suppresses rows through the Codex optional-usage, Copilot budget, Codex Spark, and Claude Daily Routines gates. This leaves checked rows that are absent from the menu, and “Show all” cannot restore them; filter or disable the unavailable rows and cover those states.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against f74117aeb7a9.

Labels

Label changes:

  • add P3: This is a new settings capability, not an urgent regression in existing behavior.
  • add merge-risk: 🚨 compatibility: Existing display preferences can leave the new controls claiming visible rows that the menu still suppresses.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR has build and locale-check claims but no after-fix settings-pane/menu demonstration; add a redacted screenshot, recording, terminal output, or runtime log showing hide and restore behavior, then update the PR body for re-review.

Label justifications:

  • P3: This is a new settings capability, not an urgent regression in existing behavior.
  • merge-risk: 🚨 compatibility: Existing display preferences can leave the new controls claiming visible rows that the menu still suppresses.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR has build and locale-check claims but no after-fix settings-pane/menu demonstration; add a redacted screenshot, recording, terminal output, or runtime log showing hide and restore behavior, then update the PR body for re-review.

Evidence

What I checked:

Likely related people:

  • sf-jin-ku: Recent main history shows work on the menu-card quota helper. (role: recent quota-presentation contributor; confidence: medium; commits: 5691a02f804b; files: Sources/CodexBar/MenuCardView+ModelHelpers.swift)
  • steipete: Authored the current main tip and repository release work adjacent to this settings surface. (role: recent main-branch contributor; confidence: medium; commits: f74117aeb7a9, 22a2168842a9; files: Sources/CodexBar/PreferencesProviderDetailView.swift, Sources/CodexBar/SettingsStore+MenuPreferences.swift)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant