Grace period for inaccessible workspaces#52638
Grace period for inaccessible workspaces#52638ojpro wants to merge 7 commits intozed-industries:mainfrom
Conversation
Paths that are temporarily unavailable (e.g. external drives, network mounts) were being deleted from recent and session workspaces immediately. Recent workspaces now get a grace period based on their last-used timestamp.
| if has_wsl_path || Utc::now() - timestamp >= chrono::Duration::days(7) { | ||
| delete_tasks.push(self.delete_workspace_by_id(id)); | ||
| } else if Self::all_paths_exist_with_a_directory(paths.paths(), fs, None).await { | ||
| result.push((id, SerializedWorkspaceLocation::Local, paths, timestamp)); |
There was a problem hiding this comment.
I would think we'd want to check if the paths exists first, before possibly deleting them. This seems like it will delete things even if they exist.
There was a problem hiding this comment.
Yes, I forgot to take that into consideration in this condition.
I will fix it soon.
|
Note that recent projects appear on the "Welcome back to Zed" screen, not just in the project picker. Currently, projects that were deleted on disk still appear in both places. |
- from recent projects picker - from welcome screen - delete after 7 days from the last access
|
Hey @maxbrunsfeld, @injust I have fixed the logic to only show projects on the picker/welcome if still exist, and only delete after 7 days from last access |
@injust for the welcome screen, I tested, and it only updates after re-open (I think) |
|
I pushed an additional commit to this branch and opened another PR #53662 |
…ng them for a one week grace period (#53662) Fixes a regression introduced in #49603 Supersedes #52638 We want to leave these non-existent workspaces in the database for up to 7 days, in case they are on external drives that are restored later, but we do *not* want to show them in the UI if they don't exist. Release Notes: - Fixed an issue where deleted folders appeared in the recent project picker --------- Co-authored-by: ojpro <contact@ojpro.me>
…ng them for a one week grace period (#53662) Fixes a regression introduced in #49603 Supersedes #52638 We want to leave these non-existent workspaces in the database for up to 7 days, in case they are on external drives that are restored later, but we do *not* want to show them in the UI if they don't exist. Release Notes: - Fixed an issue where deleted folders appeared in the recent project picker --------- Co-authored-by: ojpro <contact@ojpro.me>
Self-Review Checklist:
Closes #49603
Release Notes: