mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-23 09:01:16 +01:00
4f87822133
Closes #41246 #45092 Release Notes: - N/A **Root Cause**: Empty local workspaces returned `DetachFromSession` from `serialize_workspace_location()`, and the `DetachFromSession` handler only cleared the session_id **without saving window bounds**. **Fix Applied**: Modified the `DetachFromSession` handler to save window bounds via `set_window_open_status()`: ```rust WorkspaceLocation::DetachFromSession => { let window_bounds = SerializedWindowBounds(window.window_bounds()); let display = window.display(cx).and_then(|d| d.uuid().ok()); window.spawn(cx, async move |_| { persistence::DB .set_window_open_status(database_id, window_bounds, display.unwrap_or_default()) .await.log_err(); persistence::DB.set_session_id(database_id, None).await.log_err(); }) } ``` **Recording**: https://github.com/user-attachments/assets/2b6564d4-4e1b-40fe-943b-147296340aa7