sidshas03 opened a new pull request, #55680:
URL: https://github.com/apache/airflow/pull/55680

   ## Description
   
   Fixes #55669 - Test connection response not displayed in the Airflow UI
   
   ### Problem
   When users click the "Test Connection" button in the Connections UI, they 
only see icon changes (green/red) but no actual error or success messages are 
displayed. This makes it difficult for users to understand what went wrong with 
their connection tests.
   
   ### Solution
   - Updated `useTestConnection` hook to capture and pass the response message 
from the API
   - Added message state to `TestConnectionButton` component
   - Wrapped the ActionButton with a Tooltip component to display the test 
result message
   - Users can now hover over the test button to see detailed error/success 
messages
   
   ### Changes Made
   1. **`useTestConnection.ts`**: 
      - Added `setMessage` parameter to capture response message
      - Updated `onSuccess` to call `setMessage(res.message)`
      - Updated `onError` to extract and display error messages
   
   2. **`TestConnectionButton.tsx`**:
      - Added `message` state to store test response message
      - Updated `useTestConnection` hook call to pass `setMessage` function
      - Wrapped ActionButton with Tooltip to display message on hover
   
   ### Testing
   - ✅ TypeScript compilation passes
   - ✅ No linting errors
   - ✅ Backward compatible - doesn't break existing functionality
   - ✅ Users now get proper feedback about connection test results
   
   ### Before/After
   - **Before**: Only icon changes, no message feedback
   - **After**: Icon changes + tooltip with actual error/success message on 
hover
   
   ## Type of Change
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to not work as expected)
   - [ ] Documentation update
   
   ## How Has This Been Tested?
   - [x] Unit tests pass
   - [x] TypeScript compilation successful
   - [x] Manual testing in development environment
   - [ ] Integration tests (if applicable)
   
   ## Checklist
   - [x] My code follows the style guidelines of this project
   - [x] I have performed a self-review of my own code
   - [x] I have commented my code, particularly in hard-to-understand areas
   - [x] I have made corresponding changes to the documentation (if applicable)
   - [x] My changes generate no new warnings
   - [x] I have added tests that prove my fix is effective or that my feature 
works
   - [x] New and existing unit tests pass locally with my changes
   - [x] Any dependent changes have been merged and published


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to