Skip to content

Fix Bitbucket source control availability toggle#3079

Merged
juliusmarminge merged 1 commit into
pingdotgg:mainfrom
JustMarkDev:fix/bitbucket-source-control-toggle
Jun 14, 2026
Merged

Fix Bitbucket source control availability toggle#3079
juliusmarminge merged 1 commit into
pingdotgg:mainfrom
JustMarkDev:fix/bitbucket-source-control-toggle

Conversation

@JustMarkDev

@JustMarkDev JustMarkDev commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

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 + unauthenticated state.

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:
Screenshot 2026-06-14 162513

After:
Screenshot 2026-06-14 163311

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

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 + unauthenticated and 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

  • Provider rows in SourceControlSettingsPanel are now disabled unless the provider's auth.status is 'authenticated', even when status is 'available'.
  • The itemSummary util now prefixes the install hint with 'Available. ' when a provider has auth info but no executable present.
  • A new browser test covers the unauthenticated-but-available state, asserting the switch is disabled and the summary shows the prefixed hint.
  • Behavioral Change: unauthenticated Bitbucket providers can no longer be toggled on via the settings UI.

Macroscope summarized 3213244.

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ef6e4e6b-0b20-4ea2-87a4-93501dd9c83a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Jun 14, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

@juliusmarminge juliusmarminge enabled auto-merge (rebase) June 14, 2026 18:04
@juliusmarminge juliusmarminge merged commit 56e57de into pingdotgg:main Jun 14, 2026
16 checks passed
@JustMarkDev JustMarkDev deleted the fix/bitbucket-source-control-toggle branch June 14, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants