Skip to content

Add color-coded menu bar icons and separator style option#356

Open
johnlarkin1 wants to merge 1 commit intosteipete:mainfrom
johnlarkin1:upstream-pr/color-menu-bar-gradient
Open

Add color-coded menu bar icons and separator style option#356
johnlarkin1 wants to merge 1 commit intosteipete:mainfrom
johnlarkin1:upstream-pr/color-menu-bar-gradient

Conversation

@johnlarkin1
Copy link

Summary

  • Adds color-coded menu bar icons that tint green → yellow → red based on remaining usage quota
  • Adds a configurable separator style between provider name and usage text in the menu bar (dot, dash, pipe, slash, colon)
  • Both features are opt-in via new toggles in Preferences

New files

File Purpose
UsageColorLevel.swift Maps remaining % to green/yellow/red color thresholds
MenuBarSeparatorStyle.swift Separator enum with display character + preferences picker
Public/bar-usage-pace.png Screenshot for documentation
Public/separator-option.png Screenshot for documentation

Modified files

File Change
StatusItemController+Animation.swift Apply color tint to menu bar icon based on usage level
MenuBarDisplayText.swift Use separator style setting
PreferencesDisplayPane.swift Add separator style picker
PreferencesAdvancedPane.swift Add color-coded icon toggle
SettingsStore*.swift (4 files) Persist new preference keys

Notes

This PR is independent but pairs well with #353 (credential simplification), #354 (weekly projection), and #355 (hourly pace). No code dependencies between them.

Test plan

  • Builds cleanly on upstream/main (swift build)
  • Verify color tinting activates when enabled in Preferences → Advanced
  • Verify separator style picker works in Preferences → Display
  • Verify icon returns to monochrome when color feature is disabled

🤖 Generated with Claude Code

Copy link

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

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: 0d5594b9e5

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

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

_ = self.kimiCookieSource
_ = self.augmentCookieSource
_ = self.ampCookieSource
_ = self.colorCodedIcons

Choose a reason for hiding this comment

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

P2 Badge Track separator-style changes in menu observation token

StatusItemController only refreshes the menu bar when settings.menuObservationToken changes, but this token never reads menuBarSeparatorStyle even though rendering now depends on it (StatusItemController+Animation.swift calls self.settings.menuBarSeparatorStyle in menuBarDisplayText). As a result, changing the Separator picker can leave the menu bar text unchanged until some unrelated setting/store update happens, making the new preference appear broken.

Useful? React with 👍 / 👎.

Copy link
Author

Choose a reason for hiding this comment

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

I agree with CC... this appears to be a false positive of a comment...

The very next line references self.menuBarSeparatorStyle.

@johnlarkin1 johnlarkin1 force-pushed the upstream-pr/color-menu-bar-gradient branch from 0d5594b to 1507031 Compare February 12, 2026 00:22
@johnlarkin1
Copy link
Author

The menuBarSeparatorStyle observation was already included in the PR — line 40 of SettingsStore+MenuObservation.swift reads _ = self.menuBarSeparatorStyle right after _ = self.colorCodedIcons. Both were added together in the initial commit, so this should already be working correctly.

Add UsageColorLevel to tint menu-bar icons green/yellow/red based on
remaining quota, plus a configurable separator style (dot, dash, pipe,
slash, colon) between provider and usage text.

New files:
- UsageColorLevel.swift – threshold logic + NSColor mapping
- MenuBarSeparatorStyle.swift – separator enum + picker
- Public/bar-usage-pace.png, separator-option.png – docs images

Modified:
- StatusItemController+Animation – apply color tint to icon
- MenuBarDisplayText – use separator setting
- PreferencesDisplayPane / PreferencesAdvancedPane – new UI controls
- SettingsStore* – persist new preferences
@johnlarkin1 johnlarkin1 force-pushed the upstream-pr/color-menu-bar-gradient branch from 1507031 to cb9f02b Compare February 12, 2026 00:36
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.

1 participant