Fix Bitbucket source control availability toggle#3079
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
ApprovabilityVerdict: Approved This is a straightforward bug fix that corrects when the source control provider toggle shows as enabled - now properly requiring authentication. The change is small, self-contained, and includes a test case verifying the expected behavior. You can customize Macroscope's approvability policy. Learn more. |
What Changed
Updated the Source Control settings UI so source control provider toggles are only shown as enabled when the provider is both available and authenticated.
For unauthenticated API-based providers like Bitbucket, the row now keeps the provider marked as available, shows the existing setup instructions, and leaves the disabled toggle off.
Added browser coverage for the Bitbucket
available+unauthenticatedstate.Why
Bitbucket was shown with its disabled toggle already selected even when no Bitbucket credentials were configured. That made it look like the provider was installed/authenticated or user-enabled, even though pull request features could not actually work.
This keeps the existing discovery model intact: provider availability still means the integration exists in T3 Code, while the toggle now reflects whether the provider is actually usable through authenticated credentials.
UI Changes
Before:

After:

Checklist
Note
Low Risk
Settings UI and display logic only; discovery contracts unchanged and no server auth behavior is modified.
Overview
Fixes Source Control settings so provider availability toggles no longer appear on when the integration is discovered but not authenticated (e.g. Bitbucket with env vars unset).
Provider rows now treat enabled as available and authenticated for API providers; VCS rows still use available and implemented. Unauthenticated API providers without a CLI executable show Available. plus the existing credential installHint instead of only the hint text.
Adds a browser test that stubs Bitbucket as
available+unauthenticatedand asserts Not authenticated, the prefixed availability copy, and a disabled, unchecked toggle.Reviewed by Cursor Bugbot for commit 3213244. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix Bitbucket availability toggle to require authentication before enabling
SourceControlSettingsPanelare now disabled unless the provider'sauth.statusis'authenticated', even whenstatusis'available'.itemSummaryutil now prefixes the install hint with'Available. 'when a provider has auth info but no executable present.Macroscope summarized 3213244.