Skip to content

improvement(forking): make webhook url mapping clear - #6272

Merged
icecrasher321 merged 2 commits into
stagingfrom
staging-v24
Aug 5, 2026
Merged

improvement(forking): make webhook url mapping clear#6272
icecrasher321 merged 2 commits into
stagingfrom
staging-v24

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

Make Webhook URL mappings clearly mappable / regen-able.

Type of Change

  • Other: UX Improvement

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

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 5, 2026 12:41am

Request Review

@cursor

cursor Bot commented Aug 5, 2026

Copy link
Copy Markdown

PR Summary

Cursor Bugbot is generating a summary for commit e290b7c. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR makes webhook URL behavior explicit during workspace synchronization and adds resource-level acknowledgment for references deleted from the source.

  • Preserves existing target webhook paths and allows compatible retiring paths to be assigned to arriving triggers.
  • Restricts automatic URL adoption to triggers with the same provider and reports URLs that will stop serving.
  • Presents deleted-reference drops at their true resource-wide scope and verifies them against source liveness on the server.
  • Extends fork API contracts, synchronization results, warnings, and tests for these behaviors.

Confidence Score: 5/5

The PR appears safe to merge.

The provider compatibility fix prevents cross-provider URL adoption, and the resource-level Drop UI now matches the server’s resource-scoped clearing behavior; no blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/ee/workspace-forking/lib/promote/trigger-urls.ts Plans and validates provider-compatible webhook path preservation, adoption, and retirement reporting.
apps/sim/ee/workspace-forking/lib/copy/deploy-bridge.ts Loads active public target webhook paths and their providers while excluding polling and internal endpoints.
apps/sim/ee/workspace-forking/lib/promote/promote.ts Integrates transactional drop verification and webhook path resolution into fork promotion.
apps/sim/ee/workspace-forking/lib/promote/cleared-refs.ts Verifies deleted-resource acknowledgments and applies them only to matching source-deleted references.
apps/sim/ee/workspace-forking/components/fork-sync/use-fork-sync.ts Manages resource-level drop decisions and webhook adoption overrides for preview and promotion.
apps/sim/ee/workspace-forking/components/fork-sync/fork-sync-view.tsx Displays webhook URL mappings and accurately communicates the field-wide scope of resource drops.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Preview[Build fork preview] --> Read[Read active target webhook paths]
  Read --> Plan[Build trigger URL plan]
  Plan --> Match{Same workflow and provider?}
  Match -->|Yes| Choice[Preserve or adopt retiring path]
  Match -->|No| Retire[Report retiring URL]
  Choice --> Promote[Submit promotion choices]
  Retire --> Promote
  Promote --> Rebuild[Rebuild and validate plan in transaction]
  Rebuild --> Copy[Copy workflows with resolved trigger paths]
  Copy --> Deploy[Deploy target workflows]
  Deploy --> Result[Report dropped references and retired URLs]
Loading

Reviews (2): Last reviewed commit: "fix(forking): honour drops before the un..." | Re-trigger Greptile

Comment thread apps/sim/ee/workspace-forking/lib/promote/trigger-urls.ts Outdated
Comment thread apps/sim/ee/workspace-forking/components/fork-sync/use-fork-sync.ts
Comment thread apps/sim/ee/workspace-forking/components/forks.tsx
Comment thread apps/sim/ee/workspace-forking/lib/promote/promote.ts
…n URL adoption

Review round 1 on #6272.

- Drop was inert for required references: `postCopyUnmappedRequired` gates before
  the cleared-ref gate that honours acknowledgments, so a source-deleted reference
  on a required field still failed with "map all required ... first". Verified drops
  are now resolved once (`verifyForkDropAcknowledgments`) and subtracted from both
  gates. Verification is not optional: an unmapped reference of a non-blocking kind
  (credential, env-var) never re-blocks downstream, so subtracting raw
  acknowledgments would let a crafted payload skip the required gate.
- URL adoption now requires provider equality. A count-only 1:1 pairing could hand a
  GitHub URL to an arriving Slack trigger, keeping the endpoint alive while every
  request failed signature verification - and reporting the URL as preserved.
- `resolveTriggerId` moved from `lib/webhooks/deploy.ts` to `@/triggers/webhook-url`
  so the deploy path and the fork's provider check share one resolution.
- Trigger URL warnings render the full public URL in the heads-up section and name
  the URL in the overwrite confirm, where identical workflow names were ambiguous.
- The Drop control renders once per resource and states how many fields it covers;
  the remapper clears by reference, so a per-row control implied a choice the write
  path cannot honour.
- Export clears `workflow-selector`: nothing on the import path remaps workflow ids
  (`import-export.ts` re-creates each workflow under a fresh id), so a preserved
  reference dangled - bundle or not.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ 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 57f5565. Configure here.

@icecrasher321
icecrasher321 merged commit 6cc25f6 into staging Aug 5, 2026
30 checks passed
@icecrasher321
icecrasher321 deleted the staging-v24 branch August 5, 2026 08:10
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