Skip to content

feat(menu-bar): add rounded usage bars option - #5064

Closed
asonnino wants to merge 1 commit into
steipete:mainfrom
asonnino:rounded-usage-bars
Closed

asonnino wants to merge 1 commit into
steipete:mainfrom
asonnino:rounded-usage-bars

Conversation

@asonnino

Copy link
Copy Markdown

Summary

Adds a Rounded usage bars option (Settings → Menu Bar → Layout, next to "Show window labels"). When enabled, the Usage bar and progress-bar layout tokens render as one continuous capsule in the same style as the Meter bars icon (translucent track, hairline outline, fill clipped to the capsule, same stale dimming) instead of discrete segments.

  • Capsules are 75% of the segmented bar width, so they sit close to the size of the system battery glyph.
  • The fill snaps to half-point (one Retina pixel) steps, so it reads as continuous.
  • Off by default; existing layouts and the segmented style are unchanged.
  • The setting is wired like menuBarLayoutShowWindowLabels: persisted default, editor toggle, live preview, and render cache key.

Screenshot

Stacked merged icon (Claude top, Codex bottom) with Rounded usage bars on, next to the system battery icon:

Rounded usage bars

Notes

  • New strings (menu_bar_layout_rounded_usage_bars, Usage bar, %d%%) are added to every catalog with English text; translations are welcome.
  • No CHANGELOG entry; happy to add one in the house format if wanted.

Testing

  • ./Scripts/compile_and_run.sh: build, packaging, and launch smoke checks pass; verified visually in the menu bar (screenshot above).
  • Updated MenuBarLayoutDisplayOptionsTests and MergedIconSettingsLabelTests for the new binding; full test suite and make check not run locally (swiftformat/swiftlint not installed).

🤖 Generated with Claude Code

Add a "Rounded usage bars" toggle to Menu Bar → Layout that draws the
usage bar and progress bar layout tokens as a continuous capsule,
matching the Meter bars icon style, instead of discrete segments.
Capsules are sized near the system battery glyph and fill in
half-point steps. Off by default; existing layouts are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@clawsweeper

clawsweeper Bot commented Nov 11, 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 Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T22:02:11.935890Z e359501 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.

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

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

let trackFillAlpha: CGFloat = stale ? 0.18 : 0.28
let trackStrokeAlpha: CGFloat = stale ? 0.28 : 0.44
let fillAlpha: CGFloat = stale ? 0.55 : 1.0
return NSImage(size: size, flipped: false) { rect in

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 Preserve inactive-display tint for rounded usage bars

When rounded mode is enabled for a layout whose .usageBar is rendered without a leading icon, this initializer leaves the attachment image non-template. statusImage(title:) rejects that run at its isTemplate != false guard, although the old character-only title was converted into a template image; as the MenuBarLayoutRenderedTitle contract notes, the resulting attachment will not follow AppKit's inactive-display tint, so the bar stays at active brightness on secondary displays. Keep the neutral capsule in an AppKit-owned template path and add a focused regression test.

AGENTS.md reference: AGENTS.md:L5-L5

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 11, 2026
@clawsweeper

clawsweeper Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge.

What this changes

Adds an off-by-default preference that renders compact usage and graphical progress bars as continuous rounded capsules.

Example: A weekly graphical progress token displays 60% usage.

  • Before: The meter displays three filled segments out of five.
  • After: Enabling Rounded usage bars displays a narrower capsule filled to 60%.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Visible rendering has screenshot support, but preference and upgrade validation remain incomplete, a concrete rendering regression blocks merge, and the proposal conflicts with recorded owner direction.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Preference · Worth it: No
User problem: Users who prefer continuous rounded meters cannot select that appearance for custom layout bars.
Reason: The owner explicitly declined another cosmetic bar preference in #5013 (comment); this PR supplies no concrete readability or accessibility problem that warrants reopening that direction.

Merge readiness

⛔ Blocked before merge - 5 items remain

Keep this PR open under repository policy, but do not merge as proposed: the owner previously declined this cosmetic preference, and rounded compact usage bars introduce an inactive-display tint regression.

Priority: P3
Reviewed head: e359501ffde7326f94d0034362a20b5d7a8f565e

Before merge

  • Add real behavior proof - The supplied screenshot directly shows rounded meters in the running menu bar, but does not exercise the new preference interaction or persistence; provide screenshots or a recording showing the toggle updating preview and live bars and surviving relaunch, with sensitive account and endpoint details redacted. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Preserve template tinting for neutral compact usage bars (P2) - With Rounded usage bars enabled, a fresh neutral layout containing .usageBar and no leading icon now receives a capsule image whose isTemplate remains false. statusImage(title:) rejects that attachment at its template guard, so applyMenuBarLayoutContent leaves the bar in the attributed title instead of assigning a template image to the button. The prior character bar could use that template path; the new bitmap therefore stays at active brightness on inactive displays. Preserve template eligibility for neutral capsules while retaining non-template provider colors, and add a focused renderer regression. This independently confirms the concern in feat(menu-bar): add rounded usage bars option #5064 (comment).
  • Product: not worth merging - The owner explicitly declined another cosmetic bar preference in feat(menubar): add a pill bar style for graphical progress bars #5013 (comment); this PR supplies no concrete readability or accessibility problem that warrants reopening that direction.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.
  • Explain or restore the original intent of Graphical bar presentation - d1639ce: The original graphical-bar feature deliberately dropped its separate pill style, and the owner subsequently declined an optional pill preference.

Findings

  • [P2] Preserve template tinting for neutral compact usage bars — Sources/CodexBar/Menu/MenuBarLayoutRenderer.swift:922-926

Provenance

  • Graphical bar presentation changes intended behavior without addressing why it exists (d1639ce: The original graphical-bar feature deliberately dropped its separate pill style, and the owner subsequently declined an optional pill preference.)

Tests

  • Missing end-to-end proof: The screenshot does not demonstrate the toggle updating preview and live bars, persistence after relaunch, or an upgrade from v0.84.0 preserving settings and layouts; no base-failing/head-passing regression run is supplied.
Agent review details

How this fits together

The layout editor persists display preferences that combine with saved tokens and provider usage in the cached renderer, producing preview content and AppKit status-item images.

flowchart TD
 A[Layout editor] --> B[Display preferences]
 B --> E[Cached layout renderer]
 C[Saved layout tokens] --> E
 D[Provider usage] --> E
 E --> F[Settings preview]
 E --> G[Menu bar status item]
Loading

Technical review

Best possible solution:

Retain the existing segmented presentation under the recorded owner decision; any approved reconsideration should preserve the renderer’s neutral template-image path.

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

No existing product bug motivates the preference; source inspection establishes that enabling it for a fresh neutral compact Usage bar without a leading icon prevents template status-image composition.

Is this the best way to solve the issue?

The change reuses the existing settings and rendering owners, but adds a preference the owner explicitly declined and bypasses native dimming for compact bars.

Full review comments:

  • [P2] Preserve template tinting for neutral compact usage bars — Sources/CodexBar/Menu/MenuBarLayoutRenderer.swift:922-926
    With Rounded usage bars enabled, a fresh neutral layout containing .usageBar and no leading icon now receives a capsule image whose isTemplate remains false. statusImage(title:) rejects that attachment at its template guard, so applyMenuBarLayoutContent leaves the bar in the attributed title instead of assigning a template image to the button. The prior character bar could use that template path; the new bitmap therefore stays at active brightness on inactive displays. Preserve template eligibility for neutral capsules while retaining non-template provider colors, and add a focused renderer regression. This independently confirms the concern in feat(menu-bar): add rounded usage bars option #5064 (comment).
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7447bc77c249.

Provenance checked

  • Display preference persistence and rendering keeps the original intent (3a39b1d: The existing window-label preference established additive defaults storage, observation, preview, and cache wiring without changing saved layouts.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Owner explicitly declined the same preference: In feat(menubar): add a pill bar style for graphical progress bars #5013 (comment), steipete declined another persistent cosmetic bar setting and identified a concrete readability or accessibility problem as grounds to revisit rendering.
  • Original graphical-bar scope: The merged graphical-bar commit and feat(menubar): add graphical progress bar layouts #4436 (comment) explicitly record dropping the separate pill style to keep the feature focused. (d1639ce82855)
  • Introduced non-template compact bar: The new compact usage-bar branch creates a non-template capsule attachment; statusImage rejects non-template attachments, preventing the previously eligible neutral title from reaching the AppKit-owned template image path. (Sources/CodexBar/Menu/MenuBarLayoutRenderer.swift:922, e359501ffde7)
  • Runtime screenshot inspected: The downloaded screenshot shows two rounded menu-bar meters beside the system battery icon, supporting the visible capsule rendering described in the PR; it does not show preference interaction, restart persistence, or upgrade behavior. (.github/pr-proof/rounded-usage-bars.png, e359501ffde7)
  • Preference wiring and test scope: The additive Boolean defaults to false and participates in observation, preview, status rendering, and the cache key; the two test edits only supply constant-false bindings and exercise no new rounded behavior. (Sources/CodexBar/Settings/SettingsStore.swift:653, e359501ffde7)
  • Policy and history inspected: Read the complete root AGENTS.md; no nested guidance, maintainer-notes directory, or pr-simplify skill exists. Feature history spans the original layout editor, graphical meters, display preferences, and source-folder move; some older blobs prevent deeper blame and follow inspection. No builds, tests, or account probes were run, and the checkout remains clean. (AGENTS.md, 7447bc77c249)

Likely related people:

  • Peter Steinberger: Raw commit c512c89 adds Sources/CodexBar/Menu/MenuBarLayoutEditor.swift:1175 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c512c897b335; files: Sources/CodexBar/Menu/MenuBarLayoutEditor.swift)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: This is an optional cosmetic preference, disabled by default, with no demonstrated readability or accessibility need.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P3: This is an optional cosmetic preference, disabled by default, with no demonstrated readability or accessibility need.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 11, 2026, 5:08 PM ET / 22:08 UTC.

@asonnino

Copy link
Copy Markdown
Author

Thanks for the reviews! I missed #5013 — closing in line with that decision. I'll keep this as a personal fork.

@asonnino asonnino closed this Nov 11, 2026
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. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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