fix(webhooks): made spacing more clear, added copy button for webhook URL & fixed race condition for mcp tools/server fetching in the mcp block#1309
Conversation
…ok URL & fixed race condition for mcp tools/server fetching in the mcp block
This reverts commit 5a88762.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Greptile Summary
This PR introduces multiple UI/UX improvements and fixes for the webhook and MCP (Model Context Protocol) components within the workflow editor. The changes address three main areas:
Webhook Settings Enhancements: The webhook settings component now provides individual copy tracking for each webhook URL, replacing the previous boolean copySuccess state with a Record<string, boolean> to track copy state per webhook. A dedicated copy button has been added to each webhook URL in the list view with proper tooltips and styling. The URL display has been improved by removing text truncation and implementing horizontal scrolling instead, ensuring full URLs are visible. Additionally, change detection has been implemented for edit mode through originalWebhook state tracking and a hasChanges() function that compares current form values with original webhook data, preventing unnecessary saves when no changes are made.
MCP Tool Selector Race Condition Fix: The MCP tool selector component addresses a critical race condition where tools weren't being properly fetched when a server was selected. A new useEffect hook has been added that automatically refreshes tools whenever the serverValue changes, ensuring tools are available immediately after server selection rather than only when the popover reopens. The component also now prevents clearing the selected tool value when disabled, avoiding loss of selection during loading states.
Visual and Interaction Improvements: Several semantic improvements have been made, including changing the test webhook icon from RefreshCw to Play for better user intuition (play = run/test vs refresh = reload), adding proper spacing between webhook items with margin-bottom, and removing the spinner from the save button during operations for cleaner UI feedback.
These changes integrate well with the existing workflow editor architecture, following established patterns for state management, UI components, and user interaction flows. The improvements enhance the overall user experience while maintaining consistency with the rest of the application's design system.
Confidence score: 4/5
- This PR is safe to merge with minimal risk as it focuses on UI improvements and fixes a well-defined race condition
- Score reflects solid implementation of user experience improvements and a targeted bug fix with clear logic
- Pay close attention to the MCP tool selector changes to ensure the race condition fix works as expected in production
2 files reviewed, 1 comment
...ceId]/w/[workflowId]/components/control-bar/components/webhook-settings/webhook-settings.tsx
Show resolved
Hide resolved
… URL & fixed race condition for mcp tools/server fetching in the mcp block (#1309) * update infra and remove railway * fix(webooks-ui): made spacing more clear, added copy button for webhook URL & fixed race condition for mcp tools/server fetching in the mcp block * Revert "update infra and remove railway" This reverts commit 5a88762. * remove extraneous comments * ack PR comments
… URL & fixed race condition for mcp tools/server fetching in the mcp block (simstudioai#1309) * update infra and remove railway * fix(webooks-ui): made spacing more clear, added copy button for webhook URL & fixed race condition for mcp tools/server fetching in the mcp block * Revert "update infra and remove railway" This reverts commit 5a88762. * remove extraneous comments * ack PR comments
Summary
made spacing more clear, added copy button for webhook URL & fixed race condition for mcp tools/server fetching in the mcp block
Type of Change
Testing
Tested manually,
Checklist