Repository navigation
Add Color by provider tray icon style - #895
Conversation
Add tinted variants of the bar, stacked, and percent renderers that take an optional provider accent. Pace colors win over the accent, error icons ignore it, and an accent below a 2:1 contrast floor against the tray canvas falls back to the usage-level colors. Existing renderers delegate with no tint, so default output is unchanged.
Store the opt-in Color by provider flag (default off) in settings and the raw serde mirror, and allow it in the portable preferences document so exports and imports carry it.
Add the opt-in tint to the tray plan: a single meter or percent glyph takes the shown provider's effective accent, and each stacked row takes its own provider's accent. The accent is parsed from #RRGGBB and malformed values yield no tint. Expose menu_bar_color_by_provider through the settings patch and the bridge DTO, with tests for default-off parity, accent overrides, and stacked rows.
Add the Color by provider switch below the pace toggle, wired to menuBarColorByProvider in the bridge types, with test fixtures and tests for the set call and the stacked-mode state. Add its label and helper strings to all ten locales, with keys in the Rust and TypeScript lists.
Add one Windows Unreleased line for the tray color-by-provider option, citing upstream steipete#4321.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Summary
Ports upstream "Color by provider" (steipete#4321; upstream commits 2f232d6, fd7fab6, cad61e8, bb64180).
menu_bar_color_by_provider, default off, also allowed in the portable preferences document).effective_accent_color, so per-provider accent overrides apply.*_tintedvariants. The existing functions call them with no tint, so default output is unchanged.Differences from upstream:
Commands run
cargo fmt --all: cleancargo test --manifest-path rust/Cargo.toml: 4734 passed, 1 ignored. Two unrelated tests failed only under full-suite load and passed when run alone (dashboard::coordinatortimeout,grok::accounts::orcafile replace).cargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml: 741 passedcargo clippy -D warningson both manifests: cleanpnpm test: 135 files, 1272 tests passed;pnpm run build: ok (includes locale key check)UI proof
Result: pass, with one gap (tray icon pixels not captured).
feat/color-by-providerat 567f4faC:\Users\FSOS\AppData\Local\Win-CodexBar\cargo-target\repo-bb654619ec0c47e2\worktree-8e72f6650188b478\debug\codexbar-desktop-tauri.exe(built after HEAD)settings:menuBar; CDP port 9371pnpm run tauri:build:debug; launched withCODEXBAR_PROOF_MODEandWEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--remote-debugging-port. CDP drives the Settings page target (trustedInput.dispatchMouseEvent; native<select>set through the React value setter +change) and reads persisted values withget_settings_snapshot. cua-driver 0.34.0 givesverify_state, real-pixelget_window_statescreenshots and DWM facts. Background only: windows parked on the secondary monitor, no foreground or keyboard use. Settings were backed up and byte-restored afterwards.CDP assertions (all passed; log
W:/mac-parity/proof/895/steps.jsonl):menuBarColorByProvider(false at start).get_settings_snapshot().menuBarColorByProvideris true.CUA (
W:/mac-parity/proof/895/):verify_statewindow exists; DWM dark = true under themeauto.01-menubar-before.png,02-menubar-toggled.png,03-menubar-restored.pngNot covered:
SystemTray.NormalButton), but the captured rectangle showed no rendered icon. So the coloured tray icon itself is not proven. Unit tests cover the renderer only.Personal info visible: none in the screenshots. The tray tooltip read during the UIA attempt contains provider status text only.