From 2a9655465c54eafbd76839f96efa89e2396572d0 Mon Sep 17 00:00:00 2001 From: Louis Knight-Webb Date: Mon, 1 Dec 2025 14:53:05 -0500 Subject: [PATCH] All checks pass. The implementation is complete. (#1403) **Summary:** Added CMD+Enter keyboard shortcut to the CreateAttemptDialog by: 1. Importing `useKeySubmitTask` and `Scope` from `@/keyboard` 2. Adding the `useKeySubmitTask` hook that calls `handleCreate` when: - The dialog is visible (`modal.visible`) - Creation is allowed (`canCreate` - profile and branch selected, not loading, not already creating) This follows the same pattern used in other dialogs like `RestoreLogsDialog.tsx`. --- .../src/components/dialogs/tasks/CreateAttemptDialog.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/components/dialogs/tasks/CreateAttemptDialog.tsx b/frontend/src/components/dialogs/tasks/CreateAttemptDialog.tsx index a2ddbcc1..6e5f1698 100644 --- a/frontend/src/components/dialogs/tasks/CreateAttemptDialog.tsx +++ b/frontend/src/components/dialogs/tasks/CreateAttemptDialog.tsx @@ -26,6 +26,7 @@ import { paths } from '@/lib/paths'; import NiceModal, { useModal } from '@ebay/nice-modal-react'; import { defineModal } from '@/lib/modals'; import type { ExecutorProfileId, BaseCodingAgent } from 'shared/types'; +import { useKeySubmitTask, Scope } from '@/keyboard'; export interface CreateAttemptDialogProps { taskId: string; @@ -157,6 +158,12 @@ const CreateAttemptDialogImpl = NiceModal.create( if (!open) modal.hide(); }; + useKeySubmitTask(handleCreate, { + enabled: modal.visible && canCreate, + scope: Scope.DIALOG, + preventDefault: true, + }); + return (