Skip to content

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

Merged
waleedlatif1 merged 5 commits intostagingfrom
fix/webhook-custom
Sep 10, 2025
Merged

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
waleedlatif1 merged 5 commits intostagingfrom
fix/webhook-custom

Conversation

@waleedlatif1
Copy link
Collaborator

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

  • Bug fix

Testing

Tested manually,

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Sep 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sim Canceled Canceled Sep 10, 2025 9:25pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Sep 10, 2025 9:25pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Edit Code Review Bot Settings | Greptile

@vercel vercel bot temporarily deployed to Preview – docs September 10, 2025 21:25 Inactive
@waleedlatif1 waleedlatif1 merged commit cff0a87 into staging Sep 10, 2025
4 of 5 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/webhook-custom branch September 10, 2025 21:25
@vercel vercel bot temporarily deployed to Preview – sim September 10, 2025 21:25 Inactive
Sg312 pushed a commit that referenced this pull request Sep 15, 2025
… 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
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
… 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant