Skip to content

feat: add lock API config toggle to Settings providers tab#12241

Draft
roomote-v0[bot] wants to merge 1 commit intomainfrom
feature/lock-api-config-settings-toggle
Draft

feat: add lock API config toggle to Settings providers tab#12241
roomote-v0[bot] wants to merge 1 commit intomainfrom
feature/lock-api-config-settings-toggle

Conversation

@roomote-v0
Copy link
Copy Markdown
Contributor

@roomote-v0 roomote-v0 Bot commented Apr 30, 2026

Related GitHub Issue

Closes: #12237

Description

This PR attempts to address Issue #12237 by making the existing lockApiConfigAcrossModes feature more discoverable. The lock icon inside the API Configuration popover is hard to find (and may not be visible in some versions). This adds a checkbox labeled "Use the same API configuration for all modes" directly to the Providers section in the Settings view.

How it works:

  • Adds a VSCodeCheckbox to the providers tab in SettingsView.tsx, placed between the API config profile selector and the provider options
  • The checkbox binds to the existing lockApiConfigAcrossModes state in cachedState
  • On save, it sends the same lockApiConfigAcrossModes message that the popover lock icon uses, so no backend changes are needed
  • Adds i18n strings for the label and description to the English settings.json locale

This is purely additive -- the existing lock icon in the API Configuration popover continues to work as-is.

Feedback and guidance are welcome.

Test Procedure

  • New test file: SettingsView.lockApiConfig.spec.tsx with 5 tests covering rendering, toggling, and save behavior
  • Existing SettingsView.spec.tsx tests (16/16) still pass
  • Existing ChatTextArea.lockApiConfig.spec.tsx tests (5/5) still pass
  • All lint and type checks pass

Manual testing:

  1. Open Settings > Providers tab
  2. The "Use the same API configuration for all modes" checkbox should appear between the profile selector and provider options
  3. Check the box and click Save
  4. Switch modes -- the API config should remain locked
  5. Uncheck and save -- mode switching should restore per-mode API configs

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes.
  • Documentation Impact: No documentation updates required (UI is self-descriptive).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Documentation Updates

No documentation changes needed. The checkbox label and description text are self-explanatory.

Interactively review PR in Roo Code Cloud

Adds a "Use the same API configuration for all modes" checkbox to the
Providers section in Settings, making the existing lockApiConfigAcrossModes
feature discoverable without needing to find the small lock icon inside
the API Configuration popover.

- Adds VSCodeCheckbox to SettingsView providers tab bound to cachedState
- Sends lockApiConfigAcrossModes message on save (same handler as popover)
- Adds i18n strings for the label and description
- Adds test coverage for rendering, toggling, and save behavior
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.

[BUG] Selected model should never change unless the end-user changes it (i.e. when switching modes)

1 participant