René's URL Explorer Experiment


Title: fix(triggers): stop cloned trigger blocks reusing the source's webhook URL by waleedlatif1 · Pull Request #6091 · simstudioai/sim · GitHub

Open Graph Title: fix(triggers): stop cloned trigger blocks reusing the source's webhook URL by waleedlatif1 · Pull Request #6091 · simstudioai/sim

X Title: fix(triggers): stop cloned trigger blocks reusing the source's webhook URL by waleedlatif1 · Pull Request #6091 · simstudioai/sim

Description: Summary Copy/pasting or duplicating a deployed webhook trigger block gave the clone the source's webhook URL instead of a fresh one. The precondition is deploy, which is what made it look intermittent: Before deploy the URL is derived. use-webhook-management.ts:103-109 and the canvas both fall back to ${baseUrl}/api/webhooks/trigger/${blockId}, and cloning already regenerates block ids — so copying an undeployed trigger yields a fresh URL on its own. After deploy the URL is stored. Deploy registers the webhook at path = triggerPath || block.id (deploy.ts:321-325) and the effect at use-webhook-management.ts:151 writes that literal path back into the source's triggerPath. Paste copies the string verbatim, the clone stops deriving, and it renders the source's URL. Fix: clear triggerPath on in-canvas clones so the clone derives from its new block id again. Two lines of behavior, one new function. Clears both the subBlocks structure and the sub-block value map. The value map is authoritative in mergeSubblockStateWithValues (a null there overrides the structure), and since no trigger declares triggerPath as a subblock it normally lives only in the store. Clearing one without the other leaves the source's path in effect. Deliberately unconditional, and limited to triggerPath. Zero blocks declare that subblock id, so there is nothing to collide with and no need to classify the block first — no predicate, no gate. The sibling TRIGGER_RUNTIME_SUBBLOCK_IDS entries are left alone on purpose. triggerConfig/triggerId are user configuration (and triggerConfig can be a legacy trigger's only config home). webhookId is a user-entered action field on Attio, Vercel, and Discord — and Attio/Vercel are trigger-capable, so clearing it by trigger-ness would destroy real config — while being unused as trigger state: deploy mints its own row id via generateShortId() and matches existing rows by block id, and useWebhookManagement overwrites the field from the server anyway. Scope Clone paths only. No deploy-side, server-side, or import/export behavior change — regenerateWorkflowIds (export/import), sanitizeSubBlocksForDuplicate (server duplicate + workspace forking), and the copilot edit path are untouched. Type of Change Bug fix Testing 8610 tests pass across stores + lib + triggers (612 files); tsc --noEmit clean; check:boundaries, check:realtime-prune, check:client-boundary, check:api-validation, check:utils all pass; biome clean. Verified non-vacuous by mutation testing — zero coverage holes. Every mutation is caught, including two that would re-introduce a regression: Mutation Tests failed Drop the structure clear 4 Drop the value-map clear 5 Helper early-return 6 Delete the regenerateBlockIds call site 5 Delete the duplicateBlock call site 1 Also clear webhookId (would wipe Attio/Vercel config) 4 Also clear triggerConfig (would drop trigger setup) 1 Write undefined instead of null 5 Coverage includes both triggerMode: true (the shape the toolbar actually creates — confirmed against production rows) and triggerMode: false (API/import rows), the value-map-only shape, the structure-only shape, and explicit preservation tests for webhookId on both a trigger-capable block in trigger mode and an action block. 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)

Open Graph Description: Summary Copy/pasting or duplicating a deployed webhook trigger block gave the clone the source's webhook URL instead of a fresh one. The precondition is deploy, which is what made it look inter...

X Description: Summary Copy/pasting or duplicating a deployed webhook trigger block gave the clone the source's webhook URL instead of a fresh one. The precondition is deploy, which is what made it look i...

Opengraph URL: https://github.com/simstudioai/sim/pull/6091

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:5f4c83ec-8e42-63e5-7769-8ee0fe63d33e
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id95C6:1B6493:50609B:6F2F52:6AFB3C0C
html-safe-nonce07fb04c671236d954c21fe610d5e176fe7ce5c2420469439414f7ceb627cc7ea
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NUM2OjFCNjQ5Mzo1MDYwOUI6NkYyRjUyOjZBRkIzQzBDIiwidmlzaXRvcl9pZCI6IjY0ODA3MDM1NzI3NzQyNDY1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac388e8c9d47ece77d752bd648e983ec4d32cdfcb0f15ed09defdc7ccc9058254a
hovercard-subject-tagpull_request:4166614238
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6091/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Copy/pasting or duplicating a deployed webhook trigger block gave the clone the source's webhook URL instead of a fresh one. The precondition is deploy, which is what made it look inter...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None2169b0dfbef67ed6b128074a5ed45bb7d5d1859783b10178b09a7765ad5f3693
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3b4fc8df5ef1c6757e733a23e6b81b6725021823
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6091/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6091%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6091%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6091/files
Reloadhttps://github.com/simstudioai/sim/pull/6091/files
Reloadhttps://github.com/simstudioai/sim/pull/6091/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests199 (199)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
worktree-webhook-clone-urlhttps://github.com/simstudioai/sim/tree/worktree-webhook-clone-url
Conversation 5 https://github.com/simstudioai/sim/pull/6091
Commits 1 https://github.com/simstudioai/sim/pull/6091/commits
Checks 28 https://github.com/simstudioai/sim/pull/6091/checks
Files changed https://github.com/simstudioai/sim/pull/6091/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6091/files
fix(triggers): stop cloned trigger blocks reusing the source's webhook URL https://github.com/simstudioai/sim/pull/6091/files#top
Show all changes 1 commit https://github.com/simstudioai/sim/pull/6091/files
14afed6 fix(triggers): stop cloned trigger blocks reusing the source's webhoo… waleedlatif1 Jul 30, 2026 https://github.com/simstudioai/sim/pull/6091/commits/14afed6ec490306fc2c6f920157b29ee69dd23bf
Clear filters https://github.com/simstudioai/sim/pull/6091/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6091/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6091/files
utils.test.ts https://github.com/simstudioai/sim/pull/6091/files#diff-1d07ce6dc720520e132199bedb515a638828002dd0440ce687c07d598636cfa8
utils.ts https://github.com/simstudioai/sim/pull/6091/files#diff-d1cd03664e0b4816b0dbace375aadec19b14d1efec9647648b0f4df3d19a17a8
store.test.ts https://github.com/simstudioai/sim/pull/6091/files#diff-449f624fee3cbfd5d9076e6a0e435715ed8bf6a9cf418d642b987df99e870476
store.ts https://github.com/simstudioai/sim/pull/6091/files#diff-e77f6367a437f03a60f0109e5343df013b4bce81e7487e582377350b117ef813
apps/sim/stores/workflows/utils.test.tshttps://github.com/simstudioai/sim/pull/6091/files#diff-1d07ce6dc720520e132199bedb515a638828002dd0440ce687c07d598636cfa8
View file https://github.com/simstudioai/sim/blob/14afed6ec490306fc2c6f920157b29ee69dd23bf/apps/sim/stores/workflows/utils.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6091/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6091/files#diff-1d07ce6dc720520e132199bedb515a638828002dd0440ce687c07d598636cfa8
https://github.com/simstudioai/sim/pull/6091/files#diff-1d07ce6dc720520e132199bedb515a638828002dd0440ce687c07d598636cfa8
apps/sim/stores/workflows/utils.tshttps://github.com/simstudioai/sim/pull/6091/files#diff-d1cd03664e0b4816b0dbace375aadec19b14d1efec9647648b0f4df3d19a17a8
View file https://github.com/simstudioai/sim/blob/14afed6ec490306fc2c6f920157b29ee69dd23bf/apps/sim/stores/workflows/utils.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6091/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6091/files#diff-d1cd03664e0b4816b0dbace375aadec19b14d1efec9647648b0f4df3d19a17a8
https://github.com/simstudioai/sim/pull/6091/files#diff-d1cd03664e0b4816b0dbace375aadec19b14d1efec9647648b0f4df3d19a17a8
https://github.com/simstudioai/sim/pull/6091/files#diff-d1cd03664e0b4816b0dbace375aadec19b14d1efec9647648b0f4df3d19a17a8
https://github.com/simstudioai/sim/pull/6091/files#diff-d1cd03664e0b4816b0dbace375aadec19b14d1efec9647648b0f4df3d19a17a8
apps/sim/stores/workflows/workflow/store.test.tshttps://github.com/simstudioai/sim/pull/6091/files#diff-449f624fee3cbfd5d9076e6a0e435715ed8bf6a9cf418d642b987df99e870476
View file https://github.com/simstudioai/sim/blob/14afed6ec490306fc2c6f920157b29ee69dd23bf/apps/sim/stores/workflows/workflow/store.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6091/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6091/files#diff-449f624fee3cbfd5d9076e6a0e435715ed8bf6a9cf418d642b987df99e870476
https://github.com/simstudioai/sim/pull/6091/files#diff-449f624fee3cbfd5d9076e6a0e435715ed8bf6a9cf418d642b987df99e870476
apps/sim/stores/workflows/workflow/store.tshttps://github.com/simstudioai/sim/pull/6091/files#diff-e77f6367a437f03a60f0109e5343df013b4bce81e7487e582377350b117ef813
View file https://github.com/simstudioai/sim/blob/14afed6ec490306fc2c6f920157b29ee69dd23bf/apps/sim/stores/workflows/workflow/store.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6091/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6091/files#diff-e77f6367a437f03a60f0109e5343df013b4bce81e7487e582377350b117ef813
https://github.com/simstudioai/sim/pull/6091/files#diff-e77f6367a437f03a60f0109e5343df013b4bce81e7487e582377350b117ef813
https://github.com/simstudioai/sim/pull/6091/files#diff-e77f6367a437f03a60f0109e5343df013b4bce81e7487e582377350b117ef813
https://github.com/simstudioai/sim/pull/6091/files#diff-e77f6367a437f03a60f0109e5343df013b4bce81e7487e582377350b117ef813
Please reload this pagehttps://github.com/simstudioai/sim/pull/6091/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.