Add option to hide quota warning markers#918
Conversation
There was a problem hiding this comment.
💡 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) |
There was a problem hiding this comment.
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 👍 / 👎.
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.
Summary
Closes #916
Validation
git diff --checkrg -n "quotaWarningMarkersVisible|show_quota_warning_markers" Sources TestsNote: full Swift tests were not run here because this environment does not have
swiftinstalled.