From 36bcc71f3dc6b2f831574f608348c79c17d3f1bf Mon Sep 17 00:00:00 2001 From: nitin <142569587+ehconitin@users.noreply.github.com> Date: Mon, 9 Mar 2026 19:33:12 +0530 Subject: [PATCH] refactor(command-menu-item): rename Actions to CommandMenuItem (#18489) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit actions are being renamed to command menu item, they will be migrated to server and will be served as headless front components --------- Co-authored-by: Raphaƫl Bosi <71827178+bosiraphael@users.noreply.github.com> --- .../action-menu/actions/components/Action.tsx | 32 - .../actions/components/ActionLink.tsx | 21 - .../display/components/ActionButton.tsx | 68 -- .../display/components/ActionComponent.tsx | 10 - .../HeadlessFrontComponentAction.tsx | 42 - .../__stories__/ActionButton.stories.tsx | 65 -- .../__stories__/ActionComponent.stories.tsx | 67 -- .../constants/DashboardActionsConfig.tsx | 203 ----- .../constants/DefaultRecordActionsConfig.tsx | 843 ------------------ .../constants/WorkflowActionsConfig.tsx | 387 -------- .../constants/WorkflowRunsActionsConfig.tsx | 164 ---- .../WorkflowVersionsActionsConfig.tsx | 200 ----- .../WorkspaceMembersActionsConfig.tsx | 123 --- .../NoSelectionWorkflowRecordActionKeys.ts | 3 - .../inheritActionsFromDefaultConfig.test.tsx | 324 ------- .../utils/inheritActionsFromDefaultConfig.ts | 31 - .../constants/RecordAgnosticActionsConfig.tsx | 114 --- .../hooks/useRecordAgnosticActions.ts | 33 - .../types/DefaultRecordActionConfigKeys.ts | 8 - .../actions/utils/getActionConfig.ts | 44 - .../CommandMenuActionMenuDropdown.tsx | 39 - .../ActionMenuConfirmationModalManager.tsx | 67 -- .../ActionMenuConfirmationModalId.ts | 2 - ...ConfirmationModalResultBrowserEventName.ts | 2 - .../hooks/useActionMenuConfirmationModal.ts | 48 - ...nfirmationModalResultBrowserEventDetail.ts | 6 - .../ActionMenuDropdownClickOutsideId.ts | 1 - .../contexts/ActionConfigContext.tsx | 4 - .../action-menu/contexts/ActionMenuContext.ts | 21 - .../ActionMenuContextProviderDefault.tsx | 76 -- .../action-menu/hooks/useCloseActionMenu.ts | 60 -- .../action-menu/hooks/useRegisteredActions.ts | 90 -- .../mock/action-menu-actions.mock.tsx | 104 --- ...ctionMenuDropdownPositionComponentState.ts | 13 - ...tionMenuDropdownIdFromActionMenuId.test.ts | 9 - .../getActionMenuIdFromRecordIndexId.test.ts | 9 - ...tionMenuDropdownIdFromActionMenuId.test.ts | 9 - ...getActionMenuDropdownIdFromActionMenuId.ts | 5 - .../utils/getActionMenuIdFromRecordIndexId.ts | 3 - ...nelActionMenuDropdownIdFromActionMenuId.ts | 5 - .../app/components/AppRouterProviders.tsx | 4 +- .../PageHeaderCommandMenuButtons.tsx} | 14 +- .../components/RecordIndexCommandMenu.tsx} | 24 +- .../RecordIndexCommandMenuDropdown.tsx} | 44 +- .../RecordPageSidePanelCommandMenu.tsx} | 14 +- ...RecordPageSidePanelCommandMenuDropdown.tsx | 39 + .../components/RecordShowCommandMenu.tsx} | 14 +- .../RecordShowSidePanelOpenRecordButton.tsx | 12 +- ...ecordIndexCommandMenuDropdown.stories.tsx} | 42 +- ...wSidePanelCommandMenuDropdown.stories.tsx} | 36 +- .../CommandMenuConfirmationModalManager.tsx | 69 ++ .../CommandMenuItemConfirmationModalId.ts | 2 + ...ConfirmationModalResultBrowserEventName.ts | 2 + .../hooks/useCommandMenuConfirmationModal.ts | 48 + .../commandMenuItemConfirmationModalState.ts} | 8 +- ...nfirmationModalResultBrowserEventDetail.ts | 6 + .../CommandMenuDropdownClickOutsideId.ts | 1 + .../contexts/CommandConfigContext.tsx | 6 + .../contexts/CommandMenuContext.ts | 17 + .../contexts/CommandMenuContextProvider.tsx} | 24 +- .../CommandMenuContextProviderDefault.tsx | 78 ++ ...andMenuContextProviderWorkflowObjects.tsx} | 96 +- .../display/components/Command.tsx | 32 + .../components/CommandDropdownItem.tsx} | 10 +- .../display/components/CommandLink.tsx | 21 + .../display/components/CommandListItem.tsx} | 12 +- .../components/CommandMenuItemButton.tsx | 14 + .../components/CommandMenuItemComponent.tsx | 14 + .../components/CommandMenuItemDisplay.tsx} | 24 +- .../CommandMenuItemOpenSidePanelPage.tsx} | 10 +- .../display/components/CommandModal.tsx} | 40 +- .../HeadlessFrontComponentCommandMenuItem.tsx | 42 + .../CommandMenuItemButton.stories.tsx | 67 ++ .../CommandMenuItemComponent.stories.tsx | 69 ++ .../CommandMenuItemDisplay.stories.tsx} | 66 +- .../CommandMenuItemDropdownItem.stories.tsx} | 36 +- .../CommandMenuItemListItem.stories.tsx} | 36 +- .../hooks/useCloseCommandMenu.ts | 60 ++ .../hooks/useCommandMenuContextApi.ts | 4 +- ...seCommandMenuItemFrontComponentActions.tsx | 44 +- .../hooks/useRegisteredCommandMenuItems.ts | 96 ++ ...houldCommandMenuItemBeRegisteredParams.ts} | 12 +- .../mock/command-menu-items.mock.tsx | 104 +++ .../RecordAgnosticCommandMenuItemsConfig.tsx | 117 +++ .../useRelatedRecordCommands.test.tsx} | 16 +- .../hooks/useRecordAgnosticCommands.ts | 37 + .../hooks/useRelatedRecordCommands.ts} | 40 +- .../types/RecordAgnosticCommandKeys.ts} | 2 +- .../useRunWorkflowRecordAgnosticCommands.tsx} | 24 +- .../DashboardCommandMenuItemsConfig.tsx | 204 +++++ .../DefaultRecordCommandMenuItemsConfig.tsx | 843 ++++++++++++++++++ .../WorkflowCommandMenuItemsConfig.tsx | 390 ++++++++ .../WorkflowRunsCommandMenuItemsConfig.tsx | 165 ++++ ...WorkflowVersionsCommandMenuItemsConfig.tsx | 199 +++++ ...WorkspaceMembersCommandMenuItemsConfig.tsx | 126 +++ .../DeleteMultipleRecordsCommand.tsx} | 24 +- .../DestroyMultipleRecordsCommand.tsx} | 24 +- .../ExportMultipleRecordsCommand.tsx} | 32 +- .../MergeMultipleRecordsCommand.tsx} | 8 +- .../RestoreMultipleRecordsCommand.tsx} | 6 +- .../UpdateMultipleRecordsCommand.tsx} | 6 +- .../types/MultipleRecordsCommandKeys.ts} | 2 +- ...ewIndexRecordNoSelectionRecordCommand.tsx} | 8 +- ...CreateNewViewNoSelectionRecordCommand.tsx} | 6 +- ...gationSidebarNoSelectionRecordCommand.tsx} | 8 +- ...eletedRecordsNoSelectionRecordCommand.tsx} | 6 +- ...ImportRecordsNoSelectionRecordCommand.tsx} | 6 +- ...eletedRecordsNoSelectionRecordCommand.tsx} | 6 +- .../types/NoSelectionRecordCommandKeys.ts} | 2 +- .../NoSelectionWorkflowRecordCommandKeys.ts | 3 + .../AddToFavoritesSingleRecordCommand.tsx} | 8 +- .../CreateRelatedRecordCommand.tsx} | 14 +- .../components/DeleteSingleRecordCommand.tsx} | 8 +- .../DestroySingleRecordCommand.tsx} | 10 +- .../ExportNoteSingleRecordCommand.tsx} | 12 +- .../components/ExportSingleRecordCommand.tsx} | 8 +- ...vigateToNextRecordSingleRecordCommand.tsx} | 8 +- ...teToPreviousRecordSingleRecordCommand.tsx} | 8 +- ...emoveFromFavoritesSingleRecordCommand.tsx} | 8 +- .../RestoreSingleRecordCommand.tsx} | 8 +- .../CancelDashboardSingleRecordCommand.tsx} | 8 +- ...DuplicateDashboardSingleRecordCommand.tsx} | 8 +- .../EditDashboardSingleRecordCommand.tsx} | 8 +- .../SaveDashboardSingleRecordCommand.tsx} | 8 +- .../DashboardSingleRecordCommandKeys.ts} | 2 +- .../hooks/useSelectedRecordIdOrThrow.tsx | 0 .../hooks/useSelectedRecordIds.tsx | 0 ...elRecordPageLayoutSingleRecordCommand.tsx} | 6 +- ...itRecordPageLayoutSingleRecordCommand.tsx} | 6 +- ...veRecordPageLayoutSingleRecordCommand.tsx} | 6 +- ...ecordPageLayoutSingleRecordCommandKeys.ts} | 2 +- .../types/SingleRecordCommandKeys.ts} | 2 +- .../utils/exportBlockNoteEditorToDocx.ts | 0 .../utils/exportBlockNoteEditorToPdf.ts | 0 ...VersionWorkflowRunSingleRecordCommand.tsx} | 8 +- ...orkflowWorkflowRunSingleRecordCommand.tsx} | 8 +- .../StopWorkflowRunSingleRecordCommand.tsx} | 6 +- .../WorkflowRunSingleRecordCommandKeys.ts} | 2 +- ...unsWorkflowVersionSingleRecordCommand.tsx} | 12 +- ...onsWorkflowVersionSingleRecordCommand.tsx} | 12 +- ...lowWorkflowVersionSingleRecordCommand.tsx} | 8 +- ...aftWorkflowVersionSingleRecordCommand.tsx} | 16 +- ...WorkflowVersionSingleRecordCommandKeys.ts} | 2 +- .../ActivateWorkflowSingleRecordCommand.tsx} | 8 +- .../AddNodeWorkflowSingleRecordCommand.tsx} | 8 +- ...DeactivateWorkflowSingleRecordCommand.tsx} | 8 +- ...scardDraftWorkflowSingleRecordCommand.tsx} | 8 +- .../DuplicateWorkflowSingleRecordCommand.tsx} | 8 +- ...iveVersionWorkflowSingleRecordCommand.tsx} | 12 +- .../SeeRunsWorkflowSingleRecordCommand.tsx} | 8 +- ...eeVersionsWorkflowSingleRecordCommand.tsx} | 8 +- .../TestWorkflowSingleRecordCommand.tsx} | 8 +- .../TidyUpWorkflowSingleRecordCommand.tsx} | 8 +- .../types/WorkflowSingleRecordCommandKeys.ts} | 2 +- .../record/types/DefaultRecordCommandKeys.ts | 8 + ...CommandMenuItemsFromDefaultConfig.test.tsx | 330 +++++++ ...nheritCommandMenuItemsFromDefaultConfig.ts | 31 + .../utils/isBulkRecordsManualTrigger.ts | 0 .../record}/utils/isGlobalManualTrigger.ts | 0 .../hooks/useRunWorkflowRecordCommands.tsx} | 18 +- ...mmandMenuDropdownPositionComponentState.ts | 13 + .../types/CommandMenuItemConfig.ts} | 16 +- .../types/CommandMenuItemContainerType.ts | 6 + .../types/CommandMenuItemScope.ts} | 2 +- .../types/CommandMenuItemType.ts} | 2 +- .../types/PositionType.ts | 0 .../types/ShouldBeRegisteredFunctionParams.ts | 4 +- ...andMenuDropdownIdFromCommandMenuId.test.ts | 9 + .../getCommandMenuIdFromRecordIndexId.test.ts | 9 + ...andMenuDropdownIdFromCommandMenuId.test.ts | 9 + .../utils/computeProgressText.ts | 0 ...tCommandMenuDropdownIdFromCommandMenuId.ts | 5 + .../getCommandMenuIdFromRecordIndexId.ts | 3 + .../utils/getCommandMenuItemConfig.ts | 44 + .../utils/getCommandMenuItemLabel.ts} | 4 +- .../utils/getCommandMenuItemViewType.ts} | 12 +- ...lCommandMenuDropdownIdFromCommandMenuId.ts | 5 + .../components/CommandMenuButton.tsx | 88 ++ .../__stories__/CommandMenu.stories.tsx | 6 +- .../useSetGlobalCommandMenuContext.test.tsx | 4 +- .../__tests__/useWorkflowCommandMenu.test.tsx | 4 +- ...seCopyContextStoreAndCommandMenuStates.ts} | 0 .../CommandMenuComponentInstanceContext.ts} | 2 +- .../useFrontComponentExecutionContext.ts | 8 +- ...olumnDefinitionsFromObjectMetadata.test.ts | 4 +- .../AdvancedFilterAddFilterRuleSelect.tsx | 10 +- .../__tests__/useLazyFetchAllRecords.test.tsx | 4 +- .../RecordBoardClickOutsideEffect.tsx | 4 +- .../hooks/useRecordBoardSelection.ts | 8 +- .../hooks/useResetRecordBoardSelection.ts | 8 +- .../components/RecordBoardCard.tsx | 22 +- .../components/RecordCalendar.tsx | 4 +- .../components/RecordCalendarCard.tsx | 22 +- .../selectors/useRecordCalendarSelection.ts | 8 +- .../components/RecordIndexContainerGater.tsx | 10 +- .../components/RecordIndexPageHeader.tsx | 4 +- .../useRecordIndexLazyFetchRecords.test.ts | 4 +- ...ordIndexIdFromCurrentContextStore.test.tsx | 4 +- .../PageLayoutRecordPageRenderer.tsx | 6 +- ...dTableNoRecordGroupBodyContextProvider.tsx | 10 +- ...ordTableRecordGroupBodyContextProvider.tsx | 10 +- .../perf/RecordTableCell.perf.stories.tsx | 2 +- .../contexts/RecordTableBodyContext.ts | 2 +- .../internal/useResetTableRowSelection.ts | 8 +- ...RecordTableBodyFocusClickOutsideEffect.tsx | 4 +- .../components/RecordTableCellDisplayMode.tsx | 8 +- ...wn.ts => useTriggerCommandMenuDropdown.ts} | 35 +- .../UpdateMultipleRecordsFooter.tsx | 2 +- ...UpdateMultipleRecordsContainer.stories.tsx | 10 +- ...ordLevelPermissionFilterBuilderContent.tsx | 6 +- .../components/SidePanelContainer.tsx | 6 +- .../side-panel/components/SidePanelList.tsx | 8 +- .../SidePanelMultipleRecordsInfo.tsx | 10 +- .../side-panel/components/SidePanelRouter.tsx | 8 +- .../SidePanelContextRecordChip.stories.tsx | 4 +- .../__tests__/useNavigateSidePanel.test.tsx | 4 +- .../useOpenCalendarEventInSidePanel.test.tsx | 4 +- .../useOpenEmailThreadInSidePanel.test.tsx | 4 +- .../useOpenRecordInSidePanel.test.tsx | 4 +- .../side-panel/hooks/useNavigateSidePanel.ts | 2 +- .../components/SidePanelMergeRecordPage.tsx | 6 +- .../components/SidePanelRecordPage.tsx | 6 +- .../root/components/SidePanelRootPage.tsx | 4 +- ...eFilterActionsWithSidePanelSearch.test.tsx | 20 +- .../useFilterActionsWithSidePanelSearch.ts | 12 +- .../hooks/useResetPreviousSidePanelContext.ts | 2 +- .../pages/root/hooks/useSidePanelActions.tsx | 106 +-- .../hooks/useSidePanelSearchRecords.tsx | 18 +- .../types/SidePanelActionGroupConfig.ts | 6 - .../SidePanelCommandMenuItemGroupConfig.ts | 6 + .../SignInBackgroundMockContainer.tsx | 6 +- .../__tests__/isNonTextWritingKey.test.ts | 1 + .../hotkey/utils/isNonTextWritingKey.ts | 2 +- ...GroupsToCurrentRecordFilterGroups.test.tsx | 8 +- ...ViewFiltersToCurrentRecordFilters.test.tsx | 8 +- ...rentViewSortsToCurrentRecordSorts.test.tsx | 8 +- ...pplyViewSortsToCurrentRecordSorts.test.tsx | 6 +- ...ActiveWorkflowVersionsWithManualTrigger.ts | 2 +- .../components/WorkflowDiagramCanvasBase.tsx | 4 +- .../WorkflowRunVisualizerEffect.tsx | 4 +- .../hooks/useStartNodeCreation.ts | 4 +- .../WorkflowDiagramEmptyTriggerEditable.tsx | 4 +- .../WorkflowDiagramEmptyTriggerReadonly.tsx | 4 +- .../WorkflowDiagramStepNodeEditable.tsx | 4 +- .../WorkflowDiagramStepNodeReadonly.tsx | 4 +- .../components/WorkflowRunDiagramStepNode.tsx | 4 +- .../WorkflowStepCmdEnterButton.tsx} | 2 +- .../WorkflowStepFilterAddFilterRuleSelect.tsx | 10 +- .../components/WorkflowEditActionAiAgent.tsx | 6 +- .../components/WorkflowEditActionCode.tsx | 4 +- .../WorkflowEditActionFormFiller.tsx | 4 +- .../WorkflowEditActionHttpRequest.tsx | 4 +- .../pages/object-record/RecordShowPage.tsx | 10 +- .../decorators/RecordTableDecorator.tsx | 12 +- ...taAndApolloMocksAndCommandMenuWrapper.tsx} | 12 +- .../components/FrontComponentWorkerEffect.tsx | 31 +- .../remote/worker/remote-worker.ts | 12 +- .../createActionConfirmationModalBridge.ts | 65 -- .../createCommandConfirmationModalBridge.ts | 67 ++ .../FrontComponentHostCommunicationApi.ts | 4 +- packages/twenty-sdk/src/sdk/action/index.ts | 8 - .../Action.tsx => command/Command.tsx} | 10 +- .../CommandLink.tsx} | 12 +- .../CommandModal.tsx} | 27 +- .../CommandOpenSidePanelPage.tsx} | 12 +- packages/twenty-sdk/src/sdk/command/index.ts | 8 + .../functions/openActionConfirmationModal.ts | 18 - .../functions/openCommandConfirmationModal.ts | 18 + .../frontComponentHostCommunicationApi.ts | 16 +- .../src/sdk/front-component-api/index.ts | 8 +- .../getFrontComponentActionErrorDedupeKey.ts | 3 - .../getFrontComponentCommandErrorDedupeKey.ts | 3 + packages/twenty-sdk/src/sdk/index.ts | 30 +- ...ViewType.ts => CommandMenuItemViewType.ts} | 2 +- packages/twenty-shared/src/types/index.ts | 2 +- 275 files changed, 4544 insertions(+), 4436 deletions(-) delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/components/Action.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/components/ActionLink.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/display/components/ActionButton.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/display/components/ActionComponent.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/display/components/HeadlessFrontComponentAction.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/display/components/__stories__/ActionButton.stories.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/display/components/__stories__/ActionComponent.stories.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DashboardActionsConfig.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DefaultRecordActionsConfig.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/WorkflowActionsConfig.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/WorkflowRunsActionsConfig.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/WorkflowVersionsActionsConfig.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/WorkspaceMembersActionsConfig.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/record-actions/no-selection/workflow-actions/types/NoSelectionWorkflowRecordActionKeys.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/record-actions/utils/__tests__/inheritActionsFromDefaultConfig.test.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/record-actions/utils/inheritActionsFromDefaultConfig.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/record-agnostic-actions/constants/RecordAgnosticActionsConfig.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/record-agnostic-actions/hooks/useRecordAgnosticActions.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/types/DefaultRecordActionConfigKeys.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/actions/utils/getActionConfig.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/components/CommandMenuActionMenuDropdown.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/confirmation-modal/components/ActionMenuConfirmationModalManager.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/confirmation-modal/constants/ActionMenuConfirmationModalId.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/confirmation-modal/constants/ActionMenuConfirmationModalResultBrowserEventName.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/confirmation-modal/hooks/useActionMenuConfirmationModal.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/confirmation-modal/types/ActionMenuConfirmationModalResultBrowserEventDetail.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/constants/ActionMenuDropdownClickOutsideId.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/contexts/ActionConfigContext.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/contexts/ActionMenuContext.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/contexts/ActionMenuContextProviderDefault.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/hooks/useCloseActionMenu.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/hooks/useRegisteredActions.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/mock/action-menu-actions.mock.tsx delete mode 100644 packages/twenty-front/src/modules/action-menu/states/recordIndexActionMenuDropdownPositionComponentState.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/utils/__tests__/getActionMenuDropdownIdFromActionMenuId.test.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/utils/__tests__/getActionMenuIdFromRecordIndexId.test.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/utils/__tests__/getSidePanelActionMenuDropdownIdFromActionMenuId.test.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/utils/getActionMenuDropdownIdFromActionMenuId.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/utils/getActionMenuIdFromRecordIndexId.ts delete mode 100644 packages/twenty-front/src/modules/action-menu/utils/getSidePanelActionMenuDropdownIdFromActionMenuId.ts rename packages/twenty-front/src/modules/{action-menu/components/PageHeaderActionMenuButtons.tsx => command-menu-item/components/PageHeaderCommandMenuButtons.tsx} (68%) rename packages/twenty-front/src/modules/{action-menu/components/RecordIndexActionMenu.tsx => command-menu-item/components/RecordIndexCommandMenu.tsx} (55%) rename packages/twenty-front/src/modules/{action-menu/components/RecordIndexActionMenuDropdown.tsx => command-menu-item/components/RecordIndexCommandMenuDropdown.tsx} (64%) rename packages/twenty-front/src/modules/{action-menu/components/RecordShowSidePanelActionMenu.tsx => command-menu-item/components/RecordPageSidePanelCommandMenu.tsx} (54%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/components/RecordPageSidePanelCommandMenuDropdown.tsx rename packages/twenty-front/src/modules/{action-menu/components/RecordShowActionMenu.tsx => command-menu-item/components/RecordShowCommandMenu.tsx} (74%) rename packages/twenty-front/src/modules/{action-menu => command-menu-item}/components/RecordShowSidePanelOpenRecordButton.tsx (91%) rename packages/twenty-front/src/modules/{action-menu/components/__stories__/RecordIndexActionMenuDropdown.stories.tsx => command-menu-item/components/__stories__/RecordIndexCommandMenuDropdown.stories.tsx} (60%) rename packages/twenty-front/src/modules/{action-menu/components/__stories__/CommandMenuActionMenuDropdown.stories.tsx => command-menu-item/components/__stories__/RecordShowSidePanelCommandMenuDropdown.stories.tsx} (71%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/confirmation-modal/components/CommandMenuConfirmationModalManager.tsx create mode 100644 packages/twenty-front/src/modules/command-menu-item/confirmation-modal/constants/CommandMenuItemConfirmationModalId.ts create mode 100644 packages/twenty-front/src/modules/command-menu-item/confirmation-modal/constants/CommandMenuItemConfirmationModalResultBrowserEventName.ts create mode 100644 packages/twenty-front/src/modules/command-menu-item/confirmation-modal/hooks/useCommandMenuConfirmationModal.ts rename packages/twenty-front/src/modules/{action-menu/confirmation-modal/states/actionMenuConfirmationModalState.ts => command-menu-item/confirmation-modal/states/commandMenuItemConfirmationModalState.ts} (59%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/confirmation-modal/types/CommandMenuConfirmationModalResultBrowserEventDetail.ts create mode 100644 packages/twenty-front/src/modules/command-menu-item/constants/CommandMenuDropdownClickOutsideId.ts create mode 100644 packages/twenty-front/src/modules/command-menu-item/contexts/CommandConfigContext.tsx create mode 100644 packages/twenty-front/src/modules/command-menu-item/contexts/CommandMenuContext.ts rename packages/twenty-front/src/modules/{action-menu/contexts/ActionMenuContextProvider.tsx => command-menu-item/contexts/CommandMenuContextProvider.tsx} (71%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/contexts/CommandMenuContextProviderDefault.tsx rename packages/twenty-front/src/modules/{action-menu/contexts/ActionMenuContextProviderWorkflowObjects.tsx => command-menu-item/contexts/CommandMenuContextProviderWorkflowObjects.tsx} (57%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/display/components/Command.tsx rename packages/twenty-front/src/modules/{action-menu/actions/display/components/ActionDropdownItem.tsx => command-menu-item/display/components/CommandDropdownItem.tsx} (81%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/display/components/CommandLink.tsx rename packages/twenty-front/src/modules/{action-menu/actions/display/components/ActionListItem.tsx => command-menu-item/display/components/CommandListItem.tsx} (71%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/display/components/CommandMenuItemButton.tsx create mode 100644 packages/twenty-front/src/modules/command-menu-item/display/components/CommandMenuItemComponent.tsx rename packages/twenty-front/src/modules/{action-menu/actions/display/components/ActionDisplay.tsx => command-menu-item/display/components/CommandMenuItemDisplay.tsx} (54%) rename packages/twenty-front/src/modules/{action-menu/actions/components/ActionOpenSidePanelPage.tsx => command-menu-item/display/components/CommandMenuItemOpenSidePanelPage.tsx} (75%) rename packages/twenty-front/src/modules/{action-menu/actions/components/ActionModal.tsx => command-menu-item/display/components/CommandModal.tsx} (56%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/display/components/HeadlessFrontComponentCommandMenuItem.tsx create mode 100644 packages/twenty-front/src/modules/command-menu-item/display/components/__stories__/CommandMenuItemButton.stories.tsx create mode 100644 packages/twenty-front/src/modules/command-menu-item/display/components/__stories__/CommandMenuItemComponent.stories.tsx rename packages/twenty-front/src/modules/{action-menu/actions/display/components/__stories__/ActionDisplay.stories.tsx => command-menu-item/display/components/__stories__/CommandMenuItemDisplay.stories.tsx} (55%) rename packages/twenty-front/src/modules/{action-menu/actions/display/components/__stories__/ActionDropdownItem.stories.tsx => command-menu-item/display/components/__stories__/CommandMenuItemDropdownItem.stories.tsx} (51%) rename packages/twenty-front/src/modules/{action-menu/actions/display/components/__stories__/ActionListItem.stories.tsx => command-menu-item/display/components/__stories__/CommandMenuItemListItem.stories.tsx} (51%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/hooks/useCloseCommandMenu.ts rename packages/twenty-front/src/modules/{action-menu => command-menu-item}/hooks/useCommandMenuContextApi.ts (97%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/hooks/useRegisteredCommandMenuItems.ts rename packages/twenty-front/src/modules/{action-menu/hooks/useShouldActionBeRegisteredParams.ts => command-menu-item/hooks/useShouldCommandMenuItemBeRegisteredParams.ts} (92%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/mock/command-menu-items.mock.tsx create mode 100644 packages/twenty-front/src/modules/command-menu-item/record-agnostic/constants/RecordAgnosticCommandMenuItemsConfig.tsx rename packages/twenty-front/src/modules/{action-menu/actions/record-agnostic-actions/hooks/__tests__/useRelatedRecordActions.test.tsx => command-menu-item/record-agnostic/hooks/__tests__/useRelatedRecordCommands.test.tsx} (94%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/record-agnostic/hooks/useRecordAgnosticCommands.ts rename packages/twenty-front/src/modules/{action-menu/actions/record-agnostic-actions/hooks/useRelatedRecordActions.ts => command-menu-item/record-agnostic/hooks/useRelatedRecordCommands.ts} (75%) rename packages/twenty-front/src/modules/{action-menu/actions/record-agnostic-actions/types/RecordAgnosticActionsKeys.ts => command-menu-item/record-agnostic/types/RecordAgnosticCommandKeys.ts} (84%) rename packages/twenty-front/src/modules/{action-menu/actions/record-agnostic-actions/run-workflow-actions/hooks/useRunWorkflowRecordAgnosticActions.tsx => command-menu-item/record-agnostic/workflow/hooks/useRunWorkflowRecordAgnosticCommands.tsx} (73%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/record/constants/DashboardCommandMenuItemsConfig.tsx create mode 100644 packages/twenty-front/src/modules/command-menu-item/record/constants/DefaultRecordCommandMenuItemsConfig.tsx create mode 100644 packages/twenty-front/src/modules/command-menu-item/record/constants/WorkflowCommandMenuItemsConfig.tsx create mode 100644 packages/twenty-front/src/modules/command-menu-item/record/constants/WorkflowRunsCommandMenuItemsConfig.tsx create mode 100644 packages/twenty-front/src/modules/command-menu-item/record/constants/WorkflowVersionsCommandMenuItemsConfig.tsx create mode 100644 packages/twenty-front/src/modules/command-menu-item/record/constants/WorkspaceMembersCommandMenuItemsConfig.tsx rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/multiple-records/components/DeleteMultipleRecordsAction.tsx => command-menu-item/record/multiple-records/components/DeleteMultipleRecordsCommand.tsx} (82%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/multiple-records/components/DestroyMultipleRecordsAction.tsx => command-menu-item/record/multiple-records/components/DestroyMultipleRecordsCommand.tsx} (84%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/multiple-records/components/ExportMultipleRecordsAction.tsx => command-menu-item/record/multiple-records/components/ExportMultipleRecordsCommand.tsx} (65%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/multiple-records/components/MergeMultipleRecordsAction.tsx => command-menu-item/record/multiple-records/components/MergeMultipleRecordsCommand.tsx} (76%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/multiple-records/components/RestoreMultipleRecordsAction.tsx => command-menu-item/record/multiple-records/components/RestoreMultipleRecordsCommand.tsx} (96%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/multiple-records/components/UpdateMultipleRecordsAction.tsx => command-menu-item/record/multiple-records/components/UpdateMultipleRecordsCommand.tsx} (77%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/multiple-records/types/MultipleRecordsActionKeys.ts => command-menu-item/record/multiple-records/types/MultipleRecordsCommandKeys.ts} (84%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/no-selection/components/CreateNewIndexRecordNoSelectionRecordAction.tsx => command-menu-item/record/no-selection/components/CreateNewIndexRecordNoSelectionRecordCommand.tsx} (69%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/no-selection/components/CreateNewViewNoSelectionRecord.tsx => command-menu-item/record/no-selection/components/CreateNewViewNoSelectionRecordCommand.tsx} (90%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/no-selection/components/EditNavigationSidebarNoSelectionRecordAction.tsx => command-menu-item/record/no-selection/components/EditNavigationSidebarNoSelectionRecordCommand.tsx} (65%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/no-selection/components/HideDeletedRecordsNoSelectionRecordAction.tsx => command-menu-item/record/no-selection/components/HideDeletedRecordsNoSelectionRecordCommand.tsx} (92%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/no-selection/components/ImportRecordsNoSelectionRecordAction.tsx => command-menu-item/record/no-selection/components/ImportRecordsNoSelectionRecordCommand.tsx} (70%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/no-selection/components/SeeDeletedRecordsNoSelectionRecordAction.tsx => command-menu-item/record/no-selection/components/SeeDeletedRecordsNoSelectionRecordCommand.tsx} (90%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/no-selection/types/NoSelectionRecordActionsKeys.ts => command-menu-item/record/no-selection/types/NoSelectionRecordCommandKeys.ts} (92%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/record/no-selection/workflow/types/NoSelectionWorkflowRecordCommandKeys.ts rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/components/AddToFavoritesSingleRecordAction.tsx => command-menu-item/record/single-record/components/AddToFavoritesSingleRecordCommand.tsx} (74%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/components/CreateRelatedRecordAction.tsx => command-menu-item/record/single-record/components/CreateRelatedRecordCommand.tsx} (89%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/components/DeleteSingleRecordAction.tsx => command-menu-item/record/single-record/components/DeleteSingleRecordCommand.tsx} (88%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/components/DestroySingleRecordAction.tsx => command-menu-item/record/single-record/components/DestroySingleRecordCommand.tsx} (83%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/components/ExportNoteActionSingleRecordAction.tsx => command-menu-item/record/single-record/components/ExportNoteSingleRecordCommand.tsx} (73%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/components/ExportSingleRecordAction.tsx => command-menu-item/record/single-record/components/ExportSingleRecordCommand.tsx} (77%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/components/NavigateToNextRecordSingleRecordAction.tsx => command-menu-item/record/single-record/components/NavigateToNextRecordSingleRecordCommand.tsx} (61%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/components/NavigateToPreviousRecordSingleRecordAction.tsx => command-menu-item/record/single-record/components/NavigateToPreviousRecordSingleRecordCommand.tsx} (60%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/components/RemoveFromFavoritesSingleRecordAction.tsx => command-menu-item/record/single-record/components/RemoveFromFavoritesSingleRecordCommand.tsx} (83%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/components/RestoreSingleRecordAction.tsx => command-menu-item/record/single-record/components/RestoreSingleRecordCommand.tsx} (83%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/dashboard-actions/components/CancelDashboardSingleRecordAction.tsx => command-menu-item/record/single-record/dashboard/components/CancelDashboardSingleRecordCommand.tsx} (78%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/dashboard-actions/components/DuplicateDashboardSingleRecordAction.tsx => command-menu-item/record/single-record/dashboard/components/DuplicateDashboardSingleRecordCommand.tsx} (80%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/dashboard-actions/components/EditDashboardSingleRecordAction.tsx => command-menu-item/record/single-record/dashboard/components/EditDashboardSingleRecordCommand.tsx} (72%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/dashboard-actions/components/SaveDashboardSingleRecordAction.tsx => command-menu-item/record/single-record/dashboard/components/SaveDashboardSingleRecordCommand.tsx} (77%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/dashboard-actions/types/DashboardSingleRecordActionKeys.ts => command-menu-item/record/single-record/dashboard/types/DashboardSingleRecordCommandKeys.ts} (57%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions => command-menu-item/record}/single-record/hooks/useSelectedRecordIdOrThrow.tsx (100%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions => command-menu-item/record}/single-record/hooks/useSelectedRecordIds.tsx (100%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/record-page-layout-actions/components/CancelRecordPageLayoutSingleRecordAction.tsx => command-menu-item/record/single-record/record-page-layout/components/CancelRecordPageLayoutSingleRecordCommand.tsx} (86%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/record-page-layout-actions/components/EditRecordPageLayoutSingleRecordAction.tsx => command-menu-item/record/single-record/record-page-layout/components/EditRecordPageLayoutSingleRecordCommand.tsx} (82%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/record-page-layout-actions/components/SaveRecordPageLayoutSingleRecordAction.tsx => command-menu-item/record/single-record/record-page-layout/components/SaveRecordPageLayoutSingleRecordCommand.tsx} (88%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/record-page-layout-actions/types/RecordPageLayoutSingleRecordActionKeys.ts => command-menu-item/record/single-record/record-page-layout/types/RecordPageLayoutSingleRecordCommandKeys.ts} (80%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/types/SingleRecordActionsKey.ts => command-menu-item/record/single-record/types/SingleRecordCommandKeys.ts} (93%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions => command-menu-item/record}/single-record/utils/exportBlockNoteEditorToDocx.ts (100%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions => command-menu-item/record}/single-record/utils/exportBlockNoteEditorToPdf.ts (100%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-run-actions/components/SeeVersionWorkflowRunSingleRecordAction.tsx => command-menu-item/record/single-record/workflow-runs/components/SeeVersionWorkflowRunSingleRecordCommand.tsx} (72%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-run-actions/components/SeeWorkflowWorkflowRunSingleRecordAction.tsx => command-menu-item/record/single-record/workflow-runs/components/SeeWorkflowWorkflowRunSingleRecordCommand.tsx} (72%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-run-actions/components/StopWorkflowRunSingleRecordAction.tsx => command-menu-item/record/single-record/workflow-runs/components/StopWorkflowRunSingleRecordCommand.tsx} (94%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-run-actions/types/WorkflowRunSingleRecordActionsKeys.ts => command-menu-item/record/single-record/workflow-runs/types/WorkflowRunSingleRecordCommandKeys.ts} (76%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-version-actions/components/SeeRunsWorkflowVersionSingleRecordAction.tsx => command-menu-item/record/single-record/workflow-versions/components/SeeRunsWorkflowVersionSingleRecordCommand.tsx} (78%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-version-actions/components/SeeVersionsWorkflowVersionSingleRecordAction.tsx => command-menu-item/record/single-record/workflow-versions/components/SeeVersionsWorkflowVersionSingleRecordCommand.tsx} (75%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-version-actions/components/SeeWorkflowWorkflowVersionSingleRecordAction.tsx => command-menu-item/record/single-record/workflow-versions/components/SeeWorkflowWorkflowVersionSingleRecordCommand.tsx} (67%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-version-actions/components/UseAsDraftWorkflowVersionSingleRecordAction.tsx => command-menu-item/record/single-record/workflow-versions/components/UseAsDraftWorkflowVersionSingleRecordCommand.tsx} (81%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-version-actions/types/WorkflowVersionSingleRecordActionsKeys.ts => command-menu-item/record/single-record/workflow-versions/types/WorkflowVersionSingleRecordCommandKeys.ts} (82%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-actions/components/ActivateWorkflowSingleRecordAction.tsx => command-menu-item/record/single-record/workflow/components/ActivateWorkflowSingleRecordCommand.tsx} (70%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-actions/components/AddNodeWorkflowSingleRecordAction.tsx => command-menu-item/record/single-record/workflow/components/AddNodeWorkflowSingleRecordCommand.tsx} (69%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-actions/components/DeactivateWorkflowSingleRecordAction.tsx => command-menu-item/record/single-record/workflow/components/DeactivateWorkflowSingleRecordCommand.tsx} (69%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-actions/components/DiscardDraftWorkflowSingleRecordAction.tsx => command-menu-item/record/single-record/workflow/components/DiscardDraftWorkflowSingleRecordCommand.tsx} (68%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-actions/components/DuplicateWorkflowSingleRecordAction.tsx => command-menu-item/record/single-record/workflow/components/DuplicateWorkflowSingleRecordCommand.tsx} (82%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-actions/components/SeeActiveVersionWorkflowSingleRecordAction.tsx => command-menu-item/record/single-record/workflow/components/SeeActiveVersionWorkflowSingleRecordCommand.tsx} (55%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-actions/components/SeeRunsWorkflowSingleRecordAction.tsx => command-menu-item/record/single-record/workflow/components/SeeRunsWorkflowSingleRecordCommand.tsx} (72%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-actions/components/SeeVersionsWorkflowSingleRecordAction.tsx => command-menu-item/record/single-record/workflow/components/SeeVersionsWorkflowSingleRecordCommand.tsx} (72%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-actions/components/TestWorkflowSingleRecordAction.tsx => command-menu-item/record/single-record/workflow/components/TestWorkflowSingleRecordCommand.tsx} (69%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-actions/components/TidyUpWorkflowSingleRecordAction.tsx => command-menu-item/record/single-record/workflow/components/TidyUpWorkflowSingleRecordCommand.tsx} (81%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/single-record/workflow-actions/types/WorkflowSingleRecordActionsKeys.ts => command-menu-item/record/single-record/workflow/types/WorkflowSingleRecordCommandKeys.ts} (91%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/record/types/DefaultRecordCommandKeys.ts create mode 100644 packages/twenty-front/src/modules/command-menu-item/record/utils/__tests__/inheritCommandMenuItemsFromDefaultConfig.test.tsx create mode 100644 packages/twenty-front/src/modules/command-menu-item/record/utils/inheritCommandMenuItemsFromDefaultConfig.ts rename packages/twenty-front/src/modules/{action-menu/actions/record-actions => command-menu-item/record}/utils/isBulkRecordsManualTrigger.ts (100%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions => command-menu-item/record}/utils/isGlobalManualTrigger.ts (100%) rename packages/twenty-front/src/modules/{action-menu/actions/record-actions/run-workflow-actions/hooks/useRunWorkflowRecordActions.tsx => command-menu-item/record/workflow/hooks/useRunWorkflowRecordCommands.tsx} (90%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/states/recordIndexCommandMenuDropdownPositionComponentState.ts rename packages/twenty-front/src/modules/{action-menu/actions/types/ActionConfig.ts => command-menu-item/types/CommandMenuItemConfig.ts} (57%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/types/CommandMenuItemContainerType.ts rename packages/twenty-front/src/modules/{action-menu/actions/types/ActionScope.ts => command-menu-item/types/CommandMenuItemScope.ts} (78%) rename packages/twenty-front/src/modules/{action-menu/actions/types/ActionType.ts => command-menu-item/types/CommandMenuItemType.ts} (81%) rename packages/twenty-front/src/modules/{action-menu => command-menu-item}/types/PositionType.ts (100%) rename packages/twenty-front/src/modules/{action-menu/actions => command-menu-item}/types/ShouldBeRegisteredFunctionParams.ts (94%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/utils/__tests__/getCommandMenuDropdownIdFromCommandMenuId.test.ts create mode 100644 packages/twenty-front/src/modules/command-menu-item/utils/__tests__/getCommandMenuIdFromRecordIndexId.test.ts create mode 100644 packages/twenty-front/src/modules/command-menu-item/utils/__tests__/getSidePanelCommandMenuDropdownIdFromCommandMenuId.test.ts rename packages/twenty-front/src/modules/{action-menu => command-menu-item}/utils/computeProgressText.ts (100%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/utils/getCommandMenuDropdownIdFromCommandMenuId.ts create mode 100644 packages/twenty-front/src/modules/command-menu-item/utils/getCommandMenuIdFromRecordIndexId.ts create mode 100644 packages/twenty-front/src/modules/command-menu-item/utils/getCommandMenuItemConfig.ts rename packages/twenty-front/src/modules/{action-menu/utils/getActionLabel.ts => command-menu-item/utils/getCommandMenuItemLabel.ts} (68%) rename packages/twenty-front/src/modules/{action-menu/actions/utils/getActionViewType.ts => command-menu-item/utils/getCommandMenuItemViewType.ts} (69%) create mode 100644 packages/twenty-front/src/modules/command-menu-item/utils/getSidePanelCommandMenuDropdownIdFromCommandMenuId.ts create mode 100644 packages/twenty-front/src/modules/command-menu/components/CommandMenuButton.tsx rename packages/twenty-front/src/modules/command-menu/hooks/{useCopyContextStoreAndActionMenuStates.ts => useCopyContextStoreAndCommandMenuStates.ts} (100%) rename packages/twenty-front/src/modules/{action-menu/states/contexts/ActionMenuComponentInstanceContext.ts => command-menu/states/contexts/CommandMenuComponentInstanceContext.ts} (75%) rename packages/twenty-front/src/modules/object-record/record-table/record-table-cell/hooks/{useTriggerActionMenuDropdown.ts => useTriggerCommandMenuDropdown.ts} (59%) delete mode 100644 packages/twenty-front/src/modules/side-panel/types/SidePanelActionGroupConfig.ts create mode 100644 packages/twenty-front/src/modules/side-panel/types/SidePanelCommandMenuItemGroupConfig.ts rename packages/twenty-front/src/modules/{action-menu/components/CmdEnterActionButton.tsx => workflow/workflow-steps/components/WorkflowStepCmdEnterButton.tsx} (95%) rename packages/twenty-front/src/testing/jest/{getJestMetadataAndApolloMocksAndActionMenuWrapper.tsx => getJestMetadataAndApolloMocksAndCommandMenuWrapper.tsx} (86%) delete mode 100644 packages/twenty-sdk/src/front-component-renderer/remote/worker/utils/createActionConfirmationModalBridge.ts create mode 100644 packages/twenty-sdk/src/front-component-renderer/remote/worker/utils/createCommandConfirmationModalBridge.ts delete mode 100644 packages/twenty-sdk/src/sdk/action/index.ts rename packages/twenty-sdk/src/sdk/{action/Action.tsx => command/Command.tsx} (76%) rename packages/twenty-sdk/src/sdk/{action/ActionLink.tsx => command/CommandLink.tsx} (80%) rename packages/twenty-sdk/src/sdk/{action/ActionModal.tsx => command/CommandModal.tsx} (68%) rename packages/twenty-sdk/src/sdk/{action/ActionOpenSidePanelPage.tsx => command/CommandOpenSidePanelPage.tsx} (81%) create mode 100644 packages/twenty-sdk/src/sdk/command/index.ts delete mode 100644 packages/twenty-sdk/src/sdk/front-component-api/functions/openActionConfirmationModal.ts create mode 100644 packages/twenty-sdk/src/sdk/front-component-api/functions/openCommandConfirmationModal.ts delete mode 100644 packages/twenty-sdk/src/sdk/front-component-api/utils/getFrontComponentActionErrorDedupeKey.ts create mode 100644 packages/twenty-sdk/src/sdk/front-component-api/utils/getFrontComponentCommandErrorDedupeKey.ts rename packages/twenty-shared/src/types/{ActionViewType.ts => CommandMenuItemViewType.ts} (87%) diff --git a/packages/twenty-front/src/modules/action-menu/actions/components/Action.tsx b/packages/twenty-front/src/modules/action-menu/actions/components/Action.tsx deleted file mode 100644 index 7be79eb22a..0000000000 --- a/packages/twenty-front/src/modules/action-menu/actions/components/Action.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { ActionDisplay } from '@/action-menu/actions/display/components/ActionDisplay'; -import { ActionConfigContext } from '@/action-menu/contexts/ActionConfigContext'; -import { useCloseActionMenu } from '@/action-menu/hooks/useCloseActionMenu'; -import { useContext } from 'react'; - -export const Action = ({ - onClick, - closeSidePanelOnShowPageOptionsActionExecution = false, - closeSidePanelOnCommandMenuListActionExecution = true, -}: { - onClick: () => void; - closeSidePanelOnShowPageOptionsActionExecution?: boolean; - closeSidePanelOnCommandMenuListActionExecution?: boolean; -}) => { - const actionConfig = useContext(ActionConfigContext); - - const { closeActionMenu } = useCloseActionMenu({ - closeSidePanelOnShowPageOptionsActionExecution, - closeSidePanelOnCommandMenuListActionExecution, - }); - - if (!actionConfig) { - return null; - } - - const handleClick = () => { - closeActionMenu(); - onClick(); - }; - - return ; -}; diff --git a/packages/twenty-front/src/modules/action-menu/actions/components/ActionLink.tsx b/packages/twenty-front/src/modules/action-menu/actions/components/ActionLink.tsx deleted file mode 100644 index a2c5c956c0..0000000000 --- a/packages/twenty-front/src/modules/action-menu/actions/components/ActionLink.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { ActionDisplay } from '@/action-menu/actions/display/components/ActionDisplay'; -import { useCloseActionMenu } from '@/action-menu/hooks/useCloseActionMenu'; -import { type PathParam } from 'react-router-dom'; -import { type AppPath } from 'twenty-shared/types'; -import { getAppPath } from 'twenty-shared/utils'; - -export const ActionLink = ({ - to, - params, - queryParams, -}: { - to: T; - params?: { [key in PathParam]: string | null }; - queryParams?: Record; -}) => { - const { closeActionMenu } = useCloseActionMenu(); - - const path = getAppPath(to, params, queryParams); - - return ; -}; diff --git a/packages/twenty-front/src/modules/action-menu/actions/display/components/ActionButton.tsx b/packages/twenty-front/src/modules/action-menu/actions/display/components/ActionButton.tsx deleted file mode 100644 index d862f50c96..0000000000 --- a/packages/twenty-front/src/modules/action-menu/actions/display/components/ActionButton.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import { type ActionDisplayProps } from '@/action-menu/actions/display/components/ActionDisplay'; -import { getActionLabel } from '@/action-menu/utils/getActionLabel'; -import { styled } from '@linaria/react'; -import { isDefined } from 'twenty-shared/utils'; -import { AppTooltip, TooltipDelay, TooltipPosition } from 'twenty-ui/display'; -import { Button, IconButton } from 'twenty-ui/input'; -import { themeCssVariables } from 'twenty-ui/theme-constants'; - -const StyledWrapper = styled.div` - font-size: ${themeCssVariables.font.size.md}; -`; - -export const ActionButton = ({ - action, - onClick, - to, -}: { - action: ActionDisplayProps; - onClick?: (event?: React.MouseEvent) => void; - to?: string; -}) => { - const label = getActionLabel(action.label); - - const shortLabel = isDefined(action.shortLabel) - ? getActionLabel(action.shortLabel) - : undefined; - - const buttonAccent = action.isPrimaryCTA ? 'blue' : 'default'; - - return ( - <> - {isDefined(action.shortLabel) ? ( -