fix: prevent Watch Paths tooltip button from submitting the form#3977
Merged
Siumauricio merged 1 commit intoDokploy:canaryfrom Mar 16, 2026
Merged
Conversation
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.
What is this PR about?
The "Watch Paths" tooltip info button in the Git, Bitbucket, and Compose Git provider forms was unintentionally submitting the form when clicked. This happened because
<TooltipTrigger>renders an internal<button>element, which defaults totype="submit"inside a<form>. The fix adds theasChildprop to<TooltipTrigger>and replaces the custom<div>with a<HelpCircle>icon, consistent with the GitHub, GitLab, and Gitea provider components where this already works correctly.Checklist
Before submitting this PR, please make sure that:
canarybranch.Issues related (if applicable)
closes #3976
Greptile Summary
This PR fixes a bug where the "Watch Paths" tooltip info button was unintentionally triggering form submission in the Git, Bitbucket, and Compose Git provider forms. The root cause was that Radix UI's
<TooltipTrigger>renders a<button>element by default, which browsers treat astype="submit"when nested inside a<form>. By adding theasChildprop,<TooltipTrigger>delegates rendering to its child (<HelpCircle>— an SVG element), which carries no submit semantics.The fix is minimal, correct, and directly mirrors the pattern already in use across the GitHub, GitLab, and Gitea provider components. No issues were found.
save-bitbucket-provider.tsx,save-git-provider.tsx,save-git-provider-compose.tsx: AddedasChildto<TooltipTrigger>and replaced the hand-rolled<div>?</div>badge with the shared<HelpCircle>icon, aligning all six provider forms to the same pattern.HelpCircleicon withhover:text-foreground transition-colorsmatches the design used in the already-fixed providers.Confidence Score: 5/5
Last reviewed commit: 290267b
(2/5) Greptile learns from your feedback when you react with thumbs up/down!