Skip to content

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.

Allow failed remote environments to be removed (#4084)

Noah Zepner0506508e9b00
diff --git a/apps/web/src/components/settings/ConnectionsSettings.tsx b/apps/web/src/components/settings/ConnectionsSettings.tsx
index 4da396296..385b24457 100644
--- a/apps/web/src/components/settings/ConnectionsSettings.tsx
+++ b/apps/web/src/components/settings/ConnectionsSettings.tsx
@@ -1461,22 +1461,34 @@ function SavedBackendListRow({
</TooltipPopup>
</Tooltip>
) : (
- <Button
- size="xs"
- variant="outline"
- disabled={isConnecting || removingEnvironmentId === environmentId}
- onClick={() =>
- void (isConnected ? onRemove(environmentId) : onConnect(environmentId))
- }
- >
- {isConnected
- ? removingEnvironmentId === environmentId
- ? "Disconnecting…"
- : "Disconnect"
- : isConnecting
- ? "Connecting…"
- : "Connect"}
- </Button>
+ <>
+ {!isConnected ? (
+ <Button
+ size="xs"
+ variant="outline"
+ disabled={removingEnvironmentId === environmentId}
+ onClick={() => void onRemove(environmentId)}
+ >
+ {removingEnvironmentId === environmentId ? "Removing…" : "Remove"}
+ </Button>
+ ) : null}
+ <Button
+ size="xs"
+ variant="outline"
+ disabled={isConnecting || removingEnvironmentId === environmentId}
+ onClick={() =>
+ void (isConnected ? onRemove(environmentId) : onConnect(environmentId))
+ }
+ >
+ {isConnected
+ ? removingEnvironmentId === environmentId
+ ? "Disconnecting…"
+ : "Disconnect"
+ : isConnecting
+ ? "Connecting…"
+ : "Connect"}
+ </Button>
+ </>
)}
</div>
</div>