Skip to content

fix(edit-connection): improve tab sync, credential handling, and save flow - #67

Merged
GOODBOY008 merged 2 commits into
GOODBOY008:mainfrom
sunxiaobin89:fix/edit-connection-tab-sync
Jul 30, 2026
Merged

fix(edit-connection): improve tab sync, credential handling, and save flow#67
GOODBOY008 merged 2 commits into
GOODBOY008:mainfrom
sunxiaobin89:fix/edit-connection-tab-sync

Conversation

@sunxiaobin89

Copy link
Copy Markdown
Contributor

Summary

Improves the edit-connection experience: tab titles now update after a rename, credentials are preserved when the edit dialog opens from a failed connection, and the "Update & Connect" button becomes "Save" to avoid unnecessary reconnection.

Changes

Edit-connection flow

  • UPDATE_TAB_NAME reducer action — tab title updates live after saving a renamed connection
  • handleSave replaces handleConnect in edit mode — the button now says "Save" and doesn't trigger a reconnect
  • pendingConnectionId tracking — when the edit dialog was opened from a failed double-click (e.g. wrong port), saving the fix auto-retries the connection
  • Existing tab reuse — the auto-retry reuses the previously failed tab instead of opening a duplicate
  • 6 setEditingConnection calls now include credentialspassword, privateKeyPath, and passphrase are no longer lost when a connection error opens the edit dialog

New-connection / general

  • SSH config saved before connecting — aligns with SFTP/FTP/Desktop behavior, so a config is preserved even if the server is temporarily unreachable
  • Unique session IDs for each SSH attempt — prevents stale backend sessions from interfering with updated connection parameters
  • Sidebar refresh after dialog closeConnectionManager now refreshes its tree when the dialog closes, so saved changes appear immediately

Stability

  • PtyTerminal effect no longer depends on connectionName — renaming a connection no longer tears down the WebSocket + PTY session
  • UPDATE_TAB_NAME + RECONNECT_TAB reducer tests added

Testing

  • 510 tests pass (37 test files)
  • TypeScript compiles cleanly
  • Tauri build succeeds

… flow

- Add UPDATE_TAB_NAME reducer for live tab title updates after rename
- Add handleSave for edit mode so Save button doesn't trigger reconnect
- Track pendingConnectionId to auto-retry connection after saving a fix
- Reuse existing failed tab on auto-retry instead of creating a duplicate
- Fix 6 setEditingConnection calls missing credential fields
- Save SSH config before connecting (aligns with SFTP/FTP/Desktop)
- Use unique session IDs to prevent stale backend session interference
- Add refreshTrigger to ConnectionManager for immediate sidebar refresh
- Remove connectionName from PtyTerminal effect deps to prevent reconnect on rename

Test: 510 tests pass, 37 test files
The sed command used to add the save button key accidentally created
an extra transferQueue.save entry not present in en.json.

Test: i18n parity check passes, 947 keys in both files
@GOODBOY008
GOODBOY008 force-pushed the fix/edit-connection-tab-sync branch from f285c93 to 28fbca2 Compare July 29, 2026 09:34

@GOODBOY008 GOODBOY008 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GOODBOY008
GOODBOY008 merged commit 2f1d68e into GOODBOY008:main Jul 30, 2026
4 checks passed
@sunxiaobin89
sunxiaobin89 deleted the fix/edit-connection-tab-sync branch July 31, 2026 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants