Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
Fix Bitbucket source control availability toggle
JustMarkDev56e57de94784
diff --git a/apps/web/src/components/settings/SettingsPanels.browser.tsx b/apps/web/src/components/settings/SettingsPanels.browser.tsxindex a4cdc867f..992df6858 100644--- a/apps/web/src/components/settings/SettingsPanels.browser.tsx+++ b/apps/web/src/components/settings/SettingsPanels.browser.tsx@@ -1360,6 +1360,50 @@ describe("SourceControlSettingsPanel discovery states", () => {await expect.element(page.getByText("Nothing detected yet")).not.toBeInTheDocument();});+ it("shows unauthenticated API providers as available but not enabled", async () => {+ setSourceControlDiscoveryStub(async () => ({+ versionControlSystems: [],+ sourceControlProviders: [+ {+ kind: "bitbucket",+ label: "Bitbucket",+ status: "available",+ version: Option.none(),+ installHint:+ "Set T3CODE_BITBUCKET_EMAIL and T3CODE_BITBUCKET_API_TOKEN, or T3CODE_BITBUCKET_ACCESS_TOKEN.",+ detail: Option.none(),+ auth: {+ status: "unauthenticated",+ account: Option.none(),+ host: Option.some("bitbucket.org"),+ detail: Option.some(+ "Set T3CODE_BITBUCKET_EMAIL and T3CODE_BITBUCKET_API_TOKEN, or T3CODE_BITBUCKET_ACCESS_TOKEN.",+ ),+ },+ },+ ],+ }));++ mounted = await render(+ <AppAtomRegistryProvider>+ <SourceControlSettingsPanel />+ </AppAtomRegistryProvider>,+ );++ const bitbucketSwitch = page.getByRole("switch", { name: "Bitbucket availability" });++ await expect.element(page.getByText("Not authenticated")).toBeInTheDocument();+ await expect+ .element(+ page.getByText(+ "Available. Set T3CODE_BITBUCKET_EMAIL and T3CODE_BITBUCKET_API_TOKEN, or T3CODE_BITBUCKET_ACCESS_TOKEN.",+ ),+ )+ .toBeInTheDocument();+ await expect.element(bitbucketSwitch).toBeDisabled();+ await expect.element(bitbucketSwitch).not.toBeChecked();+ });+it("shows Git fetch interval settings inside the Git details dropdown", async () => {setSourceControlDiscoveryStub(async () => ({versionControlSystems: [diff --git a/apps/web/src/components/settings/SourceControlSettings.tsx b/apps/web/src/components/settings/SourceControlSettings.tsxindex 0cda0c1b8..00656f9fd 100644--- a/apps/web/src/components/settings/SourceControlSettings.tsx+++ b/apps/web/src/components/settings/SourceControlSettings.tsx@@ -188,7 +188,7 @@ function itemSummary({}if (!item.executable) {- return <span>{item.installHint}</span>;+ return <span>Available. {item.installHint}</span>;}if (auth.status === "unauthenticated") {@@ -218,8 +218,9 @@ function DiscoveryItemRow({readonly children?: ReactNode;}) {const version = optionLabel(item.version);- const enabled =- item.status === "available" && (isProviderDiscoveryItem(item) || item.implemented);+ const enabled = isProviderDiscoveryItem(item)+ ? item.status === "available" && item.auth.status === "authenticated"+ : item.status === "available" && item.implemented;const auth = isProviderDiscoveryItem(item) ? item.auth : null;const authStatus = auth ? authPresentation(auth) : null;const authAccount = auth ? optionLabel(auth.account) : null;