Command to deduplicate command menu items (#19202)

- Deduplicate standard record command menu items by merging
single-record and multi-record delete, restore, destroy, and export
actions into shared record commands.
- Update frontend command registrations and engine component mappings to
use the new unified keys, while keeping deprecated engine keys
temporarily mapped for backward compatibility.
- Add a 1-21 upgrade command that removes legacy command menu items from
workspaces and creates the new unified standard items.
This commit is contained in:
Raphaël Bosi
2026-04-02 11:51:15 +02:00
committed by GitHub
parent 16033e9f99
commit f688db30a9
18 changed files with 388 additions and 384 deletions
@@ -4,20 +4,15 @@ export enum EngineComponentKey {
NAVIGATE_TO_NEXT_RECORD = 'NAVIGATE_TO_NEXT_RECORD',
NAVIGATE_TO_PREVIOUS_RECORD = 'NAVIGATE_TO_PREVIOUS_RECORD',
CREATE_NEW_RECORD = 'CREATE_NEW_RECORD',
DELETE_SINGLE_RECORD = 'DELETE_SINGLE_RECORD',
DELETE_MULTIPLE_RECORDS = 'DELETE_MULTIPLE_RECORDS',
RESTORE_SINGLE_RECORD = 'RESTORE_SINGLE_RECORD',
RESTORE_MULTIPLE_RECORDS = 'RESTORE_MULTIPLE_RECORDS',
DESTROY_SINGLE_RECORD = 'DESTROY_SINGLE_RECORD',
DESTROY_MULTIPLE_RECORDS = 'DESTROY_MULTIPLE_RECORDS',
DELETE_RECORDS = 'DELETE_RECORDS',
RESTORE_RECORDS = 'RESTORE_RECORDS',
DESTROY_RECORDS = 'DESTROY_RECORDS',
ADD_TO_FAVORITES = 'ADD_TO_FAVORITES',
REMOVE_FROM_FAVORITES = 'REMOVE_FROM_FAVORITES',
EXPORT_NOTE_TO_PDF = 'EXPORT_NOTE_TO_PDF',
EXPORT_FROM_RECORD_INDEX = 'EXPORT_FROM_RECORD_INDEX',
EXPORT_FROM_RECORD_SHOW = 'EXPORT_FROM_RECORD_SHOW',
EXPORT_RECORDS = 'EXPORT_RECORDS',
UPDATE_MULTIPLE_RECORDS = 'UPDATE_MULTIPLE_RECORDS',
MERGE_MULTIPLE_RECORDS = 'MERGE_MULTIPLE_RECORDS',
EXPORT_MULTIPLE_RECORDS = 'EXPORT_MULTIPLE_RECORDS',
IMPORT_RECORDS = 'IMPORT_RECORDS',
EXPORT_VIEW = 'EXPORT_VIEW',
SEE_DELETED_RECORDS = 'SEE_DELETED_RECORDS',
@@ -60,6 +55,17 @@ export enum EngineComponentKey {
VIEW_PREVIOUS_AI_CHATS = 'VIEW_PREVIOUS_AI_CHATS',
TRIGGER_WORKFLOW_VERSION = 'TRIGGER_WORKFLOW_VERSION',
FRONT_COMPONENT_RENDERER = 'FRONT_COMPONENT_RENDERER',
// Deprecated keys kept for backward compatibility until migration runs
DELETE_SINGLE_RECORD = 'DELETE_SINGLE_RECORD',
DELETE_MULTIPLE_RECORDS = 'DELETE_MULTIPLE_RECORDS',
RESTORE_SINGLE_RECORD = 'RESTORE_SINGLE_RECORD',
RESTORE_MULTIPLE_RECORDS = 'RESTORE_MULTIPLE_RECORDS',
DESTROY_SINGLE_RECORD = 'DESTROY_SINGLE_RECORD',
DESTROY_MULTIPLE_RECORDS = 'DESTROY_MULTIPLE_RECORDS',
EXPORT_FROM_RECORD_INDEX = 'EXPORT_FROM_RECORD_INDEX',
EXPORT_FROM_RECORD_SHOW = 'EXPORT_FROM_RECORD_SHOW',
EXPORT_MULTIPLE_RECORDS = 'EXPORT_MULTIPLE_RECORDS',
}
registerEnumType(EngineComponentKey, {