@devries-cameron20 / t3code-1 / commits / 56e57de947
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Fix Bitbucket source control availability toggle

JustMarkDev committed Jun 14, 2026 at 16:38 UTC 56e57de9478423becb33723a460eecf508fe1d5d
2 files changed +48 -3
apps/web/src/components/settings/SettingsPanels.browser.tsx
+44
@@ -1360,6 +1360,50 @@ describe("SourceControlSettingsPanel discovery states", () => {
1360 await expect.element(page.getByText("Nothing detected yet")).not.toBeInTheDocument();
1361 });
1362
1363 + it("shows unauthenticated API providers as available but not enabled", async () => {
1364 + setSourceControlDiscoveryStub(async () => ({
1365 + versionControlSystems: [],
1366 + sourceControlProviders: [
1367 + {
1368 + kind: "bitbucket",
1369 + label: "Bitbucket",
1370 + status: "available",
1371 + version: Option.none(),
1372 + installHint:
1373 + "Set T3CODE_BITBUCKET_EMAIL and T3CODE_BITBUCKET_API_TOKEN, or T3CODE_BITBUCKET_ACCESS_TOKEN.",
1374 + detail: Option.none(),
1375 + auth: {
1376 + status: "unauthenticated",
1377 + account: Option.none(),
1378 + host: Option.some("bitbucket.org"),
1379 + detail: Option.some(
1380 + "Set T3CODE_BITBUCKET_EMAIL and T3CODE_BITBUCKET_API_TOKEN, or T3CODE_BITBUCKET_ACCESS_TOKEN.",
1381 + ),
1382 + },
1383 + },
1384 + ],
1385 + }));
1386 +
1387 + mounted = await render(
1388 + <AppAtomRegistryProvider>
1389 + <SourceControlSettingsPanel />
1390 + </AppAtomRegistryProvider>,
1391 + );
1392 +
1393 + const bitbucketSwitch = page.getByRole("switch", { name: "Bitbucket availability" });
1394 +
1395 + await expect.element(page.getByText("Not authenticated")).toBeInTheDocument();
1396 + await expect
1397 + .element(
1398 + page.getByText(
1399 + "Available. Set T3CODE_BITBUCKET_EMAIL and T3CODE_BITBUCKET_API_TOKEN, or T3CODE_BITBUCKET_ACCESS_TOKEN.",
1400 + ),
1401 + )
1402 + .toBeInTheDocument();
1403 + await expect.element(bitbucketSwitch).toBeDisabled();
1404 + await expect.element(bitbucketSwitch).not.toBeChecked();
1405 + });
1406 +
1407 it("shows Git fetch interval settings inside the Git details dropdown", async () => {
1408 setSourceControlDiscoveryStub(async () => ({
1409 versionControlSystems: [
apps/web/src/components/settings/SourceControlSettings.tsx
+4 -3
@@ -188,7 +188,7 @@ function itemSummary({
188 }
189
190 if (!item.executable) {
191 - return <span>{item.installHint}</span>;
191 + return <span>Available. {item.installHint}</span>;
192 }
193
194 if (auth.status === "unauthenticated") {
@@ -218,8 +218,9 @@ function DiscoveryItemRow({
218 readonly children?: ReactNode;
219 }) {
220 const version = optionLabel(item.version);
221 - const enabled =
222 - item.status === "available" && (isProviderDiscoveryItem(item) || item.implemented);
221 + const enabled = isProviderDiscoveryItem(item)
222 + ? item.status === "available" && item.auth.status === "authenticated"
223 + : item.status === "available" && item.implemented;
224 const auth = isProviderDiscoveryItem(item) ? item.auth : null;
225 const authStatus = auth ? authPresentation(auth) : null;
226 const authAccount = auth ? optionLabel(auth.account) : null;