Skip to content

Add optional colors for menu bar quota pace - #3429

Open
jb510 wants to merge 1 commit into
steipete:mainfrom
jb510:jb/color-quota-pace
Open

Add optional colors for menu bar quota pace#3429
jb510 wants to merge 1 commit into
steipete:mainfrom
jb510:jb/color-quota-pace

Conversation

@jb510

@jb510 jb510 commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Menu bar pace currently requires remembering what its sign means. Add an opt-in “Color pace” toggle under Menu Bar → Layout: usage behind the expected pace is green (reserve), usage ahead is red (risk of early exhaustion), and zero or unavailable pace remains neutral.

The existing Session, Weekly, and Auto pace tokens retain their signed values. The preview uses the same renderer, stale colors remain dimmed, and the setting participates in render caching and settings observation. Existing layouts and the default monochrome appearance are preserved. Includes settings labels in all supported locales.

The toggle uses the existing token renderer and leaves layout serialization unchanged.

Validation:

  • 57 focused checks passed across renderer, settings persistence/observation, and a temporary visual-rendering harness.
  • Renderer output visually checked in light and dark appearances.
  • Debug app packaged successfully; bundle signatures verified; isolated launch stayed running.
  • Full-repository SwiftFormat and SwiftLint passed; all 22 locale catalogs passed.
  • Plugin TypeScript validation passed with an isolated type root. The unmodified check otherwise picks up incomplete ambient types from the parent home directory.
  • All 1,011 final-source Swift test selections passed across the initial run and resumed run (755 + 256). Two timing-sensitive checks passed on automatic retry. Five source-line anchors in architecture tests were updated; all 41 architecture checks passed.
  • make check is blocked locally by an unchanged process-cleanup fixture timing failure: test_timeout_drains_separate_child_group_after_parent_exits_on_term reports that fixture identities were not observed before drain. The same test fails in isolation.

Live UI verification: the debug app was launched alongside the installed app without replacing it; the Color pace switch appeared under Menu Bar → Layout, and the live + pace value rendered red for ahead-of-pace usage. The renderer examples also use the actual AppKit renderer with synthetic values.

Closes #3428

@clawsweeper

clawsweeper Bot commented Sep 5, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-05T01:29:11.293626Z d1e2623 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper

clawsweeper Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed September 4, 2026, 9:30 PM ET / September 5, 2026, 01:30 UTC.

ClawSweeper review

What this changes

Adds a default-off “Color pace” preference that colors signed menu-bar quota pace and its preview, with persisted settings, translations, documentation, and focused tests.

Merge readiness

Blocked before merge - 3 items remain

Keep open: this is a focused, distinct contribution not present on pinned main or v0.56.5, and it remains paired with the author's open feature request. No blocking correctness defect was found; the repository profile also prohibits automatic cleanup closure.

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

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The implementation is focused and has relevant regression coverage, but the reported native UI verification lacks inspectable evidence required before merge.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: The captured body reports the packaged debug app's live status item displaying a red positive pace value and the new switch, but provides no inspectable capture or runtime output for that result or the shared preview. The scenario-specific account is useful, but tests and narrative alone do not satisfy the UI-proof gate. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The captured body reports the packaged debug app's live status item displaying a red positive pace value and the new switch, but provides no inspectable capture or runtime output for that result or the shared preview. The scenario-specific account is useful, but tests and narrative alone do not satisfy the UI-proof gate. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 9 items Applicable repository policy: Read the complete root AGENTS.md. No nested AGENTS.md or maintainer-notes directory was found. Applied its shared-helper, isolated-settings-test, and UI screenshot guidance; this read-only review did not run builds, tests, or formatters.
Pinned introduction and patch scope: The checkout matches the original PR head and its raw recorded parent is pinned main. Inspected the introduced Swift, test, documentation, and localization changes: 35 files, 255 additions, and 12 deletions, without dependency, workflow, or build-script changes.
Current main does not provide this preference: Pinned main renders pace tokens using the ordinary text attributes and has no Color pace control. Searches across source and documentation found no existing equivalent menu-bar preference; existing CLI coloring is a different display surface.
Findings None None.
Security None None.

How this fits together

CodexBar turns provider usage and reset timing into signed quota-pace values. Its shared menu-bar layout renderer combines those values with display preferences to produce the live status-item title and Settings preview.

flowchart LR
  A[Provider usage and reset timing] --> B[Signed pace text and rounded values]
  C[Saved Color pace preference] --> D[Shared layout renderer]
  B --> D
  D --> E[Optional color with stale dimming]
  E --> F[Live menu bar]
  E --> G[Settings preview]
Loading

Decision needed

Question Recommendation
Should Menu Bar → Layout gain this default-off green-for-reserve and red-for-ahead Color pace preference? Accept the opt-in preference: Approve this bounded addition once the contributor supplies inspectable UI evidence, retaining signed text and the monochrome default.

Why: The patch adds a permanent user-facing preference, while the supplied discussion contains only contributor-requested direction; technical correctness cannot establish product acceptance.

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The captured body reports the packaged debug app's live status item displaying a red positive pace value and the new switch, but provides no inspectable capture or runtime output for that result or the shared preview. The scenario-specific account is useful, but tests and narrative alone do not satisfy the UI-proof gate. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Complete next step (P2) - Attach inspectable evidence from the reported native UI run and obtain approval for the new Color pace preference before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta Production Swift +48/−4; tests +134/−8; localization +69 across 23 catalogs Production growth is explained by the optional preference and shared rendering integration, with more added test code than production code.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #3428
Summary: This PR is the explicitly linked implementation candidate for the same author's open optional-color request; neither item should close before resolution.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Use optional color as a supplement to readable signed pace, preserving monochrome defaults, saved layouts, neutral values, and stale-state visibility.

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

Not applicable: this proposes optional visual behavior rather than reporting a broken existing contract. Source inspection establishes the current monochrome behavior; no runtime reproduction was executed.

Is this the best way to solve the issue?

Yes, technically: extending the existing renderer with its already-rounded pace metrics avoids parallel tokens or another calculation path, and the additive default-off key preserves existing layouts.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is optional visual ergonomics with the existing monochrome behavior preserved, not a broken workflow or urgent regression.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The captured body reports the packaged debug app's live status item displaying a red positive pace value and the new switch, but provides no inspectable capture or runtime output for that result or the shared preview. The scenario-specific account is useful, but tests and narrative alone do not satisfy the UI-proof gate. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P3: This is optional visual ergonomics with the existing monochrome behavior preserved, not a broken workflow or urgent regression.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The captured body reports the packaged debug app's live status item displaying a red positive pace value and the new switch, but provides no inspectable capture or runtime output for that result or the shared preview. The scenario-specific account is useful, but tests and narrative alone do not satisfy the UI-proof gate. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Applicable repository policy: Read the complete root AGENTS.md. No nested AGENTS.md or maintainer-notes directory was found. Applied its shared-helper, isolated-settings-test, and UI screenshot guidance; this read-only review did not run builds, tests, or formatters. (AGENTS.md:1, d1e26232dc84)
  • Pinned introduction and patch scope: The checkout matches the original PR head and its raw recorded parent is pinned main. Inspected the introduced Swift, test, documentation, and localization changes: 35 files, 255 additions, and 12 deletions, without dependency, workflow, or build-script changes. (d1e26232dc84)
  • Current main does not provide this preference: Pinned main renders pace tokens using the ordinary text attributes and has no Color pace control. Searches across source and documentation found no existing equivalent menu-bar preference; existing CLI coloring is a different display surface. (Sources/CodexBar/MenuBarLayoutRenderer.swift:449, 96b83b7b9f15)
  • Latest supplied release comparison: Verified v0.56.5 resolves to the supplied release commit. Its pace renderer also uses ordinary text attributes and its render options contain no colorPace setting, so the requested capability is not already shipped there. (Sources/CodexBar/MenuBarLayoutRenderer.swift:449, 1039ea68ea2c)
  • Rendering and refresh behavior: The introduced color branch reads existing rounded numeric pace metrics, preserves signed text, leaves zero or unavailable metrics neutral, and dims stale colors. Both production and preview callers pass the preference; render caching and settings observation include it. (Sources/CodexBar/MenuBarLayoutRenderer.swift:454, d1e26232dc84)
  • Additive settings and focused coverage: The new Boolean reads false when absent and its setter writes only its own key; layout serialization and existing preference writes are unchanged. The dictionary-backed settings test covers default-off behavior, observation, persistence, and reloading; four renderer tests cover colors, neutral tokens, cache changes, stale dimming, and high contrast. (Tests/CodexBarTests/MenuBarPaceColorSettingsTests.swift:27, d1e26232dc84)

Likely related people:

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

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach redacted screenshots or a recording from the reported fresh debug-bundle run showing the live colored pace and preview, including unchanged default-off behavior with existing settings; a concrete runtime transcript is also acceptable. Remove account details, keys, IP addresses, and other private information.
  • After attaching proof, update the PR body to trigger a fresh review; if it does not run, ask a maintainer to comment @clawsweeper re-review.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make menu bar quota pace easier to interpret with optional colors

1 participant