Skip to content

Port upstream CodexBar 0.50.0 - #339

Merged
Finesssee merged 5 commits into
mainfrom
port/upstream-0.50.0
Aug 18, 2026
Merged

Port upstream CodexBar 0.50.0#339
Finesssee merged 5 commits into
mainfrom
port/upstream-0.50.0

Conversation

@Finesssee

Copy link
Copy Markdown
Collaborator

Port of upstream steipete/CodexBar v0.50.0 (stacked on #338; read-only consumption of tagged sources, zero upstream contact).

Ported

Item Notes
Cursor app session preference (steipete#2398) New providers/cursor/app_auth.rs: reads Cursor's read-only state.vscdb (%APPDATA%\Cursor\User\globalStorage) for cursorAuth/accessToken, rebuilds the WorkosCursorSessionToken cookie from the JWT subject, and Automatic mode tries it before browser cookies. Validated sessions persist via the cookie-header cache (15-min TTL so the app's own token rotation wins); a rejected app session logs and falls back to the browser import. SQLite opened read-only with 250ms busy timeout + immutable-mode retry only when WAL sidecars are gone. 4 unit tests
Tokens/Cost chart switch (steipete#2930) New get_daily_token_history in the cost scanner (Codex exact local totals from the packed-days cache; Claude from the de-duplicated record walk). ProviderChartData carries tokensHistory + tokensIncomplete (Codex backfill not yet at window depth → "Refreshing" marker). Settings charts gain a Tokens tab, defaulting active for Codex; new TokensHistoryChart with integer formatting. Locale keys DetailChartTokens / DetailChartRefreshing added to all 7 catalogs (check-locale green). 4 new frontend tests + serde roundtrip
Codex custom-backend guidance (steipete#2679) Missing auth.json + custom backend (chatgpt_base_url or non-OpenAI model_provider, e.g. Bedrock) now reports that ChatGPT rate limits are unavailable instead of telling the user to codex login. Detection unit-tested
Provider status last-success (steipete#2925) fetch_provider_status keeps a process-wide cache of the last successful result; transport failures never replace it — long-running consumers (hooks watch, serve) keep the last known status instead of dropping to unknown

Skipped (no counterpart)

Deferred (evidence)

Commands run

  • cargo fmt --all
  • cargo clippy both manifests --all-targets -- -D warnings
  • cargo test --manifest-path rust/Cargo.toml --lib1248 passed
  • cargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml342 passed
  • pnpm --dir apps/desktop-tauri test261 passed (incl. new ChartsSection tests)
  • pnpm --dir apps/desktop-tauri run build — ok (locale drift check green)

UI proof

The Tokens tab + Refreshing marker change the Settings → Providers charts surface. CUA proof pending a fresh tauri:build:debug capture pass (planned together with #336's seed tooling); jsdom tests cover the tab-default and marker logic meanwhile, called out per the PR template.

@Finesssee

Copy link
Copy Markdown
Collaborator Author

Thermo-nuclear code-quality review: the Wave 0.50.0 increment itself is reasonably decomposed, but this cumulative PR inherits the blocker from #338.

Its tree still contains the OpenCode billing addition that pushes rust/src/providers/opencode/mod.rs from roughly 713 lines past 1,000. Please extract that subsystem into providers/opencode/billing.rs in #338 and restack/rebase this PR afterward. No separate blocker found in this PR's token-history/chart increment.

@Finesssee

Copy link
Copy Markdown
Collaborator Author

Follow-up thermo-nuclear review on head 6d5a1cb9: no separate structural blocker was found in this PR's token-history/chart increment, but the cumulative branch still contains #338's unchanged 1,108-line opencode/mod.rs.

Please decompose the OpenCode billing subsystem in #338 and restack/rebase this PR afterward. Still blocked via the stack.

Finesssee and others added 3 commits August 19, 2026 02:02
Stabilize flaky test_run_sends_script_through_pty: the PTY echo test
used a 2s idle timeout which is too tight on slow CI VMs — cmd.exe's
banner appears but the echo output arrives after the idle window
closes, leaving only the banner and failing the CODEXBAR_PTY_OK
assertion. Widen timeout to 15s, idle timeout to 6s, and add a 1s
initial delay so the shell is ready before the script is sent.
@Finesssee
Finesssee force-pushed the port/upstream-0.50.0 branch from 6d5a1cb to 95ea433 Compare August 18, 2026 19:31
@Finesssee
Finesssee merged commit 20dec8f into main Aug 18, 2026
1 check passed
@Finesssee
Finesssee deleted the port/upstream-0.50.0 branch August 18, 2026 20:15
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