feat: show modal when switching to incompatible providers#4288
Open
colocated wants to merge 4 commits intoDokploy:canaryfrom
Open
feat: show modal when switching to incompatible providers#4288colocated wants to merge 4 commits intoDokploy:canaryfrom
colocated wants to merge 4 commits intoDokploy:canaryfrom
Conversation
This commit shows a modal after validating the form data with Zod to confirm that the user intends to switch providers after being told that the preview deployments feature will disabled, as it's only compatible with one of the available application source types.
Hides the "Preview Deployments" tab when the feature is not available to prevent confusion.
was NOT meant to commit that, my fault
Contributor
Author
|
@greptileai reset confidence score |
Contributor
Author
|
Converting to draft as I've found a UI bug, will fix and republish |
Contributor
Author
|
There was a bug when saving the docker provider (which is what i tested with) that it wouldn't properly hide the tab on a fresh project until next refresh of the page, so we use a different method to invalidate and reload the component now. @greptileai re-review |
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?
This commit shows a modal after validating the form data with Zod to confirm that the user intends to switch providers after being told that the preview deployments feature will disabled, as it's only compatible with one of the available application source types.
Checklist
Before submitting this PR, please make sure that:
canarybranch.Issues related (if applicable)
None, new feature
Screenshots (if applicable)
Runs Zod validation checks BEFORE showing the modal to prevent confusion

Shows a modal if the change is valid to make sure the user wants to disable the preview deployments feature (only triggers if

sourceType = 'github'andpreviewDeploymentsare enabled as a feature on the application)Greptile Summary
This PR adds a confirmation modal when a user saves a non-GitHub provider (Bitbucket, GitLab, Gitea, Docker, plain Git, drag-and-drop) while the application currently has GitHub + preview deployments active. It also hides the "Preview Deployments" tab for non-GitHub source types, and consistently sets
isPreviewDeploymentsActive: falseon the server for every non-GitHub save mutation. Therefetch→utils.application.one.invalidatechange is a minor cache-management improvement bundled in.Confidence Score: 5/5
Safe to merge — logic is correct, server-side enforcement is consistent, and no critical issues remain.
The confirmation guard fires when and only when it should (sourceType === 'github' + isPreviewDeploymentsActive). Server mutations independently set isPreviewDeploymentsActive: false for every non-GitHub provider, so correctness doesn't depend solely on the UI path. The double-validation in the confirmation path is harmless. Previous P1 concerns have been addressed or acknowledged. All remaining observations are P2 or lower.
No files require special attention.
Reviews (4): Last reviewed commit: "fix: use application document invalidate..." | Re-trigger Greptile