Skip to content

feat(deployments): Add option to copy webhook url by clicking on it#3952

Merged
Siumauricio merged 7 commits intoDokploy:canaryfrom
jirkavrba:copy-webhook-url
Mar 10, 2026
Merged

feat(deployments): Add option to copy webhook url by clicking on it#3952
Siumauricio merged 7 commits intoDokploy:canaryfrom
jirkavrba:copy-webhook-url

Conversation

@jirkavrba
Copy link
Contributor

@jirkavrba jirkavrba commented Mar 9, 2026

What is this PR about?

Change deployments webhook URL to be a clickable badge that copies the url into clipboard.

Checklist

Before submitting this PR, please make sure that:

  • You created a dedicated branch based on the canary branch.
  • You have read the suggestions in the CONTRIBUTING.md file https://github.com/Dokploy/dokploy/blob/canary/CONTRIBUTING.md#pull-request
  • You have tested this PR in your local instance. If you have not tested it yet, please do so before submitting. This helps avoid wasting maintainers' time reviewing code that has not been verified by you.

Issues related (if applicable)

Screenshots (if applicable)

image

Greptile Summary

This PR enhances the deployments panel by converting the static webhook URL text into a clickable Badge that copies the URL to the clipboard, improving the user experience for setting up git provider webhooks.

Key changes:

  • Extracts the webhook URL into a useMemo (webhookUrl) to avoid duplicating the template literal logic.
  • Wraps the URL in a Badge with onClick, onKeyDown (Enter/Space), role="button", tabIndex={0}, aria-label, and whitespace-normal break-all for correct wrapping — all good accessibility and UX choices.
  • Adds the copy-to-clipboard package and a Copy icon from lucide-react.
  • One remaining concern: both onClick and onKeyDown always call toast.success("Copied to clipboard.") without checking the boolean return value of copy(). If the clipboard write fails (denied permissions, HTTP context, older browser fallback), the user is falsely told the copy succeeded.

Confidence Score: 4/5

  • This PR is safe to merge; the change is small, focused, and the only issue is a minor UX edge case around error handling for clipboard failures.
  • The implementation is clean and correctly addresses accessibility (keyboard navigation, ARIA attributes) and responsive layout. The single open issue — unconditionally showing a success toast regardless of whether copy() actually succeeded — is a non-critical UX concern rather than a functional bug in the happy path, which is why the score sits at 4 rather than 5.
  • No files require special attention beyond the minor clipboard error-handling note in show-deployments.tsx.

Last reviewed commit: de201d0

Greptile also left 1 inline comment on this PR.

@jirkavrba jirkavrba requested a review from Siumauricio as a code owner March 9, 2026 08:28
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Mar 9, 2026
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. enhancement New feature or request and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Mar 9, 2026
@jirkavrba jirkavrba marked this pull request as draft March 9, 2026 08:38
@jirkavrba jirkavrba marked this pull request as ready for review March 9, 2026 08:38
@dosubot dosubot bot added the bug Something isn't working label Mar 9, 2026
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Mar 9, 2026
@jirkavrba jirkavrba marked this pull request as draft March 9, 2026 08:50
@jirkavrba jirkavrba marked this pull request as ready for review March 9, 2026 08:50
@jirkavrba jirkavrba marked this pull request as draft March 9, 2026 09:04
@jirkavrba jirkavrba marked this pull request as ready for review March 9, 2026 09:05
@Siumauricio Siumauricio merged commit 75a7970 into Dokploy:canary Mar 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants