From d71f057bde060003104a708ec2a23c3ce9238967 Mon Sep 17 00:00:00 2001 From: Jaap-Jan de Wit | DodoTech Date: Fri, 16 Oct 2026 15:09:46 +0200 Subject: [PATCH] SFTP: stop waiting for ever on a host whose login prints text, and draw the file panes' icons whole MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SSH.NET 2026.0.0 runs the SFTP handshake synchronously inside ConnectAsync, with an infinite operation timeout and without reading the cancellation token. A host whose login script prints anything (an echo in .bashrc) puts text where the first SFTP packet belongs; SSH.NET reads its first four bytes as a length of about a gigabyte and waits for the rest, so the file browser said "Connecting…" for ever. The SFTP client now uses the connect timeout as its operation timeout for the handshake and resets it to infinite once connected, so transfers on slow links are unchanged. A timeout after authentication becomes a TimeoutException naming the likely cause. The SSH test server gains a second port whose sessions print a banner before sftp-server, and SftpSessionTests proves the open fails within a 3 s connect timeout with that message. Without the fix the test runs into its 30 s guard. Button.paneicon is a fixed 26x26 but kept Fluent's 8,5,8,6 padding, which left a 10px-wide content box, so every 15-16px Material icon on the SFTP panes was drawn with its sides cut off. Its padding is now 0. Rename on the host pane used U+E9AD, an italic T (text formatting); it now uses U+E9A2, the rename glyph the phone's files screen already uses. The host pane's "Up one directory" drew the design's arrow_downward; both panes now use arrow_upward. SSH tests 123/123, layout tests 203/203, app tests 744/749 with the 5 Linux TPM skips. --- src/DodoSSH.Client.App/App.axaml | 4 ++ .../Views/TransfersScreen.axaml | 15 +++---- .../SshNetConnectionFactory.cs | 45 +++++++++++++++++-- .../SftpSessionTests.cs | 25 +++++++++++ .../SshServerFixture.cs | 23 ++++++++++ 5 files changed, 101 insertions(+), 11 deletions(-) diff --git a/src/DodoSSH.Client.App/App.axaml b/src/DodoSSH.Client.App/App.axaml index e36fcd4..c6b4ce5 100644 --- a/src/DodoSSH.Client.App/App.axaml +++ b/src/DodoSSH.Client.App/App.axaml @@ -1223,10 +1223,14 @@ The two buttons in the drawer's header: the overflow menu and the arrow that puts the drawer away. Chrome rather than controls — they are the frame around whichever panel is showing, which is why they are flat and quiet until the pointer finds them. + + No padding, because the box is fixed: Fluent's own 8,5,8,6 left a glyph ten pixels of width inside + twenty-six, and every 15px Material icon on the SFTP panes was drawn with its sides cut off. -->