Skip to content

Commit 4dd2f66

Browse files
committed
Fix SSH password dialog Enter key submission and HTTPS endpoint compatibility check
- Wrap password dialog content in a <form> element so pressing Enter submits the password, matching universal password dialog UX expectations. - Remove hardcoded hostedHttpsCompatibility override for custom endpoints so classifyHostedHttpsCompatibility auto-detects http:// URLs as incompatible.
1 parent db6a2a6 commit 4dd2f66

2 files changed

Lines changed: 37 additions & 33 deletions

File tree

apps/desktop/src/serverExposure.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ export function resolveDesktopCoreAdvertisedEndpoints(
162162
label: "Custom HTTPS",
163163
httpBaseUrl: customEndpointUrl,
164164
reachability: "public",
165-
hostedHttpsCompatibility: "compatible",
166165
status: "unknown",
167166
description: "User-configured HTTPS endpoint for this desktop backend.",
168167
}),

apps/web/src/components/desktop/SshPasswordPromptDialog.tsx

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -76,38 +76,43 @@ export function SshPasswordPromptDialog() {
7676
}}
7777
>
7878
<DialogPopup className="max-w-md" showCloseButton={false}>
79-
<DialogHeader>
80-
<DialogTitle>SSH Password Required</DialogTitle>
81-
<DialogDescription>
82-
T3 needs your SSH password to connect to{" "}
83-
{target ? <code>{target}</code> : "the remote host"}. The password is passed to the
84-
local SSH process for this connection attempt and is not saved by T3 Code.
85-
</DialogDescription>
86-
</DialogHeader>
87-
<DialogPanel className="space-y-3" scrollFade={false}>
88-
<div className="space-y-2">
89-
<p className="text-sm font-medium text-foreground">{currentRequest?.prompt}</p>
90-
<Input
91-
ref={inputRef}
92-
autoComplete="current-password"
93-
name="ssh-password"
94-
type="password"
95-
value={password}
96-
onChange={(event) => setPassword(event.target.value)}
97-
/>
98-
</div>
99-
<p className="text-sm text-muted-foreground">
100-
Use SSH keys to avoid repeated password prompts on new SSH sessions.
101-
</p>
102-
</DialogPanel>
103-
<DialogFooter>
104-
<Button variant="outline" onClick={() => void respond(null)}>
105-
Cancel
106-
</Button>
107-
<Button onClick={() => void respond(password)} type="button">
108-
Continue
109-
</Button>
110-
</DialogFooter>
79+
<form
80+
onSubmit={(event) => {
81+
event.preventDefault();
82+
void respond(password);
83+
}}
84+
>
85+
<DialogHeader>
86+
<DialogTitle>SSH Password Required</DialogTitle>
87+
<DialogDescription>
88+
T3 needs your SSH password to connect to{" "}
89+
{target ? <code>{target}</code> : "the remote host"}. The password is passed to the
90+
local SSH process for this connection attempt and is not saved by T3 Code.
91+
</DialogDescription>
92+
</DialogHeader>
93+
<DialogPanel className="space-y-3" scrollFade={false}>
94+
<div className="space-y-2">
95+
<p className="text-sm font-medium text-foreground">{currentRequest?.prompt}</p>
96+
<Input
97+
ref={inputRef}
98+
autoComplete="current-password"
99+
name="ssh-password"
100+
type="password"
101+
value={password}
102+
onChange={(event) => setPassword(event.target.value)}
103+
/>
104+
</div>
105+
<p className="text-sm text-muted-foreground">
106+
Use SSH keys to avoid repeated password prompts on new SSH sessions.
107+
</p>
108+
</DialogPanel>
109+
<DialogFooter>
110+
<Button type="button" variant="outline" onClick={() => void respond(null)}>
111+
Cancel
112+
</Button>
113+
<Button type="submit">Continue</Button>
114+
</DialogFooter>
115+
</form>
111116
</DialogPopup>
112117
</Dialog>
113118
);

0 commit comments

Comments
 (0)