fix(review): show Remove Project label in PR panel for main worktree (#6605)

* fix(review): show Remove Project label in PR panel for main worktree

When a merged PR is linked to the main worktree (the project root /
default branch), the PR sidepanel delete button now reads "Remove
Project" instead of "Delete Workspace", matching the project-removal
dialog that runWorktreeDelete already opens for the main worktree.

Adds the b1a767b1ae i18n key (Remove Project) across en/ko/ja/zh.

* chore(i18n): apply AI code review suggestions

Rename the newly added HostedReviewActions key from the codemod-style
content hash b1a767b1ae to the intent-named id removeProject, per the
message ID policy in config/i18n-translation-source.md: new keys must
use intent-named IDs, and hash IDs minted after 2026-07-30 are not
grandfathered.

---------

Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
This commit is contained in:
Minsu Lee
2026-10-23 19:20:00 -07:00
committed by GitHub
co-authored by Neil
parent b0cb24d2d5
commit 6fd0682ac1
2 changed files with 7 additions and 4 deletions
@@ -325,6 +325,7 @@ export default function HostedReviewActions({
if (review.state === 'merged') {
return (
<MergedReviewActions
isMainWorktree={worktree.isMainWorktree}
isDeletingWorktree={isDeletingWorktree}
onDeleteWorktree={handleDeleteWorktree}
/>
@@ -156,12 +156,17 @@ export function ClosedReviewActions({
}
export function MergedReviewActions({
isMainWorktree,
isDeletingWorktree,
onDeleteWorktree
}: {
isMainWorktree: boolean
isDeletingWorktree: boolean
onDeleteWorktree: () => void
}): React.JSX.Element {
const deleteLabel = isMainWorktree
? translate('auto.components.sidebar.RemoveFolderDialog.b79b39d865', 'Remove Project')
: translate('auto.components.right.sidebar.HostedReviewActions.e4aca40024', 'Delete Workspace')
return (
<Button
type="button"
@@ -180,10 +185,7 @@ export function MergedReviewActions({
)}
{isDeletingWorktree
? translate('auto.components.right.sidebar.HostedReviewActions.eefd50457e', 'Deleting...')
: translate(
'auto.components.right.sidebar.HostedReviewActions.e4aca40024',
'Delete Workspace'
)}
: deleteLabel}
</Button>
)
}