Add per-provider accent color override - #2972
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@steipete this should let you make edits going forward now. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6be3c4d328
ℹ️ 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".
|
Codex review: needs real behavior proof before merge. Reviewed August 16, 2026, 4:17 AM ET / 08:17 UTC. ClawSweeper reviewWhat this changesAdds a per-provider accent-color override stored in configuration and applied across native usage views, widgets, sync, and the served dashboard. Merge readiness⛔ Blocked until stronger real behavior proof is added - 5 items remain Keep open. Current main still uses fixed provider branding colors, while this PR adds a new persisted and synced setting; VISION.md requires sign-off for that feature and the supplied screenshots are not live runtime proof. Priority: P2 Review scores
Verification
How this fits togetherCodexBar reads provider configuration to render status in the menu bar, settings, widgets, and web dashboard. This feature adds a cosmetic setting that flows from local config through sync and display-specific color resolution. flowchart LR
A[Provider settings] --> B[Local configuration]
B --> C[Accent color resolver]
C --> D[Menu and charts]
C --> E[Widget shared defaults]
B --> F[Cross-device sync]
B --> G[Web dashboard]
Decision needed
Why: VISION.md requires sign-off for new features and data-storage behavior; the code review cannot determine whether this extra long-term settings surface is desired. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Ship the setting only after owner sign-off and redacted live evidence of changing and resetting a color, including at least one affected consumer surface. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes a feature, not a reported defect; live validation is still needed for its stated behavior. Is this the best way to solve the issue? Unclear: the implementation follows existing configuration and sync patterns, but VISION.md requires maintainer sign-off before accepting this new persistent setting. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d0f35f36950b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
6be3c4d to
8a09453
Compare
62c1ac7 to
7445026
Compare
@steipete should def be setup correct now. |
Every provider settings card gets an accent color row: swatch, hex field, color well, and a reset shown only when an override exists. Descriptor colors stay compile-time constants, so a reset restores the shipped color. Overrides persist as ProviderConfig.accentColor in ~/.codexbar/config.json, which reaches the app and the codexbar serve dashboard, and mirror into App Group defaults for the widget, which cannot read that file. Overrides sync across Macs via ProviderIntentPayload. Translations for the 22 non-English catalogs are machine-generated and want a native-speaker pass.
7445026 to
099bf56
Compare
… per-provider accent color Item 1 — Mistral PAYG current-month API spend (steipete#2821, steipete#2947): - Add MonthlyPlan variant to MetricPreference enum - Add currency_symbol field to CostSnapshot with with_currency_symbol builder - Set currency_symbol from Mistral billing API response - Add MonthlyPlan to bridge label/parse, tray selected_metric_percent (None = no bar) - Show formatted cost amount in provider_status_label for MonthlyPlan - Add format_cost_amount helper in bridge.rs - Add Mistral monthly spend row in MenuCardDetails - Add monthlyPlan option to MenuBarMetricSection for Mistral Item 2 — Menu cost-summary display style per provider (steipete#2976): - Add CostSummaryDisplayStyle enum (Compact/Detailed/Hidden) in types.rs - Add cost_summary_display_style field to Settings + Default + RawSettings round-trip - Add to SettingsSnapshot bridge + SettingsUpdate + apply in Tauri commands - Add bridge label/parse functions - Apply in MenuCardDetails: hidden hides cost section, compact shows used/limit only - Update describeCard to filter hasCost for hidden style - Add Select control in UsageSpendTab Item 3 — Per-provider accent color override (steipete#2972): - Add accent_color field to ProviderConfig - Add brand_color(ProviderId) function in provider.rs (mirrors frontend registry) - Add accent_color/set_accent_color/effective_accent_color accessors in Settings - Add set/get/get_effective Tauri commands + normalize_hex_accent_color validator - Add providerAccentColors map to SettingsSnapshot bridge - Add setProviderAccentColor/getProviderAccentColor/getProviderEffectiveAccentColor to tauri.ts - Create AccentColorSection component (hex input, color picker, reset button) - Inject --provider-accent CSS variable on MenuCard article and ChartsSection - Update menu-metric__bar-fill and chart colors to use --provider-accent fallback - Update chartPalette providerCostColor/providerCreditsColor fallback chain - Pass providerAccentColors through TrayPanel/PopOutPanel/ProvidersTab/ProviderDetailPane Also: - Add 11 new locale keys to all 7 .ftl files + keys.ts - Add costSummaryDisplayStyle + providerAccentColors to all test mock SettingsSnapshot - Update chartPalette tests for --provider-accent fallback
… per-provider accent color Item 1 — Mistral PAYG current-month API spend (steipete#2821, steipete#2947): - Add MonthlyPlan variant to MetricPreference enum - Add currency_symbol field to CostSnapshot with with_currency_symbol builder - Set currency_symbol from Mistral billing API response - Add MonthlyPlan to bridge label/parse, tray selected_metric_percent (None = no bar) - Show formatted cost amount in provider_status_label for MonthlyPlan - Add format_cost_amount helper in bridge.rs - Add Mistral monthly spend row in MenuCardDetails - Add monthlyPlan option to MenuBarMetricSection for Mistral Item 2 — Menu cost-summary display style per provider (steipete#2976): - Add CostSummaryDisplayStyle enum (Compact/Detailed/Hidden) in types.rs - Add cost_summary_display_style field to Settings + Default + RawSettings round-trip - Add to SettingsSnapshot bridge + SettingsUpdate + apply in Tauri commands - Add bridge label/parse functions - Apply in MenuCardDetails: hidden hides cost section, compact shows used/limit only - Update describeCard to filter hasCost for hidden style - Add Select control in UsageSpendTab Item 3 — Per-provider accent color override (steipete#2972): - Add accent_color field to ProviderConfig - Add brand_color(ProviderId) function in provider.rs (mirrors frontend registry) - Add accent_color/set_accent_color/effective_accent_color accessors in Settings - Add set/get/get_effective Tauri commands + normalize_hex_accent_color validator - Add providerAccentColors map to SettingsSnapshot bridge - Add setProviderAccentColor/getProviderAccentColor/getProviderEffectiveAccentColor to tauri.ts - Create AccentColorSection component (hex input, color picker, reset button) - Inject --provider-accent CSS variable on MenuCard article and ChartsSection - Update menu-metric__bar-fill and chart colors to use --provider-accent fallback - Update chartPalette providerCostColor/providerCreditsColor fallback chain - Pass providerAccentColors through TrayPanel/PopOutPanel/ProvidersTab/ProviderDetailPane Also: - Add 11 new locale keys to all 7 .ftl files + keys.ts - Add costSummaryDisplayStyle + providerAccentColors to all test mock SettingsSnapshot - Update chartPalette tests for --provider-accent fallback
* Port upstream 0.50.1: Cursor rename + Ollama cookie stripping (steipete#2951, steipete#2949) * Port upstream 0.50.1: OpenCode Go session+weekly pace in CLI (steipete#2957) * Port upstream 0.50.1: chart axis label centering (steipete#2974) * Port upstream 0.50.1: Kiro re-authenticate via kiro-cli login (steipete#2340) * Port upstream 0.50.1: serve identity follows app redaction per-request (steipete#2960) * Port upstream 0.50.1: Codex routed pricing, auth.json read-only, known-zero history, Antigravity dashboard lanes, Claude OAuth revoked detection steipete#2946 Codex routed models pricing — codex_routed_provider() + strip_route_prefix() in cost_pricing.rs; deepseek/, kimi/, opencode/ routes price against matching models.dev provider; unknown provider/ prefixes return None. steipete#2944 Codex auth.json read-only during refresh — codex_external_oauth_sources_allowed setting (default OFF); is_external_oauth + last_refresh fields on CodexCredentials; enforce_external_oauth_gate (8-day staleness window). steipete#2932 Codex known-zero history — known_zero field on CostSummary; set in both cache-debounce and full-scan paths (history_coverage_established && sessions_count == 0); knownZero JSON field + CLI text update. steipete#2963 Antigravity dashboard lanes — quota-bucket dedup in parse_user_status; models sharing the same (remaining_fraction, reset_time) collapse to one lane. steipete#2516 Claude revoked vs missing OAuth — ProviderError::OAuthRevoked variant; revocation detection (401/403 with revoked/invalid_grant/token_revoked); 15-min CLI result cache (LazyLock<Mutex<Option<CachedCliResult>>>); fetch_via_auto returns cached CLI result when OAuth revoked, and stale cache when all live sources fail. * Port upstream 0.50.1: Mistral PAYG spend, cost-summary display style, per-provider accent color Item 1 — Mistral PAYG current-month API spend (steipete#2821, steipete#2947): - Add MonthlyPlan variant to MetricPreference enum - Add currency_symbol field to CostSnapshot with with_currency_symbol builder - Set currency_symbol from Mistral billing API response - Add MonthlyPlan to bridge label/parse, tray selected_metric_percent (None = no bar) - Show formatted cost amount in provider_status_label for MonthlyPlan - Add format_cost_amount helper in bridge.rs - Add Mistral monthly spend row in MenuCardDetails - Add monthlyPlan option to MenuBarMetricSection for Mistral Item 2 — Menu cost-summary display style per provider (steipete#2976): - Add CostSummaryDisplayStyle enum (Compact/Detailed/Hidden) in types.rs - Add cost_summary_display_style field to Settings + Default + RawSettings round-trip - Add to SettingsSnapshot bridge + SettingsUpdate + apply in Tauri commands - Add bridge label/parse functions - Apply in MenuCardDetails: hidden hides cost section, compact shows used/limit only - Update describeCard to filter hasCost for hidden style - Add Select control in UsageSpendTab Item 3 — Per-provider accent color override (steipete#2972): - Add accent_color field to ProviderConfig - Add brand_color(ProviderId) function in provider.rs (mirrors frontend registry) - Add accent_color/set_accent_color/effective_accent_color accessors in Settings - Add set/get/get_effective Tauri commands + normalize_hex_accent_color validator - Add providerAccentColors map to SettingsSnapshot bridge - Add setProviderAccentColor/getProviderAccentColor/getProviderEffectiveAccentColor to tauri.ts - Create AccentColorSection component (hex input, color picker, reset button) - Inject --provider-accent CSS variable on MenuCard article and ChartsSection - Update menu-metric__bar-fill and chart colors to use --provider-accent fallback - Update chartPalette providerCostColor/providerCreditsColor fallback chain - Pass providerAccentColors through TrayPanel/PopOutPanel/ProvidersTab/ProviderDetailPane Also: - Add 11 new locale keys to all 7 .ftl files + keys.ts - Add costSummaryDisplayStyle + providerAccentColors to all test mock SettingsSnapshot - Update chartPalette tests for --provider-accent fallback * Resolve merge conflicts and fix gate checks * Thermo-nuclear: extract ollama cookies, codex pricing, simplify accent color * fix: correct serde attribute placement on currency_symbol after rebase

Summary
Each provider settings card gets an Accent color row. The row shows a swatch, a hex
field, and a color well. A Reset button appears only when an override exists.
Provider descriptors keep the shipped color as a compile-time constant. This feature
never writes over that constant, so a reset always restores the original color.
What changes
The override applies to every surface that paints the provider brand color:
codexbar serveweb dashboard.Out of scope:
burnDownWidgetColor,confettiPalette, and all bar styling other thancolor.
Storage
ProviderConfig.accentColorholds the value as#RRGGBBin~/.codexbar/config.json.That file reaches the app and the
codexbar servedashboard directly.The widget runs in a sandbox and cannot read that file. The app therefore mirrors the
resolved map into the App Group defaults, and reloads widget timelines when a color
moves.
Overrides travel between Macs through
ProviderIntentPayload, with the same semanticsas the other fields in that payload.
Implementation notes
file cannot break the load.
it stores the hex.
affectsBackgroundWork: false. Open menus and status itemsrebuild, but no provider refresh occurs.
updateQuotaIndicators()now refreshes the indicator color outside the ratio guard.The switcher view outlives a menu update, so a new color must not wait for usage to
move.
Commands run
swift buildswift test --filter ProviderAccentColorTests(12 tests, all pass)make checkmake testScreenshots
The row on a provider card, with no override. The hex field shows the shipped color.
The same row with an override. Reset appears only in this state.
Usage bars in the shipped color and in the override.
These are rendered components, not captures of the running Settings window.
ProviderAccentColorScreenshotRenderTestsproduces them, and it is skipped by default:Notes for review
The 22 non-English catalogs carry machine-generated translations. They pass the token
and coverage checks, but a native speaker should review the wording.
ProviderArchitectureGatekeeperTestspins one allowlist entry by line number. Thisbranch adds lines to
SettingsStore.swift, so that entry moves from 1048 to 1058. Onlythe line number changes.