Add loading state and toast notifications to PingTab
- Implement toast notifications for ping status (loading, success, error)
- Add Bell icon to ping button for better UX
Motivation and Context
- Better UI experience for the Ping toast message
How Has This Been Tested?
Production
Breaking Changes
No, only UI changes
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update
Checklist
- [x] I have read the MCP Documentation
- [x] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [x] I have added appropriate error handling
- [x] I have added or updated documentation as needed
Additional context
Image as seen here:
Hi @olishiz , thanks for the PR. Were you table to test this with a failed ping as well?
Hi @olishiz , thanks for the PR. Were you table to test this with a failed ping as well?
Yes, I tested it locally as it seems when I shut down the server, it will show the error message.
I believed the error will be handled properly and it will show on the toast message to the user
@olishiz Thanks for this! I agree that the toast response is good and that the bell on the button is good.
I have a suggestion / request. It can be done on another PR, but if we're monkeying with the ping button we might as well do it here if you're up for it.
I have always felt that the Ping button doesn't belong two clicks away a on a tab of its own.
Ping is a server lifecycle button, reasonably related to Connect | Disconnect and Reconnect. Depending upon the state of those buttons and the responsiveness of the server, you might be moved to verify the connection with Ping.
So I propose that it be refactor/moved to the Sidebar as a full-width button, vertically between those buttons and the connection state indicator:
It should be hidden when Connect is shown, and shown when Disconnect and Reconnect is shown. And the ping tab and button in the menu should be removed.
@olaservo I think we talked in passing about this once before, does this sound reasonable?
@cliffhall yes I think that makes sense. There's a lot more tabs now that actually deserve a tab, but I don't think ping needs it's own tab in the UI.