Skip to content

Commit ef931d8

Browse files
skulidropekclaude
andcommitted
feat(app): show password + auto-cd in Direct SSH section
- directCommand includes -t "cd /home/dev/app && exec $SHELL" - SSH password shown in Direct SSH section (shared with CF tunnel) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 658a11e commit ef931d8

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

packages/app/src/web/app-ready-terminal-pane.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ const VsCodeAccessPanel = (
226226
: null
227227
const directHost = window.location.hostname
228228
const directConfig = directSshConfig(directHost, info.sshPort, info.sshUser)
229-
const directCommand = `ssh -p ${info.sshPort} ${info.sshUser}@${directHost}`
229+
const directCommand = `ssh -p ${info.sshPort} -t ${info.sshUser}@${directHost} "cd ${info.targetDir} && exec \\$SHELL"`
230230
const directVscodeUri = `vscode://ms-vscode-remote.remote-ssh/open?hostName=${encodeURIComponent(`${directHost}-ssh`)}&folder=${encodeURIComponent(info.targetDir)}`
231231
return (
232232
<div style={{
@@ -299,6 +299,14 @@ const VsCodeAccessPanel = (
299299
<code style={vsCodePanelCodeStyle}>{directCommand}</code>
300300
<button onClick={() => { copyText(directCommand) }} style={vsCodePanelCopyBtnStyle} type="button">copy</button>
301301

302+
{cfState.tag === "ready" && (
303+
<>
304+
<div style={{ color: "#8be9fd", fontSize: "0.9em", fontWeight: "bold", marginTop: "10px" }}>SSH password</div>
305+
<code style={vsCodePanelCodeStyle}>{cfState.sshPassword}</code>
306+
<button onClick={() => { copyText(cfState.sshPassword) }} style={vsCodePanelCopyBtnStyle} type="button">copy</button>
307+
</>
308+
)}
309+
302310
<div style={{ color: "#8be9fd", fontSize: "0.9em", fontWeight: "bold", marginTop: "10px" }}>Open in VS Code</div>
303311
<div style={{ color: "#8fa6c4", fontSize: "0.78em" }}>requires config entry above in ~/.ssh/config</div>
304312
<div style={{ marginTop: "4px" }}>

0 commit comments

Comments
 (0)