Skip to content

Conversation

@EnxDev
Copy link
Contributor

@EnxDev EnxDev commented Dec 31, 2025

SUMMARY

Problem
When users fill out the database connection form, they experience two UX issues:

  1. No visual feedback during validation - When a user leaves a form field (onBlur), the system validates the input in the background, but there's no loading indicator to show that validation is in progress. This leaves users uncertain whether the system is processing their input or if something is wrong.
  2. Duplicate database name errors appear too late - Users only discover that a database name is already taken after clicking the "Connect" button and the form submission fails. This forces them to go back, change the name, and try again, creating a frustrating experience.

Solution
This PR addresses both issues:

  1. Added validation loading spinner to form fields - The isValidating prop is now passed to TableCatalog, ValidatedInputField, and CommonParameters components.
    Additionally, fixed the LabeledErrorBoundInput component where hasFeedback was only set when there was an error. Changed it, so the Ant Design FormItem displays the loading spinner during validation, not just the error icon when validation fails.
  2. Added duplicate name validation to validate_parameters API - Extended the ValidateDatabaseParametersCommand.validate() method to check for duplicate database names using DatabaseDAO.validate_uniqueness() (for new databases) or DatabaseDAO.validate_update_uniqueness() (for existing databases).
    This provides real-time feedback as users type, preventing wasted time on form submissions that will fail.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

  • Before
before.mp4
  • After
after.mp4
  • All tests should pass
  • See the videos above for testing instructions

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API
    es new feature or API
  • Removes existing feature or API

- Add isValidating prop to TableCatalog, ValidatedInputField, and
  CommonParameters to show loading spinner during validation
- Fix LabeledErrorBoundInput hasFeedback to display spinner while
  validating, not just on errors
- Add duplicate database name validation to validate_parameters
  endpoint for real-time feedback before form submission
…oint

- Remove early return in frontend validation hook when SSH is enabled,
  allowing backend validation to run for all database parameters
- Add SSH tunnel field validation in ValidateDatabaseParametersCommand
  to validate server_address, server_port, username, and credentials
- Add DatabaseSSHTunnelValidation schema for partial SSH tunnel data
  validation without strict authentication requirements
- Add ssh_tunnel field to DatabaseValidateParametersSchema
- Parse SSH tunnel errors in frontend and display under ssh_tunnel key
- Collect database_name duplicate errors alongside parameter errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants