fix(claude): add missing UI toggle for Claude Code credentials consent - #348
Open
macbyclp wants to merge 1 commit into
Open
fix(claude): add missing UI toggle for Claude Code credentials consent#348macbyclp wants to merge 1 commit into
macbyclp wants to merge 1 commit into
Conversation
76d3f01 gated Claude OAuth credential reading behind a new claude_allow_reading_claude_code_credentials setting (default off, upstream steipete#2634/steipete#2745) and pointed users at "Settings, Providers, Claude" to enable it, but never added that toggle anywhere in the frontend or CLI. The setting was unreachable: Auto silently fell back to reduced-fidelity CLI usage with no way to opt back into OAuth. - Wire the field through the Tauri bridge (SettingsSnapshot and SettingsUpdate in commands/bridge.rs and commands/settings.rs) the same way claude_daily_routines_usage_visible already is. - Add claudeAllowReadingClaudeCodeCredentials to the TS bridge types. - Add an "Allow reading Claude Code's credentials" checkbox to ClaudeCreds.tsx, next to the existing Avoid Keychain Prompts and Show Daily Routines toggles. - Add ProviderClaudeAllowReadingClaudeCodeCredentials(Help) locale keys, with English (source of truth) and Turkish translations. - Tests: Rust settings default plus apply_advanced_settings coverage, and a new ClaudeCreds.test.tsx covering render and toggle round-trip. Verified locally: - node apps/desktop-tauri/scripts/check-locale-drift.mjs: OK, 807 keys match - cargo test --manifest-path rust/Cargo.toml settings: 94 passed - cargo test --manifest-path rust/Cargo.toml locale: 16 passed - cargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml -- settings locale: 38 passed - cargo fmt --all -- --check: clean - cargo clippy --all-targets -- -D warnings (both crates): clean - pnpm --dir apps/desktop-tauri test: 268 passed (44 files) - pnpm --dir apps/desktop-tauri run build (tsc --noEmit + vite build): clean
Author
|
Heads up on the "Local check" failure — it's pre-existing on The only failing test is I reproduced it on plain So this looks like an existing bug/flake on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a bug where the Claude Code OAuth credentials consent gate added in 76d3f01 is unreachable through the app.
76d3f01 introduced
claude_allow_reading_claude_code_credentials(defaultfalse) and made the OAuth credential loader return this error when it's off:However, that setting was only ever wired into the Rust backend (
rust/src/settings.rs,rust/src/providers/claude/...). No UI checkbox and no CLI flag exist anywhere to actually turn it on — I confirmed this by grepping the entire frontend andcodexbar-clisource for the field name (zero hits outside the backend). So every user hits this error message telling them to go flip a setting that doesn't exist anywhere to flip, and Claude silently stays on reduced-fidelity CLI usage forever.Fix
claude_allow_reading_claude_code_credentialsthrough the Tauri bridge (SettingsSnapshot/SettingsUpdateincommands/bridge.rsandcommands/settings.rs), the same way the neighboringclaude_daily_routines_usage_visiblesetting already is.claudeAllowReadingClaudeCodeCredentialsto the TS bridge types (bridge.ts).ClaudeCreds.tsx, right next to the existing "Avoid Keychain Prompts" and "Show Daily Routines usage" toggles in Settings → Providers → Claude.ProviderClaudeAllowReadingClaudeCodeCredentials/...Helplocale keys — English (source of truth) plus a Turkish translation.settings::tests::test_settings_defaultnow asserts the off-by-default value; a newapply_advanced_settings_sets_claude_code_credentials_consenttest incommands/settings.rs; a newClaudeCreds.test.tsxcovering render + toggle round-trip throughupdateSettings.No behavior change to the consent gate itself (still off by default, still requires explicit opt-in) — this only adds the missing way to actually opt in.
Testing
Ran from repo root (MSVC toolchain; the default GNU toolchain in my environment is missing
dlltool.exe):Results:
check-locale-drift: OK, 807 keys match between Rust and TSrust\Cargo.tomlsettings tests: 94 passedrust\Cargo.tomllocale tests: 16 passedcargo fmt --check: cleancargo clippy -D warnings: clean on both cratespnpm test: 268 passed across 44 files (includes newClaudeCreds.test.tsx)pnpm run build(tsc --noEmit+vite build): cleanNo visual redesign — just one more checkbox in an existing section, styled identically to its neighbors — so no CUA Driver capture; happy to add a screenshot if maintainers want one.