Skip to content

Commit cf865dd

Browse files
authored
🤖 fix: remove escape-to-cancel on new workspace page (#955)
The new workspace / new chat screen is not a modal - it's the default view when no workspace is selected. Having Escape dismiss it was confusing, especially when using vim mode where Escape is needed for mode transitions. ## Changes - Removed `onCancel` prop from `ChatInputCreationVariant` - Removed Escape key handler for creation variant cancel - Removed `onCancel` prop passed from App.tsx _Generated with `mux`_
1 parent aed0c79 commit cf865dd

File tree

3 files changed

+0
-16
lines changed

3 files changed

+0
-16
lines changed

src/browser/App.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -648,14 +648,6 @@ function AppInner() {
648648
// Clear pending state
649649
clearPendingWorkspaceCreation();
650650
}}
651-
onCancel={
652-
pendingNewWorkspaceProject
653-
? () => {
654-
// User cancelled workspace creation - clear pending state
655-
clearPendingWorkspaceCreation();
656-
}
657-
: undefined
658-
}
659651
/>
660652
</ThinkingProvider>
661653
</ProviderOptionsProvider>

src/browser/components/ChatInput/index.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,13 +1065,6 @@ export const ChatInput: React.FC<ChatInputProps> = (props) => {
10651065
};
10661066

10671067
const handleKeyDown = (e: React.KeyboardEvent) => {
1068-
// Handle cancel for creation variant
1069-
if (variant === "creation" && matchesKeybind(e, KEYBINDS.CANCEL) && props.onCancel) {
1070-
e.preventDefault();
1071-
props.onCancel();
1072-
return;
1073-
}
1074-
10751068
// Handle voice input toggle (Ctrl+D / Cmd+D)
10761069
if (matchesKeybind(e, KEYBINDS.TOGGLE_VOICE_INPUT) && voiceInput.shouldShowUI) {
10771070
e.preventDefault();

src/browser/components/ChatInput/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export interface ChatInputCreationVariant {
3939
onWorkspaceCreated: (metadata: FrontendWorkspaceMetadata) => void;
4040
onProviderConfig?: (provider: string, keyPath: string[], value: string) => Promise<void>;
4141
onModelChange?: (model: string) => void;
42-
onCancel?: () => void;
4342
disabled?: boolean;
4443
onReady?: (api: ChatInputAPI) => void;
4544
}

0 commit comments

Comments
 (0)