Skip to content

Commit aed0c79

Browse files
authored
🤖 fix: improve workspace rename UI interactions (#954)
Hides the X button during workspace rename to avoid confusion with delete. Previously the X button would still show "Remove workspace" tooltip during rename mode, leading to accidental workspace deletion when users intended to cancel rename. **Fix:** Hide the X button entirely while the rename input is active. Users can press Escape to cancel rename instead (the natural behavior). Also prevents Escape key from propagating to global stream interrupt handler. _Generated with `mux`_
1 parent b1351e0 commit aed0c79

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/browser/components/WorkspaceListItem.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ const WorkspaceListItemInner: React.FC<WorkspaceListItemProps> = ({
9191
e.preventDefault();
9292
void handleConfirmRename();
9393
} else if (e.key === "Escape") {
94+
// Stop propagation to prevent global Escape handler from interrupting stream
9495
e.preventDefault();
96+
e.stopPropagation();
9597
handleCancelRename();
9698
}
9799
};
@@ -188,7 +190,7 @@ const WorkspaceListItemInner: React.FC<WorkspaceListItemProps> = ({
188190
)}
189191

190192
<div className="flex items-center gap-1">
191-
{!isCreating && (
193+
{!isCreating && !isEditing && (
192194
<>
193195
<GitStatusIndicator
194196
gitStatus={gitStatus}

0 commit comments

Comments
 (0)