Skip to content

Implement deleteWorkspace functionality in WorkspaceProvider - #104

Merged
SWangHash merged 6 commits into
mainfrom
wc/delete_workspace
Jun 23, 2026
Merged

SWangHash merged 6 commits into
mainfrom
wc/delete_workspace

Conversation

@SWangHash

Copy link
Copy Markdown
Owner

Summary

Fixes #

Type and Areas

Type:

Areas:

Motivation / Impact

Verification

Reviewer Notes

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

- Add deleteWorkspace to WorkspaceProvider useState initializers (both
  success and fallback branches) so it matches WorkspaceContextValue.
- Add deleteWorkspace implementation in createGlobalStateAPI delegating
  to globalAPI.deleteWorkspace.
- Fix react-hooks/rules-of-hooks violation in ReadFileDisplay by moving
  useState before the conditional early return.
…dd zh-CN/zh-TW i18n

- delete_workspace Rust command now recursively deletes the workspace
  root_path for local workspaces; remote workspaces skip disk deletion.
- Add is_unsafe_workspace_deletion_path guard to refuse filesystem roots
  and relative paths.
- Close the confirm dialog after a successful deletion so the UI reflects
  the action immediately.
- Add missing zh-CN/zh-TW translations for deleteWorkspace,
  deleteWorkspaceFailed, workspaceDeleted, and deleteWorkspaceDialog, and
  update the dialog message across all locales to reflect the destructive
  behavior.
…lete dialog

Move the workspace rootPath into the message body as monospace text
instead of using the preview block, removing the 'Workspace Path' label,
background color, and border while keeping the path at a smaller font
size (font-size-xs) than the message body.
@SWangHash
SWangHash force-pushed the wc/delete_workspace branch from c219fac to 9773ee7 Compare June 22, 2026 09:06
…nt workspace

When the active workspace is an assistant workspace (auto-activated on
startup) or no workspace is open, default the New Project dialog parent
path to /storage/Users/currentUser/Documents instead of the assistant
workspace directory.
Wrap the workspace rootPath in a subtle bg-subtle block with padding
and rounded corners for better visual separation from the message text.
@SWangHash
SWangHash merged commit d59453e into main Jun 23, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant