Skip to content

Port upstream 0.50.1 - #341

Merged
Finesssee merged 10 commits into
mainfrom
port/upstream-0.50.1-wave5
Aug 18, 2026
Merged

Port upstream 0.50.1#341
Finesssee merged 10 commits into
mainfrom
port/upstream-0.50.1-wave5

Conversation

@Finesssee

Copy link
Copy Markdown
Collaborator

Port upstream CodexBar 0.50.1 → Win-CodexBar (Wave 5)

Ports upstream CodexBar 0.50.1 changes into Win-CodexBar. Built on top of port/upstream-0.50.0 (prior waves 0.49.0–0.50.0).

Ported

PR # Item Commit Notes
steipete#2951 Cursor rename locale keys 7855400d7 weekly_label: "Auto"→"Cursor", plan_period_label → "Cursor and Third Party"
steipete#2949 Ollama cookie stripping 7855400d7 Added strip_curl_cookie_wrapper, curl prefix + Cookie: label stripping in normalize_cookie_header
steipete#2957 OpenCode Go 5h/weekly pace 5f3096160 Added pace_json(), session pace in CLI JSON + text output
steipete#2974 Charts x-axis date labels aaff37982 Centered axis labels on bar/point centers (absolute positioning instead of space-between)
steipete#2340 Kiro re-authenticate 547faeb81 Added run_kiro_login(), wired into trigger_provider_login, emits login-phase events
steipete#2960 Serve identity per-request fc32e4641 --identity now optional; follows hide_personal_info setting when absent

Skipped (no port needed — already correct or not applicable)

PR # Item Reason
steipete#2971/steipete#2973 Release checksum basename Already correct: windows-release-build.ps1 uses Split-Path -Leaf
steipete#2952 Codex app-server diagnostics N/A: Win-CodexBar uses OAuth REST API, no CLI app-server process
steipete#2958 Vertex AI quota matching N/A: Win-CodexBar doesn't implement Cloud Monitoring quota fetching
steipete#2948 Safely-priced Codex totals Already safe: Rust crate sums only priced entries, skips None costs

Deferred (require larger feature implementation)

PR # Item Reason
steipete#2946 Codex routed models pricing Needs route-prefix parsing, codexModelsDevProviderIDs set, multi-target models_dev_pricing::lookup
steipete#2944 Codex auth.json read-only Core principle met; opt-in external OAuth source feature is a large new feature
steipete#2932 Codex known-zero history Needs history_coverage_established for completed-empty scans; fork-retry concept doesn't exist in Rust scanner
steipete#2821/steipete#2947 Mistral PAYG spend Needs MonthlyPlan MetricPreference variant, tray text renderer extension, Vibe API fetch
steipete#2976 Menu cost summary style Entire CostSummaryDisplayStyle feature doesn't exist; needs enum, settings, per-provider registry, MenuCard gating
steipete#2972 Per-provider accent color Needs accent_color field in ProviderConfig, tauri command, frontend settings UI, CSS var injection
steipete#2963 Antigravity dashboard lanes Needs provider-specific make_windows branch to deduplicate quota-summary rows
steipete#2516 Claude revoked vs missing OAuth Needs ProviderError::OAuthRevoked variant, keyring ACL-revoked detection, CLI throttle, capture-age display

Skipped (per task instructions — do NOT port)

PR # Item
steipete#2945 macOS Dock minimize tile
steipete#2645 Claude model-scoped weekly quotas widget
steipete#2904/steipete#2950 Workday tick-mark appearances

Gate checks

  • cargo fmt --all — clean
  • cargo clippy --manifest-path rust/Cargo.toml -p codexbar -- -D warnings — clean
  • cargo check for both manifests — compiles
  • pnpm --dir apps/desktop-tauri run build — passes
  • pnpm --dir apps/desktop-tauri test — 261 tests pass (43 files)

@Finesssee

Copy link
Copy Markdown
Collaborator Author

Thermo-nuclear code-quality review: blocking on two structural/gate issues.

  1. This cumulative PR inherits Port upstream CodexBar 0.49.4-0.49.6 #338's OpenCode monolith: the billing subsystem pushes rust/src/providers/opencode/mod.rs past 1,000 lines. Please extract it into providers/opencode/billing.rs and restack this PR.

  2. This wave independently pushes rust/src/providers/ollama/mod.rs from roughly 975 to 1,025 lines. Cookie normalization/recognition/import behavior and its tests form a clear providers/ollama/cookies.rs boundary; please extract them rather than growing the provider entrypoint past 1k.

The hosted Local check is also currently failing cargo fmt --check, so the branch needs formatting and a green rerun before merge.

@Finesssee

Copy link
Copy Markdown
Collaborator Author

Updated with all remaining Wave 5 items. No deferrals. All 18 PORT items now implemented:

Original 6: Cursor rename, Ollama cookie stripping, OpenCode Go pace, Charts x-axis, Kiro re-authenticate, Serve identity
Backend 5: Codex routed pricing, Codex auth.json read-only, Codex known-zero, Antigravity dashboard lanes, Claude OAuth revoked
Frontend 3: Mistral PAYG spend, Cost-summary display style, Per-provider accent color

Gate checks: all pass (cargo fmt, clippy, test, pnpm test, pnpm build).

@Finesssee

Copy link
Copy Markdown
Collaborator Author

Follow-up thermo-nuclear review on head 2ac0e827: still blocking. The branch expanded substantially without resolving the inherited structural issues, and it adds two more.

  1. The cumulative tree still contains Port upstream CodexBar 0.49.4-0.49.6 #338's 1,108-line opencode/mod.rs; extract billing into providers/opencode/billing.rs.
  2. Ollama still grows by another 49 lines instead of extracting cookie normalization/recognition/import behavior into providers/ollama/cookies.rs.
  3. Routed-model pricing pushes rust/src/core/cost_pricing.rs from 993 to 1,044 lines. Provider-route recognition, prefix stripping, and models.dev lookup policy form a clean Codex-pricing module and should be extracted before crossing 1k.
  4. AccentColorSection bypasses the canonical settings-update flow. It adds three bespoke Tauri commands, three TS wrappers, its own load effect, duplicate saved/input state, and duplicate frontend/backend validation for a value already present in the parent settings snapshot. Pass the current color and onSettingsChange into the section like MenuBarMetricSection; delete the special command path.
  5. GitHub currently reports the branch as CONFLICTING / DIRTY with no current check rollup. Local gate results do not validate the eventual conflict resolution against current main.

Please rebase, resolve the inherited module blockers, and simplify the accent-setting path before another review.

@Finesssee
Finesssee force-pushed the port/upstream-0.50.1-wave5 branch 2 times, most recently from e1cdde0 to 5f54f4a Compare August 18, 2026 20:09
…n-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.
… 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
@Finesssee
Finesssee force-pushed the port/upstream-0.50.1-wave5 branch from 5f54f4a to 521e3e5 Compare August 18, 2026 20:27
@Finesssee
Finesssee merged commit 8db6541 into main Aug 18, 2026
1 check passed
@Finesssee
Finesssee deleted the port/upstream-0.50.1-wave5 branch August 18, 2026 20:29
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