Rename delete worktree copy to workspace

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
brennanb2025
2026-05-19 10:41:13 -07:00
co-authored by Orca
parent 062725da76
commit 57cc40cfbe
8 changed files with 20 additions and 20 deletions
@@ -1009,7 +1009,7 @@ export default function ChecksPanel(): React.JSX.Element {
</div>
)}
{/* Merge / Delete Worktree actions */}
{/* Merge / Delete Workspace actions */}
{activeWorktree && repo && (
<PRActions pr={pr} repo={repo} worktree={activeWorktree} onRefreshPR={handleRefreshPR} />
)}
@@ -187,7 +187,7 @@ export default function PRActions({
) : (
<Trash2 className="size-3.5" />
)}
{isDeletingWorktree ? 'Deleting…' : 'Delete Worktree'}
{isDeletingWorktree ? 'Deleting…' : 'Delete Workspace'}
</Button>
)
}
@@ -278,16 +278,16 @@ export function GeneralPane({ settings, updateSettings }: GeneralPaneProps): Rea
breaks that toast action even though this pane still renders fine. */}
<div id="general-skip-delete-worktree-confirm" className="scroll-mt-6">
<SearchableSetting
title="Ask Before Deleting Worktrees"
description="Show a confirmation dialog before deleting a worktree."
title="Ask Before Deleting Workspaces"
description="Show a confirmation dialog before deleting a workspace."
keywords={['delete', 'worktree', 'confirm', 'dialog', 'skip', 'prompt']}
className="flex items-center justify-between gap-4 px-1 py-2"
>
<div className="space-y-0.5">
<Label>Ask Before Deleting Worktrees</Label>
<Label>Ask Before Deleting Workspaces</Label>
<p className="text-xs text-muted-foreground">
Show a confirmation before deleting a worktree from the context menu. Failed deletes
still surface a Force Delete fallback.
Show a confirmation before deleting a workspace from the context menu. Failed
deletes still surface a Force Delete fallback.
</p>
</div>
<button
@@ -12,8 +12,8 @@ export const GENERAL_WORKSPACE_SEARCH_ENTRIES: SettingsSearchEntry[] = [
keywords: ['nested', 'subfolder', 'directory']
},
{
title: 'Ask Before Deleting Worktrees',
description: 'Show a confirmation dialog before deleting a worktree.',
title: 'Ask Before Deleting Workspaces',
description: 'Show a confirmation dialog before deleting a workspace.',
keywords: ['delete', 'worktree', 'confirm', 'dialog', 'skip', 'prompt']
},
{
@@ -174,7 +174,7 @@ const DeleteWorktreeDialog = React.memo(function DeleteWorktreeDialog() {
onDeleted?.([worktreeId])
})
.catch((err: unknown) => {
toast.error('Failed to delete worktree', {
toast.error('Failed to delete workspace', {
description: err instanceof Error ? err.message : String(err)
})
})
@@ -222,14 +222,14 @@ const DeleteWorktreeDialog = React.memo(function DeleteWorktreeDialog() {
>
<DialogHeader>
<DialogTitle className="text-sm">
{isBatchDelete ? 'Delete Worktrees' : 'Delete Worktree'}
{isBatchDelete ? 'Delete Workspaces' : 'Delete Workspace'}
</DialogTitle>
<DialogDescription className="text-xs">
{isBatchDelete ? (
<>
Remove{' '}
<span className="font-medium text-foreground">{worktrees.length} worktrees</span>{' '}
from git and delete their working tree folders.
<span className="font-medium text-foreground">{worktrees.length} workspaces</span>{' '}
from git and delete their workspace folders.
</>
) : (
<>
@@ -237,7 +237,7 @@ const DeleteWorktreeDialog = React.memo(function DeleteWorktreeDialog() {
<span className="break-all font-medium text-foreground">
{worktree?.displayName}
</span>{' '}
from git and delete its working tree folder.
from git and delete its workspace folder.
</>
)}
</DialogDescription>
@@ -109,7 +109,7 @@ export function runWorktreeDeleteWithToast(
}
})
.catch((err: unknown) => {
toast.error('Failed to delete worktree', {
toast.error('Failed to delete workspace', {
description: err instanceof Error ? err.message : String(err),
action: {
label: 'View',
@@ -124,7 +124,7 @@ export function runWorktreeDeleteWithToast(
return false
})
.catch((err: unknown) => {
toast.error('Failed to delete worktree', {
toast.error('Failed to delete workspace', {
description: err instanceof Error ? err.message : String(err)
})
return false
@@ -4,7 +4,7 @@ import { getDeleteWorktreeToastCopy } from './delete-worktree-toast'
describe('getDeleteWorktreeToastCopy', () => {
it('uses direct guidance when force delete is available', () => {
expect(getDeleteWorktreeToastCopy('feature/foo', true, 'branch has changes')).toEqual({
title: 'Failed to delete worktree feature/foo',
title: 'Failed to delete workspace feature/foo',
description: 'It has changed files. Use Force Delete to delete it anyway.',
isDestructive: false
})
@@ -12,7 +12,7 @@ describe('getDeleteWorktreeToastCopy', () => {
it('preserves the raw error when force delete is unavailable', () => {
expect(getDeleteWorktreeToastCopy('feature/foo', false, 'permission denied')).toEqual({
title: 'Failed to delete worktree feature/foo',
title: 'Failed to delete workspace feature/foo',
description: 'permission denied',
isDestructive: true
})
@@ -11,7 +11,7 @@ export function getDeleteWorktreeToastCopy(
): DeleteWorktreeToastCopy {
if (canForceDelete) {
return {
title: `Failed to delete worktree ${worktreeName}`,
title: `Failed to delete workspace ${worktreeName}`,
description: 'It has changed files. Use Force Delete to delete it anyway.',
// Why: git commonly refuses the first delete when the worktree still has
// modified or untracked files. Showing raw stderr in a destructive toast
@@ -22,7 +22,7 @@ export function getDeleteWorktreeToastCopy(
}
return {
title: `Failed to delete worktree ${worktreeName}`,
title: `Failed to delete workspace ${worktreeName}`,
description: error,
isDestructive: true
}