specs/004-close-workspace-gui/spec.md
Close workspaces from the GUI
Branch: codex/close-workspace
Created: 2026-09-29
Status: Ready
User story
A user can close a workspace from its sidebar row, or close the active workspace from the main menu. A confirmation names the workspace and warns that its running terminals and agents will stop. Cancel leaves it intact; confirm removes it from the GUI after the server accepts the request.
Acceptance scenarios
- Given two workspaces, closing either from its row targets that row's id, even if another workspace is selected.
- Given an active workspace, the menu's Close Workspace action targets it.
- Cancel or Escape sends no
workspace.closerequest. - Confirm sends exactly one
workspace.closerequest. On success the sidebar and active content refresh; on failure the workspace stays visible and a toast reports the error. - Repeating a close action while its confirmation is open does not open a second confirmation.
Scope and assumptions
- Reuse the existing
workspace.closeIPC method and its process handling. - Closing a workspace does not delete its project directory.
- No new server method, persistence format, or model field is needed.