[COMMAND MENU ITEMS] Remove standard front components (#18581)

All standard command menu items will link to an engine component instead
of standard front components.
This commit is contained in:
Raphaël Bosi
2026-03-12 15:18:00 +01:00
committed by GitHub
parent c1da7be6d7
commit c9deab4373
186 changed files with 477 additions and 8472 deletions
@@ -1,24 +1,53 @@
import { CommandLink } from '@/command-menu-item/display/components/CommandLink';
import { CommandMenuItemOpenSidePanelPage } from '@/command-menu-item/display/components/CommandMenuItemOpenSidePanelPage';
import { DeleteMultipleRecordsCommand } from '@/command-menu-item/record/multiple-records/components/DeleteMultipleRecordsCommand';
import { DestroyMultipleRecordsCommand } from '@/command-menu-item/record/multiple-records/components/DestroyMultipleRecordsCommand';
import { ExportMultipleRecordsCommand } from '@/command-menu-item/record/multiple-records/components/ExportMultipleRecordsCommand';
import { MergeMultipleRecordsCommand } from '@/command-menu-item/record/multiple-records/components/MergeMultipleRecordsCommand';
import { RestoreMultipleRecordsCommand } from '@/command-menu-item/record/multiple-records/components/RestoreMultipleRecordsCommand';
import { UpdateMultipleRecordsCommand } from '@/command-menu-item/record/multiple-records/components/UpdateMultipleRecordsCommand';
import { CreateNewIndexRecordNoSelectionRecordCommand } from '@/command-menu-item/record/no-selection/components/CreateNewIndexRecordNoSelectionRecordCommand';
import { CreateNewViewNoSelectionRecordCommand } from '@/command-menu-item/record/no-selection/components/CreateNewViewNoSelectionRecordCommand';
import { HideDeletedRecordsNoSelectionRecordCommand } from '@/command-menu-item/record/no-selection/components/HideDeletedRecordsNoSelectionRecordCommand';
import { ImportRecordsNoSelectionRecordCommand } from '@/command-menu-item/record/no-selection/components/ImportRecordsNoSelectionRecordCommand';
import { SeeDeletedRecordsNoSelectionRecordCommand } from '@/command-menu-item/record/no-selection/components/SeeDeletedRecordsNoSelectionRecordCommand';
import { AddToFavoritesSingleRecordCommand } from '@/command-menu-item/record/single-record/components/AddToFavoritesSingleRecordCommand';
import { DeleteSingleRecordCommand } from '@/command-menu-item/record/single-record/components/DeleteSingleRecordCommand';
import { DestroySingleRecordCommand } from '@/command-menu-item/record/single-record/components/DestroySingleRecordCommand';
import { ExportNoteSingleRecordCommand } from '@/command-menu-item/record/single-record/components/ExportNoteSingleRecordCommand';
import { ExportSingleRecordCommand } from '@/command-menu-item/record/single-record/components/ExportSingleRecordCommand';
import { NavigateToNextRecordSingleRecordCommand } from '@/command-menu-item/record/single-record/components/NavigateToNextRecordSingleRecordCommand';
import { NavigateToPreviousRecordSingleRecordCommand } from '@/command-menu-item/record/single-record/components/NavigateToPreviousRecordSingleRecordCommand';
import { RemoveFromFavoritesSingleRecordCommand } from '@/command-menu-item/record/single-record/components/RemoveFromFavoritesSingleRecordCommand';
import { RestoreSingleRecordCommand } from '@/command-menu-item/record/single-record/components/RestoreSingleRecordCommand';
import { CancelDashboardSingleRecordCommand } from '@/command-menu-item/record/single-record/dashboard/components/CancelDashboardSingleRecordCommand';
import { DuplicateDashboardSingleRecordCommand } from '@/command-menu-item/record/single-record/dashboard/components/DuplicateDashboardSingleRecordCommand';
import { EditDashboardSingleRecordCommand } from '@/command-menu-item/record/single-record/dashboard/components/EditDashboardSingleRecordCommand';
import { SaveDashboardSingleRecordCommand } from '@/command-menu-item/record/single-record/dashboard/components/SaveDashboardSingleRecordCommand';
import { CancelRecordPageLayoutSingleRecordCommand } from '@/command-menu-item/record/single-record/record-page-layout/components/CancelRecordPageLayoutSingleRecordCommand';
import { EditRecordPageLayoutSingleRecordCommand } from '@/command-menu-item/record/single-record/record-page-layout/components/EditRecordPageLayoutSingleRecordCommand';
import { SaveRecordPageLayoutSingleRecordCommand } from '@/command-menu-item/record/single-record/record-page-layout/components/SaveRecordPageLayoutSingleRecordCommand';
import { SeeVersionWorkflowRunSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow-runs/components/SeeVersionWorkflowRunSingleRecordCommand';
import { SeeWorkflowWorkflowRunSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow-runs/components/SeeWorkflowWorkflowRunSingleRecordCommand';
import { StopWorkflowRunSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow-runs/components/StopWorkflowRunSingleRecordCommand';
import { SeeRunsWorkflowVersionSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow-versions/components/SeeRunsWorkflowVersionSingleRecordCommand';
import { SeeVersionsWorkflowVersionSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow-versions/components/SeeVersionsWorkflowVersionSingleRecordCommand';
import { SeeWorkflowWorkflowVersionSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow-versions/components/SeeWorkflowWorkflowVersionSingleRecordCommand';
import { UseAsDraftWorkflowVersionSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow-versions/components/UseAsDraftWorkflowVersionSingleRecordCommand';
import { ActivateWorkflowSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow/components/ActivateWorkflowSingleRecordCommand';
import { AddNodeWorkflowSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow/components/AddNodeWorkflowSingleRecordCommand';
import { DeactivateWorkflowSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow/components/DeactivateWorkflowSingleRecordCommand';
import { DiscardDraftWorkflowSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow/components/DiscardDraftWorkflowSingleRecordCommand';
import { DuplicateWorkflowSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow/components/DuplicateWorkflowSingleRecordCommand';
import { SeeActiveVersionWorkflowSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow/components/SeeActiveVersionWorkflowSingleRecordCommand';
import { SeeRunsWorkflowSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow/components/SeeRunsWorkflowSingleRecordCommand';
import { SeeVersionsWorkflowSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow/components/SeeVersionsWorkflowSingleRecordCommand';
import { TestWorkflowSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow/components/TestWorkflowSingleRecordCommand';
import { TidyUpWorkflowSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow/components/TidyUpWorkflowSingleRecordCommand';
import { StopWorkflowRunSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow-runs/components/StopWorkflowRunSingleRecordCommand';
import { UseAsDraftWorkflowVersionSingleRecordCommand } from '@/command-menu-item/record/single-record/workflow-versions/components/UseAsDraftWorkflowVersionSingleRecordCommand';
import { CoreObjectNamePlural } from '@/object-metadata/types/CoreObjectNamePlural';
import { msg } from '@lingui/core/macro';
import { AppPath, SettingsPath, SidePanelPages } from 'twenty-shared/types';
import { IconHistory, IconSearch, IconSparkles } from 'twenty-ui/display';
import { EngineComponentKey } from '~/generated-metadata/graphql';
export const ENGINE_COMPONENT_KEY_COMPONENT_MAP: Record<
@@ -74,4 +103,160 @@ export const ENGINE_COMPONENT_KEY_COMPONENT_MAP: Record<
<SaveDashboardSingleRecordCommand />
),
[EngineComponentKey.TIDY_UP_WORKFLOW]: <TidyUpWorkflowSingleRecordCommand />,
[EngineComponentKey.NAVIGATE_TO_NEXT_RECORD]: (
<NavigateToNextRecordSingleRecordCommand />
),
[EngineComponentKey.NAVIGATE_TO_PREVIOUS_RECORD]: (
<NavigateToPreviousRecordSingleRecordCommand />
),
[EngineComponentKey.EXPORT_NOTE_TO_PDF]: <ExportNoteSingleRecordCommand />,
[EngineComponentKey.EXPORT_FROM_RECORD_INDEX]: (
<ExportMultipleRecordsCommand />
),
[EngineComponentKey.EXPORT_FROM_RECORD_SHOW]: <ExportSingleRecordCommand />,
[EngineComponentKey.EXPORT_MULTIPLE_RECORDS]: (
<ExportMultipleRecordsCommand />
),
[EngineComponentKey.UPDATE_MULTIPLE_RECORDS]: (
<UpdateMultipleRecordsCommand />
),
[EngineComponentKey.IMPORT_RECORDS]: (
<ImportRecordsNoSelectionRecordCommand />
),
[EngineComponentKey.EXPORT_VIEW]: <ExportMultipleRecordsCommand />,
[EngineComponentKey.SEE_DELETED_RECORDS]: (
<SeeDeletedRecordsNoSelectionRecordCommand />
),
[EngineComponentKey.CREATE_NEW_VIEW]: (
<CreateNewViewNoSelectionRecordCommand />
),
[EngineComponentKey.HIDE_DELETED_RECORDS]: (
<HideDeletedRecordsNoSelectionRecordCommand />
),
[EngineComponentKey.EDIT_RECORD_PAGE_LAYOUT]: (
<EditRecordPageLayoutSingleRecordCommand />
),
[EngineComponentKey.CANCEL_RECORD_PAGE_LAYOUT]: (
<CancelRecordPageLayoutSingleRecordCommand />
),
[EngineComponentKey.EDIT_DASHBOARD_LAYOUT]: (
<EditDashboardSingleRecordCommand />
),
[EngineComponentKey.CANCEL_DASHBOARD_LAYOUT]: (
<CancelDashboardSingleRecordCommand />
),
[EngineComponentKey.GO_TO_PEOPLE]: (
<CommandLink
to={AppPath.RecordIndexPage}
params={{ objectNamePlural: CoreObjectNamePlural.Person }}
/>
),
[EngineComponentKey.GO_TO_COMPANIES]: (
<CommandLink
to={AppPath.RecordIndexPage}
params={{ objectNamePlural: CoreObjectNamePlural.Company }}
/>
),
[EngineComponentKey.GO_TO_DASHBOARDS]: (
<CommandLink
to={AppPath.RecordIndexPage}
params={{ objectNamePlural: CoreObjectNamePlural.Dashboard }}
/>
),
[EngineComponentKey.GO_TO_OPPORTUNITIES]: (
<CommandLink
to={AppPath.RecordIndexPage}
params={{
objectNamePlural: CoreObjectNamePlural.Opportunity,
}}
/>
),
[EngineComponentKey.GO_TO_SETTINGS]: (
<CommandLink
to={AppPath.SettingsCatchAll}
params={{
'*': SettingsPath.ProfilePage,
}}
/>
),
[EngineComponentKey.GO_TO_TASKS]: (
<CommandLink
to={AppPath.RecordIndexPage}
params={{ objectNamePlural: CoreObjectNamePlural.Task }}
/>
),
[EngineComponentKey.GO_TO_NOTES]: (
<CommandLink
to={AppPath.RecordIndexPage}
params={{ objectNamePlural: CoreObjectNamePlural.Note }}
/>
),
[EngineComponentKey.GO_TO_WORKFLOWS]: (
<CommandLink
to={AppPath.RecordIndexPage}
params={{ objectNamePlural: CoreObjectNamePlural.Workflow }}
/>
),
[EngineComponentKey.GO_TO_RUNS]: (
<CommandLink
to={AppPath.RecordIndexPage}
params={{ objectNamePlural: CoreObjectNamePlural.WorkflowRun }}
/>
),
[EngineComponentKey.SEARCH_RECORDS]: (
<CommandMenuItemOpenSidePanelPage
page={SidePanelPages.SearchRecords}
pageTitle={msg`Search`}
pageIcon={IconSearch}
shouldResetSearchState={true}
/>
),
[EngineComponentKey.SEARCH_RECORDS_FALLBACK]: (
<CommandMenuItemOpenSidePanelPage
page={SidePanelPages.SearchRecords}
pageTitle={msg`Search`}
pageIcon={IconSearch}
/>
),
[EngineComponentKey.ASK_AI]: (
<CommandMenuItemOpenSidePanelPage
page={SidePanelPages.AskAI}
pageTitle={msg`Ask AI`}
pageIcon={IconSparkles}
/>
),
[EngineComponentKey.VIEW_PREVIOUS_AI_CHATS]: (
<CommandMenuItemOpenSidePanelPage
page={SidePanelPages.ViewPreviousAIChats}
pageTitle={msg`View Previous AI Chats`}
pageIcon={IconHistory}
/>
),
[EngineComponentKey.SEE_ACTIVE_VERSION_WORKFLOW]: (
<SeeActiveVersionWorkflowSingleRecordCommand />
),
[EngineComponentKey.SEE_RUNS_WORKFLOW]: (
<SeeRunsWorkflowSingleRecordCommand />
),
[EngineComponentKey.SEE_VERSIONS_WORKFLOW]: (
<SeeVersionsWorkflowSingleRecordCommand />
),
[EngineComponentKey.ADD_NODE_WORKFLOW]: (
<AddNodeWorkflowSingleRecordCommand />
),
[EngineComponentKey.SEE_VERSION_WORKFLOW_RUN]: (
<SeeVersionWorkflowRunSingleRecordCommand />
),
[EngineComponentKey.SEE_WORKFLOW_WORKFLOW_RUN]: (
<SeeWorkflowWorkflowRunSingleRecordCommand />
),
[EngineComponentKey.SEE_RUNS_WORKFLOW_VERSION]: (
<SeeRunsWorkflowVersionSingleRecordCommand />
),
[EngineComponentKey.SEE_WORKFLOW_WORKFLOW_VERSION]: (
<SeeWorkflowWorkflowVersionSingleRecordCommand />
),
[EngineComponentKey.SEE_VERSIONS_WORKFLOW_VERSION]: (
<SeeVersionsWorkflowVersionSingleRecordCommand />
),
};