Harden reliability and account isolation - #193
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 58 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (21)
Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ceiling | 7553eac | Commit Preview URL Branch Preview URL |
Aug 01 2026, 04:35 AM |
There was a problem hiding this comment.
Pull request overview
This PR hardens local state persistence against interrupted writes and tightens multi-account isolation by keying history/cache data off Ceiling’s stable account ID (preventing cross-seat data blending when accounts share an email). It also improves Claude provider reliability by surfacing HTTP client construction failures instead of panicking background refresh work.
Changes:
- Introduces atomic file replacement (
atomic_write) and adopts it across state/cache/history/geometry writers. - Makes Claude Web API fetcher resilient to HTTP client initialization failures and uses atomic credential replacement for refreshed OAuth tokens on Windows.
- Scopes chart caches, usage history, and quota-run efficiency by stable
accountId(with regression coverage across Rust and React tests).
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| rust/src/secure_file.rs | Adds atomic_write with restrictive permissions + atomic replace; adds regression test ensuring no temp artifacts remain. |
| rust/src/providers/claude/web_api.rs | Stores client build result and propagates initialization failures through provider errors instead of panicking. |
| rust/src/providers/claude/oauth/credentials_store.rs | Switches OAuth credential refresh persistence to atomic replacement via secure_file::atomic_write. |
| rust/src/core/widget_snapshot.rs | Uses atomic replacement for widget snapshot + selection persistence. |
| rust/src/core/openai_dashboard.rs | Uses atomic replacement when persisting OpenAI dashboard cache. |
| rust/src/core/jsonl_scanner.rs | Uses atomic replacement when persisting JSONL scan cache. |
| apps/desktop-tauri/src/surfaces/TrayPanel.test.tsx | Updates expectations for the expanded getProviderChartData call signature. |
| apps/desktop-tauri/src/surfaces/settings/providers/sections/charts/ChartsSection.tsx | Keys chart caching + efficiency fetches by stable accountId (fallback to email). |
| apps/desktop-tauri/src/surfaces/settings/providers/sections/charts/ChartsSection.test.tsx | Adds regression asserting chart/efficiency requests include accountId. |
| apps/desktop-tauri/src/surfaces/settings/providers/ProviderDetailPane.tsx | Passes accountId through to ChartsSection. |
| apps/desktop-tauri/src/surfaces/ProviderDetailView.tsx | Includes accountId when requesting chart data and in effect dependencies. |
| apps/desktop-tauri/src/surfaces/ProviderComparison.tsx | Includes accountId in comparison chart fetches. |
| apps/desktop-tauri/src/surfaces/ChartsPanel.tsx | Updates chart section keying and plumbs accountId into ChartsSection. |
| apps/desktop-tauri/src/lib/tauri.ts | Extends Tauri bridge wrappers to accept/pass accountId for chart + efficiency calls. |
| apps/desktop-tauri/src/components/MenuCard.tsx | Includes accountId in chart fetch + effect deps to avoid stale cross-account data. |
| apps/desktop-tauri/src-tauri/src/usage_history.rs | Scopes history series by accountId and persists atomically; adds multi-account isolation regression tests. |
| apps/desktop-tauri/src-tauri/src/quota_run_history.rs | Scopes run history/efficiency by accountId and persists atomically; updates tests. |
| apps/desktop-tauri/src-tauri/src/geometry_store.rs | Persists geometry atomically to avoid truncation. |
| apps/desktop-tauri/src-tauri/src/commands/chart.rs | Threads accountId through chart cache keys, history lookup, refresh scheduling, and bumps cache version. |
| apps/desktop-tauri/src-tauri/src/capacity_events.rs | Persists capacity event history atomically. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Validation
cargo test --manifest-path rust/Cargo.toml(779 library tests plus binary/doc tests)cargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml(463 tests)cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warningscargo clippy --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml --all-targets -- -D warningspnpm test(349 tests across 55 files)pnpm run buildpnpm audit --json(0 vulnerabilities)cargo audit(no blocking vulnerabilities; transitive maintenance/yanked warnings remain)