Skip to content

Add option to hide quota warning markers#918

Merged
steipete merged 4 commits into
steipete:mainfrom
ThiagoCAltoe:hide-quota-warning-markers
May 12, 2026
Merged

Add option to hide quota warning markers#918
steipete merged 4 commits into
steipete:mainfrom
ThiagoCAltoe:hide-quota-warning-markers

Conversation

@ThiagoCAltoe
Copy link
Copy Markdown
Contributor

Summary

  • add a Display setting to hide quota warning threshold markers on usage bars
  • keep quota warning notifications/thresholds active while suppressing only the visual tick marks
  • preserve existing behavior by defaulting the new setting to enabled
  • add localized strings and cover the default in SettingsStore tests

Closes #916

Validation

  • git diff --check
  • rg -n "quotaWarningMarkersVisible|show_quota_warning_markers" Sources Tests

Note: full Swift tests were not run here because this environment does not have swift installed.

Copy link
Copy Markdown

@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: 758c5c862b

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

PreferenceToggleRow(
title: L("show_quota_warning_markers_title"),
subtitle: L("show_quota_warning_markers_subtitle"),
binding: self.$settings.quotaWarningMarkersVisible)
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 Hide markers in the status menu model

When this new toggle is turned off, it only affects the settings/provider preview path because PreferencesProvidersPane.quotaWarningMarkerThresholds checks quotaWarningMarkersVisible; the actual menu card built by StatusItemController+MenuCardModel.swift still passes resolved quota-warning thresholds whenever warnings are enabled. In the main menu-bar UI, configured warning tick marks therefore remain visible despite this Display setting being disabled, so the option does not work for the primary usage bars.

Useful? React with 👍 / 👎.

@steipete steipete merged commit 009420a into steipete:main May 12, 2026
4 checks passed
LeoLin990405 added a commit to LeoLin990405/CodexBar that referenced this pull request May 12, 2026
The upstream steipete#918 merge inlined the markers-visible default load directly
inside loadDefaultsState, which pushed that function body to 153 lines —
past the 150-line SwiftLint threshold. The four other quotaWarning*
flags already live in a single `LoadedQuotaWarningDefaults` helper struct;
add markersVisible there for the same naming/lifecycle grouping. Net
effect: loadDefaultsState ships 5 lines lighter, lint passes again, and
the quota-warning config stays cohesive in one place.
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 quota threshold tick marks optional on usage bars

2 participants