Skip to content

Fix quota indicator constraint churn#1319

Merged
steipete merged 1 commit into
mainfrom
fix/quota-indicator-constraint-churn
Jun 5, 2026
Merged

Fix quota indicator constraint churn#1319
steipete merged 1 commit into
mainfrom
fix/quota-indicator-constraint-churn

Conversation

@steipete
Copy link
Copy Markdown
Owner

@steipete steipete commented Jun 5, 2026

Summary

  • Preserve provider-switcher quota indicator constraints when the computed ratio is unchanged.
  • Still replace the fill-width constraint when usage data changes the visible ratio.
  • Add regression coverage for unchanged and changed quota ratios.

Fixes #1303.
Supersedes the unique quota-bar part of #1315, without carrying the already-landed #1297 overlap.

Verification

  • swift test --filter StatusMenuSwitcherRefreshTests
  • make check via autoreview
  • autoreview clean: no accepted/actionable findings
  • ./Scripts/package_app.sh
  • Peekaboo: relaunched /Users/steipete/Projects/codexbar/CodexBar.app and verified menubar click on codexbar-merged

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented Jun 5, 2026

Codex review: needs maintainer review before merge. Reviewed June 5, 2026, 3:30 PM ET / 19:30 UTC.

Summary
This PR guards provider-switcher quota indicator constraint replacement behind a visible-ratio change and adds regression coverage for unchanged versus changed quota ratios.

Reproducibility: yes. Source inspection shows current main replaces quota fill-width constraints on every update with remaining data, and the PR adds deterministic tests for preserving unchanged constraints.

Review metrics: 2 noteworthy metrics.

  • Changed files: 3 files affected. The patch is scoped to switcher quota logic, focused tests, and one release-note entry.
  • Regression tests: 2 added. The tests cover both the no-churn path and the real data-change path for quota constraints.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Next step before merge

  • [P2] Because this is an owner-authored PR with no blocking findings, the remaining action is normal maintainer merge/release judgment rather than an automated repair.

Security
Cleared: No security or supply-chain concern found; the diff only changes Swift UI logic, Swift tests, and the changelog.

Review details

Best possible solution:

Land the focused ratio guard with its regression tests after normal maintainer checks so quota bars update only when their visible fill ratio changes.

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

Yes. Source inspection shows current main replaces quota fill-width constraints on every update with remaining data, and the PR adds deterministic tests for preserving unchanged constraints.

Is this the best way to solve the issue?

Yes. The ratio guard is the narrowest maintainable fix because it avoids redundant Auto Layout churn while still replacing the constraint when usage data changes the visible ratio.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against de55f4850b8d.

Label changes

Label changes:

  • add P1: The PR targets a menu responsiveness regression affecting provider switching for users with many providers enabled.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this owner-authored PR; the body still reports focused tests, packaging, and Peekaboo validation.

Label justifications:

  • P1: The PR targets a menu responsiveness regression affecting provider switching for users with many providers enabled.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this owner-authored PR; the body still reports focused tests, packaging, and Peekaboo validation.
Evidence reviewed

What I checked:

Likely related people:

  • steipete: Current main blame points the quota indicator update/fill code through Peter Steinberger's release-line history, and the reviewed PR commit is also authored by him. (role: recent area contributor; confidence: high; commits: 723734ef3422, b2d5129a6fc3, f93446730e98; files: Sources/CodexBar/StatusItemController+SwitcherViews.swift, Tests/CodexBarTests/StatusMenuSwitcherRefreshTests.swift, CHANGELOG.md)
  • Brandon Charleson: Commit 53a7f22 restored the full-width provider switcher quota bars and introduced the quota indicator structure and refresh path that this PR narrows. (role: introduced related behavior; confidence: high; commits: 53a7f22885dc; files: Sources/CodexBar/StatusItemController+SwitcherViews.swift, Tests/CodexBarTests/StatusMenuSwitcherClickTests.swift)
  • Yuxin Qiao: Recent provider-switcher layout work touched the same UI surface shortly before the quota-bar restoration and may be useful routing context for switcher layout regressions. (role: adjacent switcher contributor; confidence: medium; commits: 2ff00f6d8e66; files: Sources/CodexBar/StatusItemController+SwitcherViews.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@clawsweeper clawsweeper Bot added 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. P1 Urgent regression or broken agent/channel workflow affecting real users now. labels Jun 5, 2026
@steipete steipete merged commit af2c754 into main Jun 5, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1 Urgent regression or broken agent/channel workflow affecting real users now. 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.

Bug: Menu bar dropdown remains unresponsive on macOS despite changelog fixes

1 participant