Schedule sandbox deletion from Settings instead of hard-deleting - #5075
Open
hirad121 wants to merge 1 commit into
Open
Schedule sandbox deletion from Settings instead of hard-deleting#5075hirad121 wants to merge 1 commit into
hirad121 wants to merge 1 commit into
Conversation
The Settings page's sandbox delete flow called Sandboxes.delete_sandbox/2 (immediate, permanent) instead of Sandboxes.schedule_sandbox_deletion/2 (soft delete with a 7-day grace period), even though the shared confirmation dialog always told the user the sandbox would be retained before being permanently removed. The sandbox list's delete flow already used the correct function; only Settings was affected. Also fixes the same dialog's missing descendants warning on the Settings path: the descendants prop was never passed through, so "Its N child sandboxes will also be deleted" never rendered there, even though the sandbox list's delete flow has shown it since OpenFn#4670. Fixes OpenFn#5058 Fixes OpenFn#4667
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.
Description
Fixes the Settings-page sandbox delete flow, which was permanently destroying
a sandbox instead of scheduling it for deletion with the 7-day grace period.
Two bugs in the same flow:
confirm-deletehandler calledSandboxes.delete_sandbox/2(harddelete, immediate
Projects.delete_project/1) instead ofSandboxes.schedule_sandbox_deletion/2(soft delete — setsscheduled_deletion, recoverable during the grace period), eventhough the shared confirmation dialog always tells the user the sandbox
"will be retained... before being permanently removed." The sandbox
card's delete flow already used the correct function; only Settings
was affected.
warning never rendered from Settings, because the
descendantspropwasn't being passed through. Soft-delete sandboxes with grace-period purge #4670 added this warning to the sandbox
card path back in May but never wired it into Settings, leaving When deleting a sandbox with dependents, provide a warning #4667
open and unaddressed since — this PR is the missing other half of that fix.
Closes #5058
Closes #4667
Validation steps
has
scheduled_deletionset and is recoverable during the grace period,same as deleting from the sandbox card.
Settings page — the "Its child sandbox will also be deleted" warning
now shows (previously silent, per When deleting a sandbox with dependents, provide a warning #4667).
Additional notes for the reviewer
Small, isolated diff — 3 files (
settings.ex,settings.html.heex,sandbox_settings_test.exs). Redirect target (root project's workflow page)is intentionally unchanged — it already matches what the shared modal
tells the user, unlike the sandbox card's own redirect target for
deeply-nested sandboxes (pre-existing, out of scope here). Full test suite
passes unchanged.
AI Usage
Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):
You can read more details in our
Responsible AI Policy
Pre-submission checklist
/reviewwith Claude Code)
(e.g.,
:owner,:admin,:editor,:viewer)