The best way to control Claude Code, Codex and more from any computer or phone
fix(web): signed-out T3 Connect shows a Sign in button (#24636)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Theo Browne committed
Oct 24, 2026 at 18:19 UTC
6548c006d429e7242ebc10c34946420418a276ec
1 file changed
+70
-50
apps/web/src/components/settings/SavedEnvironmentRows.tsx
+70
-50
@@ -48,6 +48,7 @@ import {
48
supportsServerUpdateThreadContinuation,
49
} from "~/versionSkew";
50
import { hasCloudPublicConfig } from "~/cloud/publicConfig";
51
+import { isElectron } from "~/env";
52
import { useCloudLinkController } from "~/cloud/useCloudLinkController";
53
import { environmentCatalog } from "~/connection/catalog";
54
import { readEnvironmentScope } from "~/state/session";
@@ -65,6 +66,7 @@ import {
66
ServerUpdateProgress,
67
} from "../ServerUpdateAction";
68
import { CloudEnvironmentConnectRows } from "../cloud/CloudEnvironmentConnectList";
69
+import { useT3ConnectAuthPrompt } from "../clerk/useT3ConnectAuthPrompt";
70
71
type SavedBackendListRowProps = {
72
environment: EnvironmentPresentation;
@@ -476,15 +478,29 @@ function ConfiguredCloudLinkRow({ canManageRelay }: { readonly canManageRelay: b
478
operationError,
479
reconcileCloudState,
480
} = useCloudLinkController();
481
+ const { openAuthPrompt } = useT3ConnectAuthPrompt();
482
const [isUpdating, setIsUpdating] = useState(false);
483
const [isUpdatingPreference, setIsUpdatingPreference] = useState(false);
484
482
- const disabledReason = !isSignedIn
483
- ? "Sign in to T3 Connect to manage this environment."
484
- : !canManageRelay
485
- ? "Your session does not have permission to manage T3 Connect access."
486
- : null;
485
+ const disabledReason = canManageRelay
486
+ ? null
487
+ : "Your session does not have permission to manage T3 Connect access.";
488
const isBusy = isUpdating || isUpdatingPreference;
489
+ const switchDisabled =
490
+ !canManageRelay ||
491
+ !isSignedIn ||
492
+ primaryCloudLinkState.data === null ||
493
+ primaryCloudLinkState.isPending ||
494
+ isBusy;
495
+ // `isSignedIn` is undefined until Clerk loads. Signed out, one row shows a
496
+ // sign-in button instead of its switch; the onboarding dialog that opens after
497
+ // a fresh sign-in offers both linking and publishing.
498
+ const signedOut = isSignedIn === false;
499
+ const signInButton = (
500
+ <Button size="sm" variant="outline" onClick={openAuthPrompt}>
501
+ Sign in
502
+ </Button>
503
+ );
504
const refreshLinkState = useEffectEvent(primaryCloudLinkState.refresh);
505
// The server rechecks reachability when the tunnel's 30 s readiness poll changes.
506
// Poll while mounted, so a failed read does not stop later ones.
@@ -579,36 +595,36 @@ function ConfiguredCloudLinkRow({ canManageRelay }: { readonly canManageRelay: b
595
596
return (
597
<>
582
- {window.desktopBridge ? (
598
+ {isElectron ? (
599
<SettingsRow
600
title={searchableSetting("t3-connect").title}
601
description={
586
- linkRevoked
587
- ? "This environment was removed from T3 Connect. Turn it on to link it again."
588
- : managedTunnelActive
589
- ? reachability?.status === "unreachable"
590
- ? "T3 Connect is on, but other devices cannot reach this environment."
591
- : reachability?.status === "reachable"
592
- ? "This environment is available to your other devices through T3 Connect."
593
- : "T3 Connect is on. Reachability has not been checked yet."
594
- : managedTunnelOutOfSync
595
- ? "T3 Connect is out of sync. This environment is linked only to publish agent activity, so other devices cannot connect. Turn T3 Connect on to repair it."
596
- : "Make this environment available to your other devices through T3 Connect."
602
+ signedOut
603
+ ? "Sign in to make this environment available to your other devices through T3 Connect."
604
+ : linkRevoked
605
+ ? "This environment was removed from T3 Connect. Turn it on to link it again."
606
+ : managedTunnelActive
607
+ ? reachability?.status === "unreachable"
608
+ ? "T3 Connect is on, but other devices cannot reach this environment."
609
+ : reachability?.status === "reachable"
610
+ ? "This environment is available to your other devices through T3 Connect."
611
+ : "T3 Connect is on. Reachability has not been checked yet."
612
+ : managedTunnelOutOfSync
613
+ ? "T3 Connect is out of sync. This environment is linked only to publish agent activity, so other devices cannot connect. Turn T3 Connect on to repair it."
614
+ : "Make this environment available to your other devices through T3 Connect."
615
}
616
status={operationError ?? primaryCloudLinkState.error ?? reachabilityStatus}
617
control={
600
- <CloudLinkSwitch
601
- checked={managedTunnelActive}
602
- disabled={
603
- !canManageRelay ||
604
- !isSignedIn ||
605
- primaryCloudLinkState.data === null ||
606
- primaryCloudLinkState.isPending ||
607
- isBusy
608
- }
609
- disabledReason={disabledReason}
610
- onCheckedChange={(enabled) => void updateManagedTunnel(enabled)}
611
- />
618
+ signedOut ? (
619
+ signInButton
620
+ ) : (
621
+ <CloudLinkSwitch
622
+ checked={managedTunnelActive}
623
+ disabled={switchDisabled}
624
+ disabledReason={disabledReason}
625
+ onCheckedChange={(enabled) => void updateManagedTunnel(enabled)}
626
+ />
627
+ )
628
}
629
/>
630
) : linkRevoked ? (
@@ -617,26 +633,30 @@ function ConfiguredCloudLinkRow({ canManageRelay }: { readonly canManageRelay: b
633
description="This environment was removed from T3 Connect. Run `t3 connect link` on the host to link it again."
634
/>
635
) : null}
620
- <SettingsRow
621
- title={searchableSetting("publish-agent-activity").title}
622
- description="Send activity to mobile notifications and Live Activities without T3 Connect."
623
- control={
624
- <CloudLinkSwitch
625
- ariaLabel="Publish agent activity to mobile clients"
626
- checked={publishAgentActivity}
627
- disabled={
628
- !canManageRelay ||
629
- !isSignedIn ||
630
- primaryCloudLinkState.data === null ||
631
- primaryCloudLinkState.isPending ||
632
- isBusy
633
- }
634
- disabledReason={disabledReason}
635
- onCheckedChange={(enabled) => void updatePublishAgentActivity(enabled)}
636
- />
637
- }
638
- />
639
- {managedTunnelActive ? (
636
+ {signedOut && isElectron ? null : (
637
+ <SettingsRow
638
+ title={searchableSetting("publish-agent-activity").title}
639
+ description={
640
+ signedOut
641
+ ? "Sign in to send activity to mobile notifications and Live Activities."
642
+ : "Send activity to mobile notifications and Live Activities without T3 Connect."
643
+ }
644
+ control={
645
+ signedOut ? (
646
+ signInButton
647
+ ) : (
648
+ <CloudLinkSwitch
649
+ ariaLabel="Publish agent activity to mobile clients"
650
+ checked={publishAgentActivity}
651
+ disabled={switchDisabled}
652
+ disabledReason={disabledReason}
653
+ onCheckedChange={(enabled) => void updatePublishAgentActivity(enabled)}
654
+ />
655
+ )
656
+ }
657
+ />
658
+ )}
659
+ {managedTunnelActive && !signedOut ? (
660
<SettingsRow
661
title={searchableSetting("hold-webhooks-while-offline").title}
662
description="Keep webhook requests for up to 24 hours while this environment is offline, then deliver them. Off: T3 Connect only forwards requests and stores nothing."
@@ -644,7 +664,7 @@ function ConfiguredCloudLinkRow({ canManageRelay }: { readonly canManageRelay: b
664
<CloudLinkSwitch
665
ariaLabel="Hold webhook requests while this environment is offline"
666
checked={holdWebhooksWhileOffline}
647
- disabled={!canManageRelay || !isSignedIn || primaryCloudLinkState.isPending || isBusy}
667
+ disabled={switchDisabled}
668
disabledReason={disabledReason}
669
onCheckedChange={(enabled) => void updateHoldWebhooks(enabled)}
670
/>