feat(desktop/terminal): connect-phase UX and SSH split-duplicate (#319)#341
Merged
Merged
Conversation
physercoe
approved these changes
Jul 20, 2026
physercoe
left a comment
Owner
There was a problem hiding this comment.
APPROVE. Connect-phase UX + SSH split-duplicate implemented cleanly. ssh_duplicate reuses the shared connection Arc<Handle> (no re-auth), per-attempt filtering guards stale phase ticks, all new strings have en+zh. Verified no conflict with the ConPTY windowsPty fix on main. Nit (non-blocking): the phase listener is not unlisten()ed on the cancel/timeout paths, so a truly-hung sshConnect invoke would leak a listener — harmless given per-attempt filtering.
physercoe
pushed a commit
that referenced
this pull request
Jul 20, 2026
…ic-tail merges Since v0.3.79: - fix(terminal): tell xterm the pty is ConPTY on Windows so a repainting TUI's intermediate frames no longer pile up in the scrollback (2b26a16). - 8 epic-tail PRs merged: #341 terminal connect-phase + SSH split-duplicate, #342 PDF struct-tree a11y + annotation shortcuts, #343 token burn-down / plural / responsive, #344 PDF fit-page / rotation / hand-pan / ink, #345 perf (page memo, debounce, chart cap, sync dirty-tracking), #346 modal migration + dirty-close guards, #347 vault TOTP / ed25519 / coded errors, #348 read reconcile / AuthorNav / table nav / frame check. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #319
The remaining tail of the terminal-lifecycle issue: connecting-phase indication with cancel/timeout, and split-duplicate for SSH sessions.
What
desktop/src/terminal/ConnectForm.tsx,desktop/src-tauri/src/ssh.rs):ssh_connectnow emitsssh-connect-progressticks at each handshake stage (tcp → auth → channel), tagged with a frontend-mintedconnect_id(same pattern as the SFTPtransfer_id). The connect button label follows the live phase; a Cancel button abandons the attempt; a 20 s ceiling (CONNECT_TIMEOUT_MS) abandons stuck handshakes with a timeout error. An abandoned attempt that connects late has its orphaned session closed (sshClose) instead of leaking a shell nobody renders. The form's close-Cancel is replaced by the attempt-Cancel while busy, so there is always exactly one Cancel button.desktop/src/terminal/TerminalPanel.tsx,ssh.rs): newssh_duplicatecommand opens a second interactive shell channel on the existing connection's shared russhHandle— no re-authentication, works for ad-hoc and key-auth tabs alike. Splitting with an SSH tab active duplicates it into the new tile; local tabs keep spawning a fresh local shell. The actor-spawn tail ofssh_connectwas extracted intospawn_shell_session, shared verbatim by both commands. The shared-orientation split model is kept — no nested split tree.Why
How verified
cd desktop && npm run build(sync:tokens + tsc --noEmit + vite build) — green.bash scripts/lint-desktop-tokens.sh— clean (86 off-token, all ≤ baseline, no phantom tokens; no CSS touched).git diff origin/main --stat— only the 6 intended files.ssh_connecttail, and the one newly-named type (russh::Channel<client::Msg>) was checked against the russh 0.62.0 crate sources (Handle::channel_open_sessionreturns exactly that).i18n:
term.phaseTcp/term.phaseAuth/term.phaseChannel/term.connectTimeoutadded in bothenandzh; no other user-visible strings.