Skip to content

Conversation

@Cleboost
Copy link
Owner

This pull request refactors the NewServerModal.vue component to improve the SSH server addition workflow, enhance error handling, and provide clearer user feedback during connection testing. The changes focus on validating input, restructuring connection logic, and updating the UI to better communicate connection status and errors.

Connection Workflow Improvements

  • Connection testing is now split into distinct steps before and after SSH key deployment, with dedicated functions (testConnectionBeforeSave, testConnectionAfterKeyDeployment) and a new createServer method to handle server creation only after a successful connection. [1] [2] [3]
  • The logic for handling dialog open/close events is improved to prevent closing the modal during ongoing connection tests, using the new handleDialogOpenChange function. [1] [2]

Validation and Error Handling

  • Added robust IP/hostname validation via the new isValidIP function, which is now used to enable/disable connection actions.
  • Introduced a dedicated error modal (errorModalOpen) that displays detailed connection failure information, troubleshooting steps, and connection logs to the user. [1] [2] [3]

User Interface Enhancements

  • The modal now includes a real-time connection status area with icons, messages, and streaming logs, giving users immediate feedback during connection attempts.
  • The Save and Cancel buttons are disabled during testing to prevent accidental actions, and the Save button shows a spinner and status text when testing is in progress.

Code Structure and Maintainability

  • Refactored and separated connection testing, key deployment, and server creation logic into smaller, focused functions for better readability and maintainability. [1] [2] [3]
  • Removed redundant cleanup logic from key deployment cancellation and declination handlers, as server creation now only occurs after a successful connection.

UI Consistency

  • Updated the dialog component to use controlled open state and event handling for consistent behavior.

These changes collectively make the server addition process more robust, user-friendly, and maintainable.

…ror handling. Added error modal for connection failures and improved user feedback during server addition process.
@Cleboost Cleboost merged commit f6b52de into master Oct 29, 2025
5 checks passed
@Cleboost Cleboost deleted the feat-server-conn-verify-fe577 branch November 9, 2025 10:56
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