From 691c86a4a72f8212c488388abc3c9da4539c642d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bosi?= <71827178+bosiraphael@users.noreply.github.com> Date: Thu, 2 Apr 2026 10:33:58 +0200 Subject: [PATCH] Fix front component not opening in side panel (#19238) # PR Description Fix branching priority in `useCommandMenuItemsFromBackend` so non-headless front components are routed through `FrontComponentCommandMenuItem` (which opens the side panel) instead of always going through the `HeadlessCommandMenuItem` path. # Video QA ## Before https://github.com/user-attachments/assets/4449b849-ae71-4ca2-b22e-0efd62ad1b1b ## After https://github.com/user-attachments/assets/d361d1d1-83fb-4588-a5da-d1bae8747954 --- .../common/hooks/useCommandMenuItemsFromBackend.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/twenty-front/src/modules/command-menu-item/server-items/common/hooks/useCommandMenuItemsFromBackend.tsx b/packages/twenty-front/src/modules/command-menu-item/server-items/common/hooks/useCommandMenuItemsFromBackend.tsx index 0ac84cb2ac..34e3e28311 100644 --- a/packages/twenty-front/src/modules/command-menu-item/server-items/common/hooks/useCommandMenuItemsFromBackend.tsx +++ b/packages/twenty-front/src/modules/command-menu-item/server-items/common/hooks/useCommandMenuItemsFromBackend.tsx @@ -152,9 +152,9 @@ export const useCommandMenuItemsFromBackend = ( isPinned: boolean; typeOverride?: CommandMenuItemType; }): CommandMenuItemConfig | null => { - if (isDefined(item.engineComponentKey)) { - return buildCommandItemFromEngineKey({ - item, + if (isDefined(item.frontComponentId)) { + return buildCommandMenuItemFromFrontComponent({ + item: item as CommandMenuItemWithFrontComponent, type: typeOverride, scope, isPinned, @@ -163,9 +163,9 @@ export const useCommandMenuItemsFromBackend = ( }); } - if (isDefined(item.frontComponentId)) { - return buildCommandMenuItemFromFrontComponent({ - item: item as CommandMenuItemWithFrontComponent, + if (isDefined(item.engineComponentKey)) { + return buildCommandItemFromEngineKey({ + item, type: typeOverride, scope, isPinned,