-
Notifications
You must be signed in to change notification settings - Fork 3.5k
feat(folders): soft-delete folders and show in Recently Deleted #4001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3ccc067
feat(folders): soft-delete folders and show in Recently Deleted
waleedlatif1 3c6558d
fix(testing): add FOLDER_RESTORED to audit mock
waleedlatif1 1b44716
fix(folders): atomic restore transaction and scope to folder-deleted …
waleedlatif1 6430e1c
refactor(folders): simplify restore to remove hacky 5s time window
waleedlatif1 98dc9ea
fix(db): regenerate folder soft-delete migration with drizzle-kit
waleedlatif1 6020dab
chore(db): fix migration metadata formatting
waleedlatif1 690508a
fix(folders): scope restore to folder-deleted workflows via shared ti…
waleedlatif1 cbabc16
fix(workflows): clear folderId on restore when folder is archived or …
waleedlatif1 99a88b4
fix(folders): format restoreFolderRecursively call to satisfy biome
waleedlatif1 22ba57d
fix(folders): close remaining restore edge cases
waleedlatif1 47e0ea2
fix(folders): add archivedAt to optimistic folder creation objects
waleedlatif1 a80cc8b
fix(folders): handle missing parent folder during restore reparenting
waleedlatif1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(folders): close remaining restore edge cases
Three issues caught by audit: 1. Child folder restore used isNotNull instead of timestamp matching, so individually-deleted child folders would be incorrectly restored. Now uses eq(archivedAt, folderArchivedAt) for both workflows AND child folders — consistent and deterministic. 2. No workspace archived check — could restore a folder into an archived workspace. Now checks getWorkspaceWithOwner, matching the existing restoreWorkflow pattern. 3. Re-restoring an already-restored folder returned an error. Now returns success with zero counts (idempotent). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Loading branch information
commit 22ba57d44585376d0df3247fc1ab0db6fe255516
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.