fix(workflow): derive the webhook URL only where a sub-block shows one - #6758
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit 000bec4. Configure here. |
Greptile SummaryThis PR prevents webhook URL derivation for sub-blocks that do not display a webhook URL, avoiding unnecessary
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/hooks/use-webhook-management.ts | Gates webhook URL derivation consistently with the hook’s existing query and consumer behavior; no blocking issue was found. |
Reviews (2): Last reviewed commit: "fix(workflow): derive the webhook URL on..." | Re-trigger Greptile
7874ec1 to
80dbf57
Compare
`sub-block.tsx` mounts `useWebhookManagement` for every sub-block in the editor panel, and `getBaseUrl()` throws when NEXT_PUBLIC_APP_URL reads empty, so a missing deployment value took down the whole workflow route instead of the one webhook field. The hook already gates its query and store writes on `useWebhookUrl`; the URL now agrees.
80dbf57 to
000bec4
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 000bec4. Configure here.
Summary
sub-block.tsx:485mountsuseWebhookManagementfor every sub-block in the editor panel, and the hook derived a webhook URL for all of them.getBaseUrl()throws whenNEXT_PUBLIC_APP_URLreads empty, so a missing deployment value took down the entire workflow route instead of the single webhook field that needed the URL.useWebhookUrl(queryEnabled, line 131). The derived URL was the one value ignoring that flag; it now agrees with the rest of the hook.short-input.tsx:219,341already read it asuseWebhookUrl && webhookManagement.webhookUrl, the copy button renders only whenconfig.showCopyButton && config.useWebhookUrl(sub-block.tsx:1209), andslack-setup-wizard.tsx:92passesuseWebhookUrl: true. The value is never read inside the hook itself.Type of Change
Testing
Typecheck clean;
hooks/,stores/, andapp/workspacesuites pass.Checklist