fix(ui): validate optional tool icon URL and add fallback icon if user doesn't input URL#6383
Conversation
There was a problem hiding this comment.
Code Review
This pull request implements URL validation for tool icons in the ToolDialog component and refactors styling in ToolsListTable.jsx. The code changes include adding validation logic for icon URLs, updating the UI to display error messages, and modifying the save button's disabled state. Feedback from the reviewer identifies a bug where validation is not triggered on initial load in edit mode and points out dead JSX code. The reviewer suggests refactoring the validation logic to use useMemo for better synchronization and recommends reverting the use of hardcoded MUI class names in favor of library constants to maintain code robustness.
|
Please anyone don't open PR...i am working on this issue...there are still some issues in my code...so i am improving it and will complete it sooner ! |
|
Added all the changes which were suggested by Gemini Bot ! |
BugFix : Added Validation check for TOOL ICON SOURCE Field in Tools Dialogue, and add a default icon image if user has not provided
Related issue
Closes #6382
Summary
This PR improves the Tools icon experience by keeping Tool Icon Source optional while validating it when a value is provided. It also adds a safe fallback icon so Tools never render with a broken or empty icon in list/card views.
What’s fixed
http/httpsURLs when a value is entered.Screen.Recording.2026-05-14.164541.mp4
Problem
Previously:
Changes
ToolDialog.jsx
ToolsTable.jsx
iconSrcis missing or invalid.Behavior after this PR
abc123: validation error is shown and save is blocked.Testing done
Scope / Notes