@devries-cameron20 / t3code-1 / commits / 446be6933f
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): Cmd+Enter creates the new project while an option is highlighted (#18901)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Dara Adedeji committed Oct 13, 2026 at 13:37 UTC 446be6933f4ecc207eed94db361ff40a88c3964f
1 file changed +14 -7
apps/web/src/components/CommandPalette.tsx
+14 -7
@@ -3072,6 +3072,10 @@ function OpenCommandPaletteDialog(props: {
3072 ? "Create & Add"
3073 : "Add";
3074 const addShortcutLabel = hasHighlightedBrowseItem ? `${submitModifierLabel} Enter` : "Enter";
3075 + const hasHighlightedNewProjectItem = newProjectFlow !== null && highlightedItemValue !== null;
3076 + const createShortcutLabel = hasHighlightedNewProjectItem
3077 + ? `${submitModifierLabel} Enter`
3078 + : "Enter";
3079 const remoteProjectButtonLabel = addProjectCloneFlow
3080 ? addProjectCloneFlow.source === "url"
3081 ? "Continue"
@@ -3165,15 +3169,17 @@ function OpenCommandPaletteDialog(props: {
3169 }
3170
3171 // Enter creates the project unless an item below the name is
3168 - // highlighted, in which case it runs that item.
3172 + // highlighted, in which case it runs that item. Mod+Enter always creates.
3173 if (
3174 newProjectFlow !== null &&
3175 event.key === "Enter" &&
3172 - highlightedItemValue === null &&
3176 + (!hasHighlightedNewProjectItem || isPrimaryModifierPressed(event)) &&
3177 // Enter that confirms an IME composition is part of typing the name.
3178 !event.nativeEvent.isComposing &&
3179 event.keyCode !== 229
3180 ) {
3181 + // Base UI would otherwise also click the highlighted row.
3182 + (event as typeof event & { preventBaseUIHandler?: () => void }).preventBaseUIHandler?.();
3183 event.preventDefault();
3184 void submitNewProject();
3185 return;
@@ -3383,7 +3389,7 @@ function OpenCommandPaletteDialog(props: {
3389 size="xs"
3390 tabIndex={-1}
3391 className="absolute inset-e-2.5 top-1/2 -translate-y-1/2"
3386 - aria-label="Create (Enter)"
3392 + aria-label={`Create (${createShortcutLabel})`}
3393 disabled={!canSubmitNewProject}
3394 onMouseDown={(event) => {
3395 event.preventDefault();
@@ -3396,10 +3402,10 @@ function OpenCommandPaletteDialog(props: {
3402 >
3403 <span>{isCreatingNewProject ? "Creating" : "Create"}</span>
3404 <KbdGroup className="pointer-events-none -me-0.5">
3399 - <Kbd>Enter</Kbd>
3405 + <Kbd>{createShortcutLabel}</Kbd>
3406 </KbdGroup>
3407 </TooltipTrigger>
3402 - <TooltipPopup side="top">Create (Enter)</TooltipPopup>
3408 + <TooltipPopup side="top">{`Create (${createShortcutLabel})`}</TooltipPopup>
3409 </Tooltip>
3410 ) : addProjectCloneFlow?.step === "repository" ? (
3411 <Tooltip>
@@ -3512,8 +3518,9 @@ function OpenCommandPaletteDialog(props: {
3518 inputProps={{
3519 // The submit button is absolutely positioned over the field, so the
3520 // inner input must reserve enough room for the full action label.
3515 - className:
3516 - addProjectCloneFlow?.step === "repository" || newProjectFlow !== null
3521 + className: hasHighlightedNewProjectItem
3522 + ? "*:data-[slot=autocomplete-input]:pe-38!"
3523 + : addProjectCloneFlow?.step === "repository" || newProjectFlow !== null
3524 ? "*:data-[slot=autocomplete-input]:pe-32!"
3525 : isBrowsing
3526 ? browseInputEndPaddingClass({