Repository navigation
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 77ac12986c4f5d78e60eede86455553fe0ce74c2 and 2daf87b4f12db1780b3a0033e6a64c2c74f525c9. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdded encrypted ClinePass API-key storage with environment fallback and credential status reporting. Added trusted IPC and preload APIs for saving, reading, and clearing credentials. Added authenticated ClinePass quota fetching with session, weekly, and monthly windows. Integrated credential and quota state into refresh handling, settings, the status bar, tooltips, localization, web fallbacks, and status-bar migrations. Added comprehensive tests across these flows. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 19ba095b-b0b3-4491-9bee-e554592bb95a
📥 Commits
Reviewing files that changed from the base of the PR and between a0a654c and 94cf2f1a1debc4ca63286523abeccabad2c4e189.
📒 Files selected for processing (44)
src/main/clinepass/clinepass-api-key-store.test.tssrc/main/clinepass/clinepass-api-key-store.tssrc/main/ipc/clinepass-credentials.test.tssrc/main/ipc/clinepass-credentials.tssrc/main/ipc/register-core-handlers.test.tssrc/main/ipc/register-core-handlers.tssrc/main/rate-limits/clinepass-fetcher.test.tssrc/main/rate-limits/clinepass-fetcher.tssrc/main/rate-limits/service.test.tssrc/main/rate-limits/service.tssrc/main/runtime/rpc/methods/client-ui-schemas.tssrc/preload/api-types.tssrc/preload/index.tssrc/renderer/src/components/settings/AccountsPane.tsxsrc/renderer/src/components/settings/ClinePassAccountsSection.test.tsxsrc/renderer/src/components/settings/ClinePassAccountsSection.tsxsrc/renderer/src/components/settings/ClinePassApiKeyForm.tsxsrc/renderer/src/components/settings/ClinePassCredentialStatus.tsxsrc/renderer/src/components/settings/accounts-search.test.tssrc/renderer/src/components/settings/accounts-search.tssrc/renderer/src/components/settings/appearance-status-bar-search.test.tssrc/renderer/src/components/settings/appearance-status-bar-search.tssrc/renderer/src/components/status-bar/StatusBar.tsxsrc/renderer/src/components/status-bar/StatusBarUsageEmptyCta.tsxsrc/renderer/src/components/status-bar/status-bar-agent-gating.test.tssrc/renderer/src/components/status-bar/status-bar-provider-visibility.test.tssrc/renderer/src/components/status-bar/status-bar-provider-visibility.tssrc/renderer/src/components/status-bar/tooltip.test.tssrc/renderer/src/components/status-bar/tooltip.tsxsrc/renderer/src/components/status-bar/usage-error-copy.test.tssrc/renderer/src/components/status-bar/usage-error-copy.tssrc/renderer/src/components/status-bar/usage-provider-settings-target.test.tssrc/renderer/src/components/status-bar/usage-provider-settings-target.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/store/slices/rate-limits.test.tssrc/renderer/src/store/slices/rate-limits.tssrc/renderer/src/store/slices/ui.test.tssrc/renderer/src/store/slices/ui.tssrc/renderer/src/web/web-preload-api.tssrc/shared/clinepass-credentials.tssrc/shared/rate-limit-types.test.tssrc/shared/rate-limit-types.tssrc/shared/status-bar-defaults.tssrc/shared/types.ts
|
Clarification on the WSL scope: this implementation deliberately treats the ClinePass API key as an Orca-owned credential. The user enters WSL-specific credential resolution would only be needed as a convenience feature to automatically reuse an environment variable or CLI session that exists exclusively inside a WSL distribution. This PR does not claim automatic import of WSL Cline CLI authentication; it provides the explicit API-key path, which does not require such discovery. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/renderer/src/i18n/locales/en.json (1)
10604-10636: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winComplete the environment-key description.
Change
"A saved key overrides the environment"to"A saved key overrides the environment variable."
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 6f8f3720-7305-4f4f-b530-b61dd4793006
📥 Commits
Reviewing files that changed from the base of the PR and between 94cf2f1a1debc4ca63286523abeccabad2c4e189 and eec5ab02b7c1b98009184ec48425028eedc131f3.
📒 Files selected for processing (5)
src/renderer/src/components/settings/ClinePassAccountsSection.test.tsxsrc/renderer/src/components/settings/ClinePassCredentialStatus.tsxsrc/renderer/src/components/status-bar/StatusBar.tsxsrc/renderer/src/components/status-bar/usage-error-copy.tssrc/renderer/src/i18n/locales/en.json
🚧 Files skipped from review as they are similar to previous changes (3)
- src/renderer/src/components/settings/ClinePassCredentialStatus.tsx
- src/renderer/src/components/status-bar/usage-error-copy.ts
- src/renderer/src/components/status-bar/StatusBar.tsx
|
Addressed the follow-up CodeRabbit suggestion from the outside-diff review in |
bccac44 to
77ac129
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d036aa88-794e-4ce0-a55a-05aeaae16c07
📥 Commits
Reviewing files that changed from the base of the PR and between d957e1c and 77ac12986c4f5d78e60eede86455553fe0ce74c2.
📒 Files selected for processing (44)
src/main/clinepass/clinepass-api-key-store.test.tssrc/main/clinepass/clinepass-api-key-store.tssrc/main/ipc/clinepass-credentials.test.tssrc/main/ipc/clinepass-credentials.tssrc/main/ipc/register-core-handlers.test.tssrc/main/ipc/register-core-handlers.tssrc/main/rate-limits/clinepass-fetcher.test.tssrc/main/rate-limits/clinepass-fetcher.tssrc/main/rate-limits/service.test.tssrc/main/rate-limits/service.tssrc/main/runtime/rpc/methods/client-ui-schemas.tssrc/preload/api-types.tssrc/preload/index.tssrc/renderer/src/components/settings/AccountsPane.tsxsrc/renderer/src/components/settings/ClinePassAccountsSection.test.tsxsrc/renderer/src/components/settings/ClinePassAccountsSection.tsxsrc/renderer/src/components/settings/ClinePassApiKeyForm.tsxsrc/renderer/src/components/settings/ClinePassCredentialStatus.tsxsrc/renderer/src/components/settings/accounts-search.test.tssrc/renderer/src/components/settings/accounts-search.tssrc/renderer/src/components/settings/appearance-status-bar-search.test.tssrc/renderer/src/components/settings/appearance-status-bar-search.tssrc/renderer/src/components/status-bar/StatusBar.tsxsrc/renderer/src/components/status-bar/StatusBarUsageEmptyCta.tsxsrc/renderer/src/components/status-bar/status-bar-agent-gating.test.tssrc/renderer/src/components/status-bar/status-bar-provider-visibility.test.tssrc/renderer/src/components/status-bar/status-bar-provider-visibility.tssrc/renderer/src/components/status-bar/tooltip.test.tssrc/renderer/src/components/status-bar/tooltip.tsxsrc/renderer/src/components/status-bar/usage-error-copy.test.tssrc/renderer/src/components/status-bar/usage-error-copy.tssrc/renderer/src/components/status-bar/usage-provider-settings-target.test.tssrc/renderer/src/components/status-bar/usage-provider-settings-target.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/store/slices/rate-limits.test.tssrc/renderer/src/store/slices/rate-limits.tssrc/renderer/src/store/slices/ui.test.tssrc/renderer/src/store/slices/ui.tssrc/renderer/src/web/web-preload-api.tssrc/shared/clinepass-credentials.tssrc/shared/rate-limit-types.test.tssrc/shared/rate-limit-types.tssrc/shared/status-bar-defaults.tssrc/shared/types.ts
🚧 Files skipped from review as they are similar to previous changes (43)
- src/renderer/src/components/status-bar/usage-error-copy.test.ts
- src/main/ipc/register-core-handlers.ts
- src/shared/status-bar-defaults.ts
- src/renderer/src/components/settings/AccountsPane.tsx
- src/shared/types.ts
- src/renderer/src/components/status-bar/StatusBarUsageEmptyCta.tsx
- src/renderer/src/components/status-bar/usage-provider-settings-target.test.ts
- src/shared/rate-limit-types.test.ts
- src/renderer/src/components/settings/accounts-search.test.ts
- src/renderer/src/components/status-bar/status-bar-agent-gating.test.ts
- src/main/ipc/register-core-handlers.test.ts
- src/renderer/src/store/slices/ui.ts
- src/preload/api-types.ts
- src/renderer/src/store/slices/rate-limits.ts
- src/renderer/src/components/status-bar/status-bar-provider-visibility.test.ts
- src/renderer/src/components/status-bar/usage-provider-settings-target.ts
- src/renderer/src/store/slices/ui.test.ts
- src/preload/index.ts
- src/renderer/src/store/slices/rate-limits.test.ts
- src/renderer/src/i18n/locales/en.json
- src/renderer/src/components/status-bar/status-bar-provider-visibility.ts
- src/renderer/src/components/status-bar/tooltip.test.ts
- src/main/ipc/clinepass-credentials.test.ts
- src/main/runtime/rpc/methods/client-ui-schemas.ts
- src/renderer/src/components/settings/appearance-status-bar-search.ts
- src/renderer/src/components/settings/appearance-status-bar-search.test.ts
- src/renderer/src/components/settings/ClinePassAccountsSection.tsx
- src/renderer/src/components/status-bar/tooltip.tsx
- src/renderer/src/components/status-bar/usage-error-copy.ts
- src/renderer/src/components/status-bar/StatusBar.tsx
- src/main/rate-limits/service.test.ts
- src/renderer/src/components/settings/ClinePassApiKeyForm.tsx
- src/shared/rate-limit-types.ts
- src/renderer/src/web/web-preload-api.ts
- src/renderer/src/components/settings/accounts-search.ts
- src/renderer/src/components/settings/ClinePassAccountsSection.test.tsx
- src/shared/clinepass-credentials.ts
- src/main/clinepass/clinepass-api-key-store.ts
- src/main/ipc/clinepass-credentials.ts
- src/main/rate-limits/clinepass-fetcher.ts
- src/main/clinepass/clinepass-api-key-store.test.ts
- src/renderer/src/components/settings/ClinePassCredentialStatus.tsx
- src/main/rate-limits/service.ts
4a97bbb to
82a999c
Compare
82a999c to
2dbf43e
Compare
Scope
This is an API-key-based implementation related to #13032. It supports Windows + WSL setups through an Orca-owned credential: the user enters the key once in Settings, the Windows Orca process stores it and queries the quota API directly, and the Cline agent can continue running in WSL. No WSL-specific credential access is required for this flow.
Automatic import of an environment variable or CLI session that exists exclusively inside a WSL distribution is not included. This PR therefore does not claim WSL credential auto-discovery and does not close #13032.
Summary
CLINE_API_KEYfrom the Orca process environment; stored keys use ElectronsafeStorage, fail closed when secure storage is unavailable (including Linuxbasic_text), and never cross into renderer state.Related to #13032 (explicit API-key path; does not close it).
Screenshots
Screenshots are not attached because the local end-to-end smoke used live account/quota data. I visually verified both the Usage roster and the ClinePass Accounts section without publishing private account values.
Testing
pnpm lint— not run project-wide;check-changed-code-quality.mjspassed with 0 new code-quality, type-aware, or React Doctor errors across 43 changed files.pnpm typecheck— node, web, and CLI TypeScript targets passed independently; the review-fix commit also passed the web target again.pnpm test— not run project-wide; 16 focused suites passed locally (401 tests). The review-fix commit additionally passed the two affected UI suites (15 tests). Upstream CI has not independently run the full focused set yet.pnpm build— not run as a production build; Electron dev runtime launched successfully.check-max-lines-ratchet.mjspassed locally.AI Review Report
Reviewed the full credential → IPC/preload → rate-limit service → shared state → renderer path. The review checked provider exhaustiveness, account-key generation races, stale-snapshot policy, optional mixed-version state, status-item migrations, Settings search/toggle coverage, loading/error recovery, and test contracts. It found two UI omissions before the PR was opened; both were fixed and covered by focused tests. CodeRabbit subsequently found misleading secondary copy after a credential-status load failure and three noncanonical localization keys; both findings were fixed in
eec5ab02band reverified.Cross-platform review covered macOS, Linux, and Windows storage/path behavior, Electron renderer trust boundaries, old main/remote payload fallback, and the SSH/folder-workspace case. Explicit API-key entry works when Cline runs in WSL because Orca owns the credential and performs the quota request. The remaining convenience gap is automatic import of credentials that exist only inside WSL.
Security Audit
The security review checked secret-at-rest handling, environment precedence, IPC sender authorization, renderer/remote exposure, auth-header/error leakage, redirect/proxy behavior, and save/clear/fetch races. It found and fixed two blocking issues before this PR was opened:
safeStorageis unavailable or Linux selectsbasic_text; users can useCLINE_API_KEYinstead;clinePassCredentials:*handler now rejects untrusted renderers before reading, writing, clearing, or refreshing credentials.The key is sent only as a fixed HTTPS Bearer header to
api.cline.bot, is never returned to the renderer, and is never included in rate-limit state or logs.Notes