improvement(useWebhookUrl): GET api/webhook is called when useWebhookUrl:true #2451
Merged
Pbonmars-20031006 merged 3 commits intostagingfrom Dec 18, 2025
Merged
Conversation
…enerateurl function when the useWebhookurl flag is true
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryFixed unnecessary webhook API calls during block re-rendering by adding a Key changes:
Issue found:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant ShortInput
participant TriggerSave
participant useWebhookManagement
participant API
participant SubBlockStore
Note over ShortInput,TriggerSave: Components using webhook management
ShortInput->>useWebhookManagement: call hook with useWebhookUrl=false
Note over useWebhookManagement: useWebhookUrl is false
useWebhookManagement->>useWebhookManagement: Skip loadWebhookOrGenerateUrl()
useWebhookManagement-->>ShortInput: Return webhook state (no API call)
TriggerSave->>useWebhookManagement: call hook with useWebhookUrl=true
Note over useWebhookManagement: useWebhookUrl is true
useWebhookManagement->>SubBlockStore: Set loading state
useWebhookManagement->>API: GET /api/webhooks?workflowId&blockId
API-->>useWebhookManagement: Return webhook data
useWebhookManagement->>SubBlockStore: Store webhookId, triggerPath, triggerConfig
useWebhookManagement->>SubBlockStore: Mark as checked
useWebhookManagement-->>TriggerSave: Return webhook state with URL
|
icecrasher321
approved these changes
Dec 18, 2025
Collaborator
icecrasher321
left a comment
There was a problem hiding this comment.
Looks good, thanks for the reasoning.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The issue where the re rendering blocks specially when they go in and out of focus makes a call for GET api/webhooks irrespective of whether a webhookurl has been set for the workflow.
The fix was to make sure loadwebhookorgenerateurl function only gets called when useWebhookUrl is set true.
Type of Change
Testing
Tested manually by looking at server logs.
Checklist
Screenshots/Videos