Skip to content

Commit d16d888

Browse files
t3dotggclaude
andcommitted
fix(web): do not remove an environment without a confirm host
Co-Authored-By: Claude Fable 5.1 <[email protected]>
1 parent 9c326dc commit d16d888

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎apps/web/src/components/settings/ConnectionsSettings.tsx‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2480,12 +2480,12 @@ export function ConnectionsSettings() {
24802480
// device. Switching off is the reversible path, so removal always confirms.
24812481
const handleRemoveSavedBackend = useCallback(
24822482
async (environment: EnvironmentPresentation) => {
2483-
const confirmed =
2484-
(await requestConfirmDialog(
2485-
`Remove ${environment.label} from this device?\nThis forgets its pairing, credentials, and cached threads here. Switch it off instead to keep it saved.`,
2486-
{ variant: "destructive" },
2487-
)) ?? true;
2488-
if (!confirmed) {
2483+
// Fail closed: no mounted confirm host means no removal.
2484+
const confirmed = await requestConfirmDialog(
2485+
`Remove ${environment.label} from this device?\nThis forgets its pairing, credentials, and cached threads here. Switch it off instead to keep it saved.`,
2486+
{ variant: "destructive" },
2487+
);
2488+
if (confirmed !== true) {
24892489
return;
24902490
}
24912491
const environmentId = environment.environmentId;

0 commit comments

Comments
 (0)