cherrypick: [release/3.16.0] fix(frontend): fix webhook detail page broken by UUID resource_id migration#19720
Conversation
…ration (#19719) The migration from integer IDs to UUID resource_ids (migration 3.16.3) broke the webhook detail page. The slug format "title-UUID" was parsed by splitting on "-" and taking the last segment, which only returned the last UUID segment instead of the full UUID. This caused the webhook lookup to fail, falling back to an empty default webhook, which then caused "invalid request" errors on update. Replace slug-based routing with direct resource_id routing: - Route param changed from :projectWebhookSlug to :webhookResourceId - Navigate with extractProjectWebhookID() instead of projectWebhookV1Slug() - Compare webhook IDs as strings instead of parseInt() - Remove dead code: idFromSlug, projectWebhookV1Slug Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> (cherry picked from commit f69a9d6)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f863df1065
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| projectWebhookV1Store.getProjectWebhookFromProjectById( | ||
| project.value, | ||
| props.webhookResourceId |
There was a problem hiding this comment.
Handle legacy
<title>-<id> webhook route params
Using props.webhookResourceId directly for lookup breaks previously generated webhook detail URLs (the old format was <slugified-title>-<id>), because the full slug string no longer matches extractProjectWebhookID(webhook.name). In practice, bookmarked/history links or links shared before this change will now render unknownProjectWebhook() instead of the real webhook. Please keep a fallback parse path for legacy slugs (or add a redirect) so pre-existing URLs continue to resolve.
Useful? React with 👍 / 👎.



Description
Backport of #19719 to
release/3.16.0.