Conversation
The webhook list page was constructing inbound URLs client-side using a hardcoded buildWebhookUrl helper that always used the current user's ID and the /inbound/user/ path prefix. For org webhooks this produced incorrect URLs containing the user ID instead of the org ID. Fix: include inboundUrl in the webhookTriggers.list tRPC response (matching the admin router pattern) and read it from the trigger data on the client, eliminating the buggy client-side URL construction.
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
|
jeanduplessis
approved these changes
Mar 10, 2026
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
buildWebhookUrlhelper that always usedsession.user.idand hardcoded the/inbound/user/path prefix. For org webhooks, this produced URLs with the user's ID instead of the org's ID and the wrong path prefix (/inbound/user/instead of/inbound/org/).webhookTriggers.listtRPC endpoint now includesinboundUrlin each trigger's response (computed server-side viabuildInboundUrl, which correctly branches onorganizationIdvsuserId). The list page component now readstrigger.inboundUrldirectly instead of constructing URLs client-side. This matches the pattern already used by the admin webhook list and the details page.buildWebhookUrlhelper,useSessionimport, andencodeUserIdForPathimport fromWebhookTriggersListContent.tsx.Verification
pnpm typecheckpasses cleanly across all workspace projectsVisual Changes
N/A
Reviewer Notes
AdminWebhookTriggersList.tsx) already followed the correct pattern: its tRPC endpoint (admin.webhookTriggers.list) callsbuildInboundUrlper trigger and returnsinboundUrlin the response. This fix aligns the non-admin list endpoint to the same approach.webhookTriggers.get, which already returned the server-computedinboundUrl.