Skip to content

The open alternative to Salesforce, designed for AI.

feat(front): expand button and record actions in the side panel footer (#23965)

Félix Malfait9605f5a9951d
diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
index fbfe7b6ab7a..47e24571e66 100644
--- a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
@@ -1726,7 +1726,6 @@ type FeatureFlag {
}
enum FeatureFlagKey {
- IS_AI_CHAT_PAGE_ENABLED
IS_APP_CLAIMING_ENABLED
IS_UNIQUE_INDEXES_ENABLED
IS_JSON_FILTER_ENABLED
diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.ts b/packages/twenty-client-sdk/src/metadata/generated/schema.ts
index b96ec32a368..ab55861b711 100644
--- a/packages/twenty-client-sdk/src/metadata/generated/schema.ts
+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.ts
@@ -1395,7 +1395,7 @@ export interface FeatureFlag {
__typename: 'FeatureFlag'
}
-export type FeatureFlagKey = 'IS_AI_CHAT_PAGE_ENABLED' | 'IS_APP_CLAIMING_ENABLED' | 'IS_UNIQUE_INDEXES_ENABLED' | 'IS_JSON_FILTER_ENABLED' | 'IS_CALENDAR_WEEK_VIEW_ENABLED' | 'IS_EMAIL_GROUP_ENABLED' | 'IS_JUNCTION_RELATIONS_ENABLED' | 'IS_LIST_VIEW_ENABLED' | 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT' | 'IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED' | 'IS_SETTINGS_DISCOVERY_HERO_ENABLED' | 'IS_WORKFLOW_VERSION_IN_CORE_ENABLED' | 'IS_WORKFLOW_DISPATCH_FROM_CORE_ENABLED' | 'IS_WORKSPACE_CACHE_COMPACT_STORAGE_ENABLED' | 'IS_NATIVE_CALL_RECORDING_TABS_ENABLED'
+export type FeatureFlagKey = 'IS_APP_CLAIMING_ENABLED' | 'IS_UNIQUE_INDEXES_ENABLED' | 'IS_JSON_FILTER_ENABLED' | 'IS_CALENDAR_WEEK_VIEW_ENABLED' | 'IS_EMAIL_GROUP_ENABLED' | 'IS_JUNCTION_RELATIONS_ENABLED' | 'IS_LIST_VIEW_ENABLED' | 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT' | 'IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED' | 'IS_SETTINGS_DISCOVERY_HERO_ENABLED' | 'IS_WORKFLOW_VERSION_IN_CORE_ENABLED' | 'IS_WORKFLOW_DISPATCH_FROM_CORE_ENABLED' | 'IS_WORKSPACE_CACHE_COMPACT_STORAGE_ENABLED' | 'IS_NATIVE_CALL_RECORDING_TABS_ENABLED'
export interface WorkspaceUrls {
customUrl?: Scalars['String']
@@ -9641,7 +9641,6 @@ export const enumDatabaseEventAction = {
}
export const enumFeatureFlagKey = {
- IS_AI_CHAT_PAGE_ENABLED: 'IS_AI_CHAT_PAGE_ENABLED' as const,
IS_APP_CLAIMING_ENABLED: 'IS_APP_CLAIMING_ENABLED' as const,
IS_UNIQUE_INDEXES_ENABLED: 'IS_UNIQUE_INDEXES_ENABLED' as const,
IS_JSON_FILTER_ENABLED: 'IS_JSON_FILTER_ENABLED' as const,
diff --git a/packages/twenty-front/src/generated-admin/graphql.ts b/packages/twenty-front/src/generated-admin/graphql.ts
index 3a2ec743a33..3f4e1637e83 100644
--- a/packages/twenty-front/src/generated-admin/graphql.ts
+++ b/packages/twenty-front/src/generated-admin/graphql.ts
@@ -368,7 +368,6 @@ export type FeatureFlag = {
};
export enum FeatureFlagKey {
- IS_AI_CHAT_PAGE_ENABLED = 'IS_AI_CHAT_PAGE_ENABLED',
IS_APP_CLAIMING_ENABLED = 'IS_APP_CLAIMING_ENABLED',
IS_CALENDAR_WEEK_VIEW_ENABLED = 'IS_CALENDAR_WEEK_VIEW_ENABLED',
IS_EMAIL_GROUP_ENABLED = 'IS_EMAIL_GROUP_ENABLED',
diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts
index 428237c3aef..32417f0d9a9 100644
--- a/packages/twenty-front/src/generated-metadata/graphql.ts
+++ b/packages/twenty-front/src/generated-metadata/graphql.ts
@@ -1812,7 +1812,6 @@ export type FeatureFlag = {
};
export enum FeatureFlagKey {
- IS_AI_CHAT_PAGE_ENABLED = 'IS_AI_CHAT_PAGE_ENABLED',
IS_APP_CLAIMING_ENABLED = 'IS_APP_CLAIMING_ENABLED',
IS_CALENDAR_WEEK_VIEW_ENABLED = 'IS_CALENDAR_WEEK_VIEW_ENABLED',
IS_EMAIL_GROUP_ENABLED = 'IS_EMAIL_GROUP_ENABLED',
diff --git a/packages/twenty-front/src/locales/af-ZA.po b/packages/twenty-front/src/locales/af-ZA.po
index 53cf8c2db65..b552c5a8882 100644
--- a/packages/twenty-front/src/locales/af-ZA.po
+++ b/packages/twenty-front/src/locales/af-ZA.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Vou uit"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Vou vouer oop"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Brei uit na Volskerm"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Slegs jy sal jou e-posse en gebeurtenisse kan sien"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/ar-SA.po b/packages/twenty-front/src/locales/ar-SA.po
index d9a2424cefc..df16d22e7c6 100644
--- a/packages/twenty-front/src/locales/ar-SA.po
+++ b/packages/twenty-front/src/locales/ar-SA.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "توسيع"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "توسيع المجلد"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "توسيع لملء الشاشة"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "أنت فقط من سيتمكن من رؤية رسائلك الإلكترونية وأحداثك"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/ca-ES.po b/packages/twenty-front/src/locales/ca-ES.po
index 30e0d0c6e3f..c0762e334cd 100644
--- a/packages/twenty-front/src/locales/ca-ES.po
+++ b/packages/twenty-front/src/locales/ca-ES.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Ampliar"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Desplega la carpeta"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Expandir a pantalla completa"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Només tu podràs veure els teus correus electrònics i esdeveniments"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/cs-CZ.po b/packages/twenty-front/src/locales/cs-CZ.po
index 52c634bd148..f0569892b6c 100644
--- a/packages/twenty-front/src/locales/cs-CZ.po
+++ b/packages/twenty-front/src/locales/cs-CZ.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Rozbalit"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Rozbalit složku"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Rozšířit na celou obrazovku"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Vaše e-maily a události budete moci vidět pouze vy"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/da-DK.po b/packages/twenty-front/src/locales/da-DK.po
index 0cdce7a5b5f..6c2c32159ae 100644
--- a/packages/twenty-front/src/locales/da-DK.po
+++ b/packages/twenty-front/src/locales/da-DK.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Udvid"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Fold mappe ud"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Udvid til fuld skærm"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Kun du vil kunne se dine e-mails og begivenheder"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/de-DE.po b/packages/twenty-front/src/locales/de-DE.po
index da1686356f8..6fb36102d86 100644
--- a/packages/twenty-front/src/locales/de-DE.po
+++ b/packages/twenty-front/src/locales/de-DE.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Expandieren"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Ordner aufklappen"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Auf Vollbild erweitern"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Nur Sie können Ihre E-Mails und Ereignisse sehen"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/el-GR.po b/packages/twenty-front/src/locales/el-GR.po
index cf8bf650058..a7c294e643b 100644
--- a/packages/twenty-front/src/locales/el-GR.po
+++ b/packages/twenty-front/src/locales/el-GR.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Επέκταση"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Ανάπτυξη φακέλου"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Επέκταση σε Πλήρη Οθόνη"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Μόνο εσείς θα μπορείτε να βλέπετε τα emails και τα γεγονότα σας"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/en.po b/packages/twenty-front/src/locales/en.po
index 113497474f3..1d96702b2ac 100644
--- a/packages/twenty-front/src/locales/en.po
+++ b/packages/twenty-front/src/locales/en.po
@@ -8066,7 +8066,7 @@ msgid "Expand"
msgstr "Expand"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr "Expand chat"
@@ -8080,11 +8080,22 @@ msgstr "Expand folder"
msgid "Expand navigation panel"
msgstr "Expand navigation panel"
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr "Expand record"
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Expand to Full Screen"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr "Expand view"
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13914,7 +13925,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Only you will be able to see your emails and events"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/es-ES.po b/packages/twenty-front/src/locales/es-ES.po
index e0825edaa42..2c8a6fc52f0 100644
--- a/packages/twenty-front/src/locales/es-ES.po
+++ b/packages/twenty-front/src/locales/es-ES.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Expandir"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Expandir carpeta"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Expandir a pantalla completa"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Solo tú podrás ver tus correos y eventos"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/fi-FI.po b/packages/twenty-front/src/locales/fi-FI.po
index f049c8f20ba..39d0e7add11 100644
--- a/packages/twenty-front/src/locales/fi-FI.po
+++ b/packages/twenty-front/src/locales/fi-FI.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Laajenna"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Laajenna kansio"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Laajenna koko näytölle"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Vain sinä näet sähköpostisi ja tapahtumasi"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/fr-FR.po b/packages/twenty-front/src/locales/fr-FR.po
index 0f68f0ce779..0dec8e06712 100644
--- a/packages/twenty-front/src/locales/fr-FR.po
+++ b/packages/twenty-front/src/locales/fr-FR.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Agrandir"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Déplier le dossier"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Agrandir en plein écran"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Vous seul pourrez voir vos e-mails et événements"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/he-IL.po b/packages/twenty-front/src/locales/he-IL.po
index 37bdb15a529..5299132b854 100644
--- a/packages/twenty-front/src/locales/he-IL.po
+++ b/packages/twenty-front/src/locales/he-IL.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "הרחב"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "הרחב תיקייה"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "הרחב למסך מלא"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "רק אתה תוכל לראות את האימיילים והאירועים שלך"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/hu-HU.po b/packages/twenty-front/src/locales/hu-HU.po
index a72caeb5947..9c33262df94 100644
--- a/packages/twenty-front/src/locales/hu-HU.po
+++ b/packages/twenty-front/src/locales/hu-HU.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Kibontás"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Mappa kibontása"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Tágítás teljes képernyőre"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Csak Ön fogja látni az e-mailjeit és eseményeit"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/it-IT.po b/packages/twenty-front/src/locales/it-IT.po
index 41fc3d8c3c3..22dde37acae 100644
--- a/packages/twenty-front/src/locales/it-IT.po
+++ b/packages/twenty-front/src/locales/it-IT.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Espandi"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Espandi cartella"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Espandi a Schermo Intero"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Solo tu potrai vedere le tue email e i tuoi eventi"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/ja-JP.po b/packages/twenty-front/src/locales/ja-JP.po
index 591c6732aa4..237b22679dc 100644
--- a/packages/twenty-front/src/locales/ja-JP.po
+++ b/packages/twenty-front/src/locales/ja-JP.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "展開"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "フォルダーを展開"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "フルスクリーンに拡大"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "あなた以外はメールやイベントを見ることができません"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/ko-KR.po b/packages/twenty-front/src/locales/ko-KR.po
index d2f5574be88..6f7d29d6606 100644
--- a/packages/twenty-front/src/locales/ko-KR.po
+++ b/packages/twenty-front/src/locales/ko-KR.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "확장"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "폴더 펼치기"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "전체 화면으로 확장"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "본인만 이메일과 이벤트를 볼 수 있습니다"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/nl-NL.po b/packages/twenty-front/src/locales/nl-NL.po
index 6f34d446c4a..3e9267a9ed7 100644
--- a/packages/twenty-front/src/locales/nl-NL.po
+++ b/packages/twenty-front/src/locales/nl-NL.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Uitvouwen"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Map uitvouwen"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Uitbreiden naar volledig scherm"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Alleen u kunt uw e-mails en agenda-afspraken zien"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/no-NO.po b/packages/twenty-front/src/locales/no-NO.po
index 92d51f85437..9b7c9a29e54 100644
--- a/packages/twenty-front/src/locales/no-NO.po
+++ b/packages/twenty-front/src/locales/no-NO.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Utvid"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Utvid mappe"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Utvid til fullskjerm"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Bare du vil kunne se e-postene og hendelsene dine"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/pl-PL.po b/packages/twenty-front/src/locales/pl-PL.po
index e24c4525047..f3cc5376a13 100644
--- a/packages/twenty-front/src/locales/pl-PL.po
+++ b/packages/twenty-front/src/locales/pl-PL.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Rozwiń"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Rozwiń folder"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Rozszerz na pełny ekran"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Tylko ty będziesz widzieć swoje e-maile i wydarzenia"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/pseudo-en.po b/packages/twenty-front/src/locales/pseudo-en.po
index 1a9c870f8f9..90649e0ee00 100644
--- a/packages/twenty-front/src/locales/pseudo-en.po
+++ b/packages/twenty-front/src/locales/pseudo-en.po
@@ -8066,7 +8066,7 @@ msgid "Expand"
msgstr ""
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8080,11 +8080,22 @@ msgstr ""
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr ""
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13891,7 +13902,6 @@ msgid "Only you will be able to see your emails and events"
msgstr ""
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/pt-BR.po b/packages/twenty-front/src/locales/pt-BR.po
index 6cfc6b63bee..138af8eac07 100644
--- a/packages/twenty-front/src/locales/pt-BR.po
+++ b/packages/twenty-front/src/locales/pt-BR.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Expandir"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Expandir pasta"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Expandir para Tela Cheia"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Apenas você poderá ver seus e-mails e eventos"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/pt-PT.po b/packages/twenty-front/src/locales/pt-PT.po
index 8ce7ba0f55b..3bd38d9be7f 100644
--- a/packages/twenty-front/src/locales/pt-PT.po
+++ b/packages/twenty-front/src/locales/pt-PT.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Expandir"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Expandir pasta"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Expandir para tela cheia"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Só você poderá ver os seus e-mails e eventos"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/ro-RO.po b/packages/twenty-front/src/locales/ro-RO.po
index 73068ca3e3d..d22403a552f 100644
--- a/packages/twenty-front/src/locales/ro-RO.po
+++ b/packages/twenty-front/src/locales/ro-RO.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Extinde"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Extinde folderul"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Extinde la Ecran complet"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Numai dvs. veți putea vedea e-mailurile și evenimentele dvs."
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/ru-RU.po b/packages/twenty-front/src/locales/ru-RU.po
index 58e7597817b..7b4512f0334 100644
Binary files a/packages/twenty-front/src/locales/ru-RU.po and b/packages/twenty-front/src/locales/ru-RU.po differ
diff --git a/packages/twenty-front/src/locales/sr-Cyrl.po b/packages/twenty-front/src/locales/sr-Cyrl.po
index bd9cd3c926a..e3155ba15e9 100644
--- a/packages/twenty-front/src/locales/sr-Cyrl.po
+++ b/packages/twenty-front/src/locales/sr-Cyrl.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Прошири"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Прошири фасциклу"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Проширите на пун екран"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Само ћете ви моћи да видите своје имејлове и догађаје"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/sv-SE.po b/packages/twenty-front/src/locales/sv-SE.po
index ca47278dbff..1d2be392781 100644
--- a/packages/twenty-front/src/locales/sv-SE.po
+++ b/packages/twenty-front/src/locales/sv-SE.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Expandera"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Fäll ut mapp"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Expandera till helskärm"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13921,7 +13932,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Endast du kommer att kunna se dina e-postmeddelanden och händelser"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/tr-TR.po b/packages/twenty-front/src/locales/tr-TR.po
index d92dc71f06a..158f19608e7 100644
--- a/packages/twenty-front/src/locales/tr-TR.po
+++ b/packages/twenty-front/src/locales/tr-TR.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Genişlet"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Klasörü genişlet"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Tam Ekrana Genişlet"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Yalnızca siz e-postalarınızı ve etkinliklerinizi görebileceksiniz"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/uk-UA.po b/packages/twenty-front/src/locales/uk-UA.po
index 43eaaa0e8c9..ccfe5691601 100644
--- a/packages/twenty-front/src/locales/uk-UA.po
+++ b/packages/twenty-front/src/locales/uk-UA.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Розгорнути"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Розгорнути папку"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Розгорнути на весь екран"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Лише ви зможете бачити свої електронні листи та події"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/vi-VN.po b/packages/twenty-front/src/locales/vi-VN.po
index 10f137ac5cc..fe97115e201 100644
--- a/packages/twenty-front/src/locales/vi-VN.po
+++ b/packages/twenty-front/src/locales/vi-VN.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "Mở rộng"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "Mở rộng thư mục"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "Mở rộng ra toàn màn hình"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13919,7 +13930,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "Chỉ mình bạn có thể xem email và sự kiện của mình"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/zh-CN.po b/packages/twenty-front/src/locales/zh-CN.po
index f067e0e0f12..6844525ca77 100644
--- a/packages/twenty-front/src/locales/zh-CN.po
+++ b/packages/twenty-front/src/locales/zh-CN.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "展开"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "展开文件夹"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "扩展到全屏"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13896,7 +13907,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "只有你可以看到自己的电子邮件和事件"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/locales/zh-TW.po b/packages/twenty-front/src/locales/zh-TW.po
index a0173c2d10f..a2e8f3b87d5 100644
--- a/packages/twenty-front/src/locales/zh-TW.po
+++ b/packages/twenty-front/src/locales/zh-TW.po
@@ -8071,7 +8071,7 @@ msgid "Expand"
msgstr "展開"
#. js-lingui-id: 8ibXh3
-#: src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+#: src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
msgid "Expand chat"
msgstr ""
@@ -8085,11 +8085,22 @@ msgstr "展開資料夾"
msgid "Expand navigation panel"
msgstr ""
+#. js-lingui-id: CM8OoE
+#: src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
+#: src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
+msgid "Expand record"
+msgstr ""
+
#. js-lingui-id: Y7w75u
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx
msgid "Expand to Full Screen"
msgstr "展開至全螢幕"
+#. js-lingui-id: YcwQIp
+#: src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
+msgid "Expand view"
+msgstr ""
+
#. js-lingui-id: iT7W4v
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx
msgid "Expected Body"
@@ -13896,7 +13907,6 @@ msgid "Only you will be able to see your emails and events"
msgstr "只有您能看到自己的電子郵件與活動"
#. js-lingui-id: 1TNIig
-#: src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
#: src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
#: src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx
diff --git a/packages/twenty-front/src/modules/command-menu-item/components/RecordPageSidePanelCommandMenuDropdown.tsx b/packages/twenty-front/src/modules/command-menu-item/components/RecordPageSidePanelCommandMenuDropdown.tsx
index ac7e825be67..543b0aefd7d 100644
--- a/packages/twenty-front/src/modules/command-menu-item/components/RecordPageSidePanelCommandMenuDropdown.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/components/RecordPageSidePanelCommandMenuDropdown.tsx
@@ -1,5 +1,6 @@
import { CommandMenuContext } from '@/command-menu-item/contexts/CommandMenuContext';
import { CommandMenuItemRenderer } from '@/command-menu-item/display/components/CommandMenuItemRenderer';
+import { usePinnedCommandMenuItemsInlineLayout } from '@/command-menu-item/display/hooks/usePinnedCommandMenuItemsInlineLayout';
import { getSidePanelCommandMenuDropdownIdFromCommandMenuId } from '@/command-menu-item/utils/getSidePanelCommandMenuDropdownIdFromCommandMenuId';
import { CommandMenuComponentInstanceContext } from '@/command-menu/states/contexts/CommandMenuComponentInstanceContext';
import { OptionsDropdownMenu } from '@/ui/layout/dropdown/components/OptionsDropdownMenu';
@@ -43,11 +44,43 @@ export const RecordPageSidePanelCommandMenuDropdown = () => {
[commandMenuItems],
);
+ const pinnedCommandMenuItems = useMemo(
+ () => commandMenuItems.filter((item) => item.isPinned === true),
+ [commandMenuItems],
+ );
+
+ // Pinned items are buttons in the footer, so the dropdown only repeats the
+ // ones the footer could not fit.
+ const { pinnedOverflowCommandMenuItems } =
+ usePinnedCommandMenuItemsInlineLayout({
+ pinnedCommandMenuItems,
+ layoutKey: 'side-panel-footer',
+ });
+
+ // A widget owning the footer suppresses those buttons entirely, and leaves
+ // the footer measurements stale, so every pinned item belongs here instead.
+ const hasPinnedWidgetCommandMenuItems =
+ sidePanelWidgetFooterCommandMenuItems.some(
+ (commandMenuItem) => commandMenuItem.isPinned !== false,
+ );
+
+ const pinnedOverflowCommandMenuItemIds = new Set(
+ pinnedOverflowCommandMenuItems.map((item) => item.id),
+ );
+
+ const listedCommandMenuItems = hasPinnedWidgetCommandMenuItems
+ ? recordSelectionCommandMenuItems
+ : recordSelectionCommandMenuItems.filter(
+ (item) =>
+ item.isPinned !== true ||
+ pinnedOverflowCommandMenuItemIds.has(item.id),
+ );
+
const selectableItemIdArray = [
...dropdownWidgetCommandMenuItems.map(
(commandMenuItem) => commandMenuItem.id,
),
- ...recordSelectionCommandMenuItems.map((item) => item.id),
+ ...listedCommandMenuItems.map((item) => item.id),
];
return (
@@ -68,10 +101,8 @@ export const RecordPageSidePanelCommandMenuDropdown = () => {
/>
))}
{dropdownWidgetCommandMenuItems.length > 0 &&
- recordSelectionCommandMenuItems.length > 0 && (
- <HorizontalSeparator noMargin />
- )}
- {recordSelectionCommandMenuItems.map((item) => (
+ listedCommandMenuItems.length > 0 && <HorizontalSeparator noMargin />}
+ {listedCommandMenuItems.map((item) => (
<CommandMenuItemRenderer item={item} key={item.id} />
))}
</OptionsDropdownMenu>
diff --git a/packages/twenty-front/src/modules/command-menu-item/components/RecordPageSidePanelPinnedCommandMenuItems.tsx b/packages/twenty-front/src/modules/command-menu-item/components/RecordPageSidePanelPinnedCommandMenuItems.tsx
new file mode 100644
index 00000000000..12430c524c3
--- /dev/null
+++ b/packages/twenty-front/src/modules/command-menu-item/components/RecordPageSidePanelPinnedCommandMenuItems.tsx
@@ -0,0 +1,26 @@
+import { isDefined } from 'twenty-shared/utils';
+
+import { CommandMenuContextProvider } from '@/command-menu-item/contexts/CommandMenuContextProvider';
+import { PinnedCommandMenuItemButtons } from '@/command-menu-item/display/components/PinnedCommandMenuItemButtons';
+import { contextStoreCurrentObjectMetadataItemIdComponentState } from '@/context-store/states/contextStoreCurrentObjectMetadataItemIdComponentState';
+import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
+
+export const RecordPageSidePanelPinnedCommandMenuItems = () => {
+ const contextStoreCurrentObjectMetadataItemId = useAtomComponentStateValue(
+ contextStoreCurrentObjectMetadataItemIdComponentState,
+ );
+
+ if (!isDefined(contextStoreCurrentObjectMetadataItemId)) {
+ return null;
+ }
+
+ return (
+ <CommandMenuContextProvider
+ isInSidePanel={true}
+ displayType="button"
+ containerType="side-panel-footer"
+ >
+ <PinnedCommandMenuItemButtons />
+ </CommandMenuContextProvider>
+ );
+};
diff --git a/packages/twenty-front/src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx b/packages/twenty-front/src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
deleted file mode 100644
index e7ccd8a5626..00000000000
--- a/packages/twenty-front/src/modules/command-menu-item/components/RecordShowSidePanelOpenRecordButton.tsx
+++ /dev/null
@@ -1,151 +0,0 @@
-import { CommandMenuComponentInstanceContext } from '@/command-menu/states/contexts/CommandMenuComponentInstanceContext';
-import { getSidePanelCommandMenuDropdownIdFromCommandMenuId } from '@/command-menu-item/utils/getSidePanelCommandMenuDropdownIdFromCommandMenuId';
-import { SIDE_PANEL_FOCUS_ID } from '@/side-panel/constants/SidePanelFocusId';
-import { useSidePanelMenu } from '@/side-panel/hooks/useSidePanelMenu';
-import { sidePanelNavigationStackState } from '@/side-panel/states/sidePanelNavigationStackState';
-import { SidePanelPageComponentInstanceContext } from '@/side-panel/states/contexts/SidePanelPageComponentInstanceContext';
-import { MAIN_CONTEXT_STORE_INSTANCE_ID } from '@/context-store/constants/MainContextStoreInstanceId';
-import { contextStoreRecordShowParentViewComponentState } from '@/context-store/states/contextStoreRecordShowParentViewComponentState';
-import { CoreObjectNameSingular, AppPath } from 'twenty-shared/types';
-import { recordStoreFamilyState } from '@/object-record/record-store/states/recordStoreFamilyState';
-import { type ObjectRecord } from '@/object-record/types/ObjectRecord';
-import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';
-import { getShowPageTabListComponentId } from '@/ui/layout/show-page/utils/getShowPageTabListComponentId';
-import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';
-import { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement';
-import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
-import { useComponentInstanceStateContext } from '@/ui/utilities/state/component-state/hooks/useComponentInstanceStateContext';
-import { useAtomComponentStateCallbackState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateCallbackState';
-import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
-import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';
-import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';
-import { t } from '@lingui/core/macro';
-import { useStore } from 'jotai';
-import { useCallback } from 'react';
-import { isDefined } from 'twenty-shared/utils';
-import { IconAddressBook } from 'twenty-ui/icon';
-import { Button } from 'twenty-ui/input';
-import { getOsControlSymbol } from 'twenty-ui/utilities';
-import { useNavigateApp } from '~/hooks/useNavigateApp';
-
-type RecordShowSidePanelOpenRecordButtonProps = {
- objectNameSingular: string;
- recordId: string;
-};
-
-export const RecordShowSidePanelOpenRecordButton = ({
- objectNameSingular,
- recordId,
-}: RecordShowSidePanelOpenRecordButtonProps) => {
- const record = useAtomFamilyStateValue(recordStoreFamilyState, recordId) as
- | ObjectRecord
- | null
- | undefined;
- const { closeSidePanelMenu } = useSidePanelMenu();
-
- const sidePanelPageComponentInstance = useComponentInstanceStateContext(
- SidePanelPageComponentInstanceContext,
- );
-
- const tabListComponentId = getShowPageTabListComponentId({
- pageId: sidePanelPageComponentInstance?.instanceId,
- targetObjectId: recordId,
- });
-
- const activeTabId = useAtomComponentStateValue(
- activeTabIdComponentState,
- tabListComponentId,
- );
-
- const tabListComponentIdInRecordPage = getShowPageTabListComponentId({
- targetObjectId: recordId,
- });
-
- const setActiveTabId = useSetAtomComponentState(
- activeTabIdComponentState,
- tabListComponentIdInRecordPage,
- );
-
- const parentViewState = useAtomComponentStateCallbackState(
- contextStoreRecordShowParentViewComponentState,
- MAIN_CONTEXT_STORE_INSTANCE_ID,
- );
-
- const store = useStore();
-
- const navigate = useNavigateApp();
-
- const commandMenuId = useAvailableComponentInstanceIdOrThrow(
- CommandMenuComponentInstanceContext,
- );
-
- const { closeDropdown } = useCloseDropdown();
-
- const handleOpenRecord = useCallback(() => {
- const tabIdToOpen =
- activeTabId === 'home'
- ? objectNameSingular === CoreObjectNameSingular.Note ||
- objectNameSingular === CoreObjectNameSingular.Task
- ? 'richText'
- : 'timeline'
- : activeTabId;
-
- setActiveTabId(tabIdToOpen);
-
- const parentView = store.get(parentViewState);
-
- if (
- isDefined(parentView) &&
- parentView.parentViewObjectNameSingular !== objectNameSingular
- ) {
- store.set(parentViewState, undefined);
- }
-
- store.set(sidePanelNavigationStackState.atom, []);
-
- navigate(AppPath.RecordShowPage, {
- objectNameSingular,
- objectRecordId: recordId,
- });
-
- closeDropdown(
- getSidePanelCommandMenuDropdownIdFromCommandMenuId(commandMenuId),
- );
-
- closeSidePanelMenu();
- }, [
- commandMenuId,
- activeTabId,
- closeSidePanelMenu,
- closeDropdown,
- navigate,
- objectNameSingular,
- parentViewState,
- recordId,
- setActiveTabId,
- store,
- ]);
-
- useHotkeysOnFocusedElement({
- keys: ['ctrl+Enter,meta+Enter'],
- callback: handleOpenRecord,
- focusId: SIDE_PANEL_FOCUS_ID,
- dependencies: [handleOpenRecord],
- });
-
- if (!isDefined(record)) {
- return null;
- }
-
- return (
- <Button
- title={t`Open`}
- variant="primary"
- accent="blue"
- size="small"
- Icon={IconAddressBook}
- hotkeys={[getOsControlSymbol(), '⏎']}
- onClick={handleOpenRecord}
- />
- );
-};
diff --git a/packages/twenty-front/src/modules/command-menu-item/components/__stories__/RecordShowSidePanelCommandMenuDropdown.stories.tsx b/packages/twenty-front/src/modules/command-menu-item/components/__stories__/RecordShowSidePanelCommandMenuDropdown.stories.tsx
index 68b128bd905..6dcf803d84e 100644
--- a/packages/twenty-front/src/modules/command-menu-item/components/__stories__/RecordShowSidePanelCommandMenuDropdown.stories.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/components/__stories__/RecordShowSidePanelCommandMenuDropdown.stories.tsx
@@ -82,19 +82,19 @@ export const WithButtonClicks: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement.ownerDocument.body);
- let actionButton = await canvas.findByText('Options');
+ let actionButton = await canvas.findByRole('button', { name: 'Options' });
await userEvent.click(actionButton);
const deleteButton = await canvas.findByText('Delete');
await userEvent.click(deleteButton);
- actionButton = await canvas.findByText('Options');
+ actionButton = await canvas.findByRole('button', { name: 'Options' });
await userEvent.click(actionButton);
const addToFavoritesButton = await canvas.findByText('Add to favorites');
await userEvent.click(addToFavoritesButton);
- actionButton = await canvas.findByText('Options');
+ actionButton = await canvas.findByRole('button', { name: 'Options' });
await userEvent.click(actionButton);
const exportButton = await canvas.findByText('Export');
diff --git a/packages/twenty-front/src/modules/command-menu-item/display/components/CommandMenuItemRenderer.tsx b/packages/twenty-front/src/modules/command-menu-item/display/components/CommandMenuItemRenderer.tsx
index df2acf1da7d..fb4694d4056 100644
--- a/packages/twenty-front/src/modules/command-menu-item/display/components/CommandMenuItemRenderer.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/display/components/CommandMenuItemRenderer.tsx
@@ -32,6 +32,7 @@ const StyledPreviewWrapper = styled.div`
type CommandMenuItemRendererProps = {
item: CommandMenuItemFieldsFragment;
isPrimaryAction?: boolean;
+ shouldHideLabel?: boolean;
};
type CommandMenuItemButtonRendererProps = CommandMenuItemRendererProps;
@@ -39,6 +40,7 @@ type CommandMenuItemButtonRendererProps = CommandMenuItemRendererProps;
const CommandMenuItemButtonRenderer = ({
item,
isPrimaryAction = false,
+ shouldHideLabel = false,
}: CommandMenuItemButtonRendererProps) => {
const { commandMenuContextApi, isInPreviewMode } =
useContext(CommandMenuContext);
@@ -65,6 +67,7 @@ const CommandMenuItemButtonRenderer = ({
<CommandMenuButton
command={command}
isPrimaryAction={isPrimaryAction}
+ shouldHideLabel={shouldHideLabel}
/>
</StyledPreviewWrapper>
);
@@ -76,6 +79,7 @@ const CommandMenuItemButtonRenderer = ({
onClick={disabled ? undefined : handleClick}
disabled={disabled}
isPrimaryAction={isPrimaryAction}
+ shouldHideLabel={shouldHideLabel}
/>
);
};
@@ -175,6 +179,7 @@ const CommandMenuItemSelectableRenderer = ({
export const CommandMenuItemRenderer = ({
item,
isPrimaryAction,
+ shouldHideLabel,
}: CommandMenuItemRendererProps) => {
const { displayType } = useContext(CommandMenuContext);
@@ -183,6 +188,7 @@ export const CommandMenuItemRenderer = ({
<CommandMenuItemButtonRenderer
item={item}
isPrimaryAction={isPrimaryAction}
+ shouldHideLabel={shouldHideLabel}
/>
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/display/components/PinnedCommandMenuItemButtons.tsx b/packages/twenty-front/src/modules/command-menu-item/display/components/PinnedCommandMenuItemButtons.tsx
index 89a90487005..13e2e37c76f 100644
--- a/packages/twenty-front/src/modules/command-menu-item/display/components/PinnedCommandMenuItemButtons.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/display/components/PinnedCommandMenuItemButtons.tsx
@@ -3,12 +3,17 @@ import { CommandMenuContext } from '@/command-menu-item/contexts/CommandMenuCont
import { PinnedCommandMenuItemsInlineMeasurements } from '@/command-menu-item/display/components/PinnedCommandMenuItemsInlineMeasurements';
import { PINNED_COMMAND_MENU_ITEMS_GAP } from '@/command-menu-item/display/constants/PinnedCommandMenuItemsGap';
import { usePinnedCommandMenuItemsInlineLayout } from '@/command-menu-item/display/hooks/usePinnedCommandMenuItemsInlineLayout';
+import { getLabelledPinnedCommandMenuItemId } from '@/command-menu-item/display/utils/getLabelledPinnedCommandMenuItemId';
import { NodeDimension } from '@/ui/utilities/dimensions/components/NodeDimension';
import { styled } from '@linaria/react';
+import { isDefined } from 'twenty-shared/utils';
import { motion } from 'framer-motion';
import { useContext, useMemo } from 'react';
import { ThemeContext } from 'twenty-ui/theme-constants';
-import { EngineComponentKey } from '~/generated-metadata/graphql';
+import {
+ type CommandMenuItemFieldsFragment,
+ EngineComponentKey,
+} from '~/generated-metadata/graphql';
const StyledCommandMenuItemContainer = styled(motion.div)`
align-items: center;
@@ -29,9 +34,10 @@ const StyledContainer = styled.div`
width: 100%;
`;
-const StyledItemsContainer = styled.div`
+const StyledItemsContainer = styled.div<{ shouldReverse: boolean }>`
display: flex;
- flex-direction: row-reverse;
+ flex-direction: ${({ shouldReverse }) =>
+ shouldReverse ? 'row-reverse' : 'row'};
gap: ${PINNED_COMMAND_MENU_ITEMS_GAP}px;
max-width: 100%;
overflow: hidden;
@@ -39,13 +45,25 @@ const StyledItemsContainer = styled.div`
export const PinnedCommandMenuItemButtons = () => {
const { theme } = useContext(ThemeContext);
- const { commandMenuItems } = useContext(CommandMenuContext);
+ const { commandMenuItems, containerType } = useContext(CommandMenuContext);
+
+ // The footer is far narrower than a page header, so it labels a single action
+ // and keeps that label rightmost. Headers label every action and reverse the
+ // row so their labels sit left of the icons.
+ const isSidePanelFooter = containerType === 'side-panel-footer';
const pinnedCommandMenuItems = useMemo(
() => commandMenuItems.filter((item) => item.isPinned === true),
[commandMenuItems],
);
+ const labelledCommandMenuItemId = isSidePanelFooter
+ ? getLabelledPinnedCommandMenuItemId(pinnedCommandMenuItems)
+ : null;
+
+ const shouldHideCommandMenuItemLabel = (commandMenuItemId: string) =>
+ isSidePanelFooter && commandMenuItemId !== labelledCommandMenuItemId;
+
const {
pinnedInlineCommandMenuItems,
pinnedOverflowCommandMenuItems,
@@ -53,8 +71,24 @@ export const PinnedCommandMenuItemButtons = () => {
onCommandMenuItemDimensionChange,
} = usePinnedCommandMenuItemsInlineLayout({
pinnedCommandMenuItems,
+ layoutKey: isSidePanelFooter ? 'side-panel-footer' : 'page-header',
});
+ const isCommandMenuItemLabelled = (
+ commandMenuItem: CommandMenuItemFieldsFragment,
+ ) =>
+ isDefined(commandMenuItem.shortLabel) &&
+ !shouldHideCommandMenuItemLabel(commandMenuItem.id);
+
+ // Labels last so they land rightmost in the footer, and leftmost in the
+ // header once the row is reversed.
+ const displayedInlineCommandMenuItems = [
+ ...pinnedInlineCommandMenuItems.filter(
+ (item) => !isCommandMenuItemLabelled(item),
+ ),
+ ...pinnedInlineCommandMenuItems.filter(isCommandMenuItemLabelled),
+ ];
+
return (
<>
<PinnedCommandMenuItemsInlineMeasurements
@@ -62,6 +96,7 @@ export const PinnedCommandMenuItemButtons = () => {
...pinnedInlineCommandMenuItems,
...pinnedOverflowCommandMenuItems,
]}
+ shouldHideCommandMenuItemLabel={shouldHideCommandMenuItemLabel}
onPinnedCommandMenuItemDimensionChange={
onCommandMenuItemDimensionChange
}
@@ -69,8 +104,8 @@ export const PinnedCommandMenuItemButtons = () => {
<StyledWrapper>
<NodeDimension onDimensionChange={onContainerDimensionChange}>
<StyledContainer>
- <StyledItemsContainer>
- {pinnedInlineCommandMenuItems.map((item) => (
+ <StyledItemsContainer shouldReverse={!isSidePanelFooter}>
+ {displayedInlineCommandMenuItems.map((item) => (
<StyledCommandMenuItemContainer
key={item.id}
initial={{ width: 0, opacity: 0 }}
@@ -83,6 +118,7 @@ export const PinnedCommandMenuItemButtons = () => {
>
<CommandMenuItemRenderer
item={item}
+ shouldHideLabel={shouldHideCommandMenuItemLabel(item.id)}
isPrimaryAction={
item.engineComponentKey ===
EngineComponentKey.CREATE_NEW_RECORD ||
diff --git a/packages/twenty-front/src/modules/command-menu-item/display/components/PinnedCommandMenuItemsInlineMeasurements.tsx b/packages/twenty-front/src/modules/command-menu-item/display/components/PinnedCommandMenuItemsInlineMeasurements.tsx
index d90d91618b0..0fbfebf4799 100644
--- a/packages/twenty-front/src/modules/command-menu-item/display/components/PinnedCommandMenuItemsInlineMeasurements.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/display/components/PinnedCommandMenuItemsInlineMeasurements.tsx
@@ -16,6 +16,7 @@ type ElementDimensions = {
type PinnedCommandMenuItemsInlineMeasurementsProps = {
pinnedCommandMenuItems: CommandMenuItemFieldsFragment[];
+ shouldHideCommandMenuItemLabel: (commandMenuItemId: string) => boolean;
onPinnedCommandMenuItemDimensionChange: (
commandMenuItemKey: string,
) => (dimensions: ElementDimensions) => void;
@@ -32,6 +33,7 @@ const StyledHiddenMeasurementsContainer = styled.div`
export const PinnedCommandMenuItemsInlineMeasurements = ({
pinnedCommandMenuItems,
+ shouldHideCommandMenuItemLabel,
onPinnedCommandMenuItemDimensionChange,
}: PinnedCommandMenuItemsInlineMeasurementsProps) => {
const { getIcon } = useIcons();
@@ -59,6 +61,7 @@ export const PinnedCommandMenuItemsInlineMeasurements = ({
shortLabel,
Icon,
}}
+ shouldHideLabel={shouldHideCommandMenuItemLabel(item.id)}
/>
</NodeDimension>
);
diff --git a/packages/twenty-front/src/modules/command-menu-item/display/components/SidePanelCommandMenuItemDisplayPage.tsx b/packages/twenty-front/src/modules/command-menu-item/display/components/SidePanelCommandMenuItemDisplayPage.tsx
index 33fdaaea34a..c3024235c80 100644
--- a/packages/twenty-front/src/modules/command-menu-item/display/components/SidePanelCommandMenuItemDisplayPage.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/display/components/SidePanelCommandMenuItemDisplayPage.tsx
@@ -1,13 +1,14 @@
import { CommandMenuContext } from '@/command-menu-item/contexts/CommandMenuContext';
import { CommandMenuItemRenderer } from '@/command-menu-item/display/components/CommandMenuItemRenderer';
import { PINNED_COMMAND_MENU_ITEMS_GAP } from '@/command-menu-item/display/constants/PinnedCommandMenuItemsGap';
-import { commandMenuPinnedInlineLayoutState } from '@/command-menu-item/display/states/commandMenuPinnedInlineLayoutState';
+import { commandMenuPinnedInlineLayoutFamilyState } from '@/command-menu-item/display/states/commandMenuPinnedInlineLayoutFamilyState';
import { getVisibleCommandMenuItemCountForContainerWidth } from '@/command-menu-item/display/utils/getVisibleCommandMenuItemCountForContainerWidth';
import { groupCommandMenuItems } from '@/command-menu-item/utils/groupCommandMenuItems';
import { SidePanelGroup } from '@/side-panel/components/SidePanelGroup';
import { SidePanelList } from '@/side-panel/components/SidePanelList';
import { useFilterCommandMenuItemsWithSidePanelSearch } from '@/side-panel/pages/root/hooks/useFilterCommandMenuItemsWithSidePanelSearch';
import { sidePanelSearchState } from '@/side-panel/states/sidePanelSearchState';
+import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { useLingui } from '@lingui/react/macro';
import { isNumber } from '@sniptt/guards';
@@ -21,8 +22,10 @@ export const SidePanelCommandMenuItemDisplayPage = () => {
const { commandMenuItems, commandMenuContextApi } =
useContext(CommandMenuContext);
- const commandMenuPinnedInlineLayout = useAtomStateValue(
- commandMenuPinnedInlineLayoutState,
+ // The command menu list surfaces whatever overflowed out of the page header.
+ const commandMenuPinnedInlineLayout = useAtomFamilyStateValue(
+ commandMenuPinnedInlineLayoutFamilyState,
+ 'page-header',
);
const { filterCommandMenuItemsWithSidePanelSearch } =
diff --git a/packages/twenty-front/src/modules/command-menu-item/display/hooks/usePinnedCommandMenuItemsInlineLayout.ts b/packages/twenty-front/src/modules/command-menu-item/display/hooks/usePinnedCommandMenuItemsInlineLayout.ts
index d9ea6e45a26..44ea9bcf2b9 100644
--- a/packages/twenty-front/src/modules/command-menu-item/display/hooks/usePinnedCommandMenuItemsInlineLayout.ts
+++ b/packages/twenty-front/src/modules/command-menu-item/display/hooks/usePinnedCommandMenuItemsInlineLayout.ts
@@ -1,7 +1,8 @@
import { PINNED_COMMAND_MENU_ITEMS_GAP } from '@/command-menu-item/display/constants/PinnedCommandMenuItemsGap';
-import { commandMenuPinnedInlineLayoutState } from '@/command-menu-item/display/states/commandMenuPinnedInlineLayoutState';
+import { commandMenuPinnedInlineLayoutFamilyState } from '@/command-menu-item/display/states/commandMenuPinnedInlineLayoutFamilyState';
+import { type PinnedCommandMenuItemsLayoutKey } from '@/command-menu-item/display/types/PinnedCommandMenuItemsLayoutKey';
import { getVisibleCommandMenuItemCountForContainerWidth } from '@/command-menu-item/display/utils/getVisibleCommandMenuItemCountForContainerWidth';
-import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';
+import { useAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyState';
import { isNumber } from '@sniptt/guards';
import { useCallback, useMemo } from 'react';
import { type CommandMenuItemFieldsFragment } from '~/generated-metadata/graphql';
@@ -13,13 +14,15 @@ type ElementDimensions = {
type UsePinnedCommandMenuItemsInlineLayoutParams = {
pinnedCommandMenuItems: CommandMenuItemFieldsFragment[];
+ layoutKey: PinnedCommandMenuItemsLayoutKey;
};
export const usePinnedCommandMenuItemsInlineLayout = ({
pinnedCommandMenuItems,
+ layoutKey,
}: UsePinnedCommandMenuItemsInlineLayoutParams) => {
const [commandMenuPinnedInlineLayout, setCommandMenuPinnedInlineLayout] =
- useAtomState(commandMenuPinnedInlineLayoutState);
+ useAtomFamilyState(commandMenuPinnedInlineLayoutFamilyState, layoutKey);
const pinnedCommandMenuItemKeysInDisplayOrder = useMemo(
() => pinnedCommandMenuItems.map((item) => item.id),
diff --git a/packages/twenty-front/src/modules/command-menu-item/display/states/commandMenuPinnedInlineLayoutFamilyState.ts b/packages/twenty-front/src/modules/command-menu-item/display/states/commandMenuPinnedInlineLayoutFamilyState.ts
new file mode 100644
index 00000000000..59e1893dffa
--- /dev/null
+++ b/packages/twenty-front/src/modules/command-menu-item/display/states/commandMenuPinnedInlineLayoutFamilyState.ts
@@ -0,0 +1,17 @@
+import { type CommandMenuPinnedInlineLayout } from '@/command-menu-item/display/types/CommandMenuPinnedInlineLayout';
+import { type PinnedCommandMenuItemsLayoutKey } from '@/command-menu-item/display/types/PinnedCommandMenuItemsLayoutKey';
+import { createAtomFamilyState } from '@/ui/utilities/state/jotai/utils/createAtomFamilyState';
+
+// Surfaces measure the same items at different sizes and label policies, and a
+// header can be on screen while a side panel footer is, so each keeps its own
+// measurements.
+export const commandMenuPinnedInlineLayoutFamilyState = createAtomFamilyState<
+ CommandMenuPinnedInlineLayout,
+ PinnedCommandMenuItemsLayoutKey
+>({
+ key: 'commandMenuPinnedInlineLayoutFamilyState',
+ defaultValue: {
+ containerWidth: 0,
+ commandMenuItemWidthsByKey: {},
+ },
+});
diff --git a/packages/twenty-front/src/modules/command-menu-item/display/states/commandMenuPinnedInlineLayoutState.ts b/packages/twenty-front/src/modules/command-menu-item/display/states/commandMenuPinnedInlineLayoutState.ts
deleted file mode 100644
index 4435868042f..00000000000
--- a/packages/twenty-front/src/modules/command-menu-item/display/states/commandMenuPinnedInlineLayoutState.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { type CommandMenuPinnedInlineLayout } from '@/command-menu-item/display/types/CommandMenuPinnedInlineLayout';
-import { createAtomState } from '@/ui/utilities/state/jotai/utils/createAtomState';
-
-export const commandMenuPinnedInlineLayoutState =
- createAtomState<CommandMenuPinnedInlineLayout>({
- key: 'commandMenuPinnedInlineLayoutState',
- defaultValue: {
- containerWidth: 0,
- commandMenuItemWidthsByKey: {},
- },
- });
diff --git a/packages/twenty-front/src/modules/command-menu-item/display/types/PinnedCommandMenuItemsLayoutKey.ts b/packages/twenty-front/src/modules/command-menu-item/display/types/PinnedCommandMenuItemsLayoutKey.ts
new file mode 100644
index 00000000000..f5460bdf6f9
--- /dev/null
+++ b/packages/twenty-front/src/modules/command-menu-item/display/types/PinnedCommandMenuItemsLayoutKey.ts
@@ -0,0 +1,3 @@
+export type PinnedCommandMenuItemsLayoutKey =
+ | 'page-header'
+ | 'side-panel-footer';
diff --git a/packages/twenty-front/src/modules/command-menu-item/display/utils/getLabelledPinnedCommandMenuItemId.ts b/packages/twenty-front/src/modules/command-menu-item/display/utils/getLabelledPinnedCommandMenuItemId.ts
new file mode 100644
index 00000000000..0bcc6e55155
--- /dev/null
+++ b/packages/twenty-front/src/modules/command-menu-item/display/utils/getLabelledPinnedCommandMenuItemId.ts
@@ -0,0 +1,9 @@
+import { isDefined } from 'twenty-shared/utils';
+import { type CommandMenuItemFieldsFragment } from '~/generated-metadata/graphql';
+
+// A null shortLabel is how an item opts out of ever showing text, so the single
+// labelled slot goes to the first item by position that asked for one.
+export const getLabelledPinnedCommandMenuItemId = (
+ pinnedCommandMenuItems: CommandMenuItemFieldsFragment[],
+): string | null =>
+ pinnedCommandMenuItems.find((item) => isDefined(item.shortLabel))?.id ?? null;
diff --git a/packages/twenty-front/src/modules/command-menu-item/types/CommandMenuItemContainerType.ts b/packages/twenty-front/src/modules/command-menu-item/types/CommandMenuItemContainerType.ts
index 3ad991db0d9..fb9bdd6c140 100644
--- a/packages/twenty-front/src/modules/command-menu-item/types/CommandMenuItemContainerType.ts
+++ b/packages/twenty-front/src/modules/command-menu-item/types/CommandMenuItemContainerType.ts
@@ -4,4 +4,5 @@ export type CommandMenuItemContainerType =
| 'index-page-dropdown'
| 'show-page-header'
| 'standalone-page-header'
- | 'command-menu-show-page-dropdown';
+ | 'command-menu-show-page-dropdown'
+ | 'side-panel-footer';
diff --git a/packages/twenty-front/src/modules/command-menu/components/CommandMenuButton.tsx b/packages/twenty-front/src/modules/command-menu/components/CommandMenuButton.tsx
index 893d906dde3..ef1207925c8 100644
--- a/packages/twenty-front/src/modules/command-menu/components/CommandMenuButton.tsx
+++ b/packages/twenty-front/src/modules/command-menu/components/CommandMenuButton.tsx
@@ -25,6 +25,7 @@ export type CommandMenuButtonProps = {
to?: string;
disabled?: boolean;
isPrimaryAction?: boolean;
+ shouldHideLabel?: boolean;
};
export const CommandMenuButton = ({
@@ -33,14 +34,17 @@ export const CommandMenuButton = ({
to,
disabled = false,
isPrimaryAction = false,
+ shouldHideLabel = false,
}: CommandMenuButtonProps) => {
const resolvedLabel = getCommandMenuItemLabel(command.label);
- const resolvedShortLabel = isDefined(command.shortLabel)
- ? getCommandMenuItemLabel(command.shortLabel)
- : undefined;
+ const resolvedShortLabel =
+ isDefined(command.shortLabel) && !shouldHideLabel
+ ? getCommandMenuItemLabel(command.shortLabel)
+ : undefined;
- const buttonAccent = command.isPrimaryCTA ? 'blue' : 'default';
+ const buttonAccent =
+ isPrimaryAction || command.isPrimaryCTA === true ? 'blue' : 'default';
return (
<>
@@ -48,8 +52,8 @@ export const CommandMenuButton = ({
<Button
Icon={command.Icon}
size="small"
- variant={isPrimaryAction ? 'primary' : 'secondary'}
- accent={isPrimaryAction ? 'blue' : buttonAccent}
+ variant="primary"
+ accent={buttonAccent}
to={to}
onClick={onClick}
disabled={disabled}
@@ -61,8 +65,8 @@ export const CommandMenuButton = ({
<IconButton
Icon={command.Icon}
size="small"
- variant={isPrimaryAction ? 'primary' : 'secondary'}
- accent={isPrimaryAction ? 'blue' : buttonAccent}
+ variant={buttonAccent === 'blue' ? 'primary' : 'tertiary'}
+ accent={buttonAccent}
to={to}
onClick={onClick}
disabled={disabled}
diff --git a/packages/twenty-front/src/modules/object-record/record-show/components/PageLayoutRecordPageRenderer.tsx b/packages/twenty-front/src/modules/object-record/record-show/components/PageLayoutRecordPageRenderer.tsx
index 01f13262739..13034b1e2a5 100644
--- a/packages/twenty-front/src/modules/object-record/record-show/components/PageLayoutRecordPageRenderer.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-show/components/PageLayoutRecordPageRenderer.tsx
@@ -1,5 +1,5 @@
import { RecordPageSidePanelCommandMenu } from '@/command-menu-item/components/RecordPageSidePanelCommandMenu';
-import { RecordShowSidePanelOpenRecordButton } from '@/command-menu-item/components/RecordShowSidePanelOpenRecordButton';
+import { RecordPageSidePanelPinnedCommandMenuItems } from '@/command-menu-item/components/RecordPageSidePanelPinnedCommandMenuItems';
import { InformationBannerDeletedRecord } from '@/information-banner/components/deleted-record/InformationBannerDeletedRecord';
import { RecordShowContainerContextStoreTargetedRecordsEffect } from '@/object-record/record-show/components/RecordShowContainerContextStoreTargetedRecordsEffect';
import { RecordShowEffect } from '@/object-record/record-show/components/RecordShowEffect';
@@ -67,6 +67,8 @@ export const PageLayoutRecordPageRenderer = ({
(commandMenuItem) => commandMenuItem.isPinned !== false,
);
+ // A widget that contributes footer actions, such as the email composer,
+ // supersedes the record's own actions rather than doubling up with them.
const hasPinnedWidgetCommandMenuItems =
pinnedWidgetCommandMenuItems.length > 0;
@@ -133,15 +135,7 @@ export const PageLayoutRecordPageRenderer = ({
disabled={commandMenuItem.disabled}
/>
))
- : [
- <RecordShowSidePanelOpenRecordButton
- key="open"
- objectNameSingular={
- targetRecordIdentifier.targetObjectNameSingular
- }
- recordId={targetRecordIdentifier.id}
- />,
- ]),
+ : [<RecordPageSidePanelPinnedCommandMenuItems key="pinned" />]),
]}
/>
)}
diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
deleted file mode 100644
index 574ad6762fa..00000000000
--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelExpandAiChatButton.tsx
+++ /dev/null
@@ -1,64 +0,0 @@
-import { useLingui } from '@lingui/react/macro';
-import { useLocation } from 'react-router-dom';
-import { AppPath, SidePanelPages } from 'twenty-shared/types';
-import { isDefined, isValidUuid } from 'twenty-shared/utils';
-import { IconLayoutSidebarRightExpand } from 'twenty-ui/icon';
-import { IconButton } from 'twenty-ui/input';
-import { useIsMobile } from 'twenty-ui/utilities';
-
-import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';
-import { useSidePanelMenu } from '@/side-panel/hooks/useSidePanelMenu';
-import { sidePanelPageState } from '@/side-panel/states/sidePanelPageState';
-import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
-import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
-import { FeatureFlagKey } from '~/generated-metadata/graphql';
-import { useNavigateApp } from '~/hooks/useNavigateApp';
-
-export const SidePanelExpandAiChatButton = () => {
- const { t } = useLingui();
- const navigateApp = useNavigateApp();
- const location = useLocation();
- const isMobile = useIsMobile();
- const sidePanelPage = useAtomStateValue(sidePanelPageState);
- const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);
- const { closeSidePanelMenu } = useSidePanelMenu();
- const isAiChatPageEnabled = useIsFeatureEnabled(
- FeatureFlagKey.IS_AI_CHAT_PAGE_ENABLED,
- );
-
- const isOnAskAiPage = sidePanelPage === SidePanelPages.AskAI;
-
- if (!isAiChatPageEnabled || isMobile || !isOnAskAiPage) {
- return null;
- }
-
- const handleClick = () => {
- void closeSidePanelMenu();
-
- navigateApp(
- AppPath.AiChat,
- {
- threadId:
- isDefined(currentAiChatThread) && isValidUuid(currentAiChatThread)
- ? currentAiChatThread
- : null,
- },
- undefined,
- {
- state: {
- returnLocation: `${location.pathname}${location.search}${location.hash}`,
- },
- },
- );
- };
-
- return (
- <IconButton
- Icon={IconLayoutSidebarRightExpand}
- size="small"
- variant="tertiary"
- onClick={handleClick}
- ariaLabel={t`Expand chat`}
- />
- );
-};
diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelExpandButton.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelExpandButton.tsx
new file mode 100644
index 00000000000..cb12d6a41b3
--- /dev/null
+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelExpandButton.tsx
@@ -0,0 +1,61 @@
+import { isNonEmptyString } from '@sniptt/guards';
+import { isDefined } from 'twenty-shared/utils';
+import { IconLayoutSidebarRightExpand } from 'twenty-ui/icon';
+import { IconButton } from 'twenty-ui/input';
+
+import { useSidePanelExpandTarget } from '@/side-panel/hooks/useSidePanelExpandTarget';
+import { SIDE_PANEL_FOCUS_ID } from '@/side-panel/constants/SidePanelFocusId';
+import { SidePanelPageComponentInstanceContext } from '@/side-panel/states/contexts/SidePanelPageComponentInstanceContext';
+import { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement';
+import { useComponentInstanceStateContext } from '@/ui/utilities/state/component-state/hooks/useComponentInstanceStateContext';
+
+// Registered only for targets that claim the shortcut, so pages whose content
+// owns cmd+enter keep it to themselves.
+const SidePanelExpandShortcutEffect = ({ expand }: { expand: () => void }) => {
+ useHotkeysOnFocusedElement({
+ keys: ['ctrl+Enter,meta+Enter'],
+ callback: expand,
+ focusId: SIDE_PANEL_FOCUS_ID,
+ dependencies: [expand],
+ });
+
+ return null;
+};
+
+const SidePanelExpandButtonContent = () => {
+ const expandTarget = useSidePanelExpandTarget();
+
+ if (!isDefined(expandTarget)) {
+ return null;
+ }
+
+ return (
+ <>
+ {expandTarget.hasExpandShortcut && (
+ <SidePanelExpandShortcutEffect expand={expandTarget.expand} />
+ )}
+ <IconButton
+ Icon={IconLayoutSidebarRightExpand}
+ size="small"
+ variant="tertiary"
+ onClick={expandTarget.expand}
+ ariaLabel={expandTarget.label}
+ />
+ </>
+ );
+};
+
+export const SidePanelExpandButton = () => {
+ const sidePanelPageInstanceId = useComponentInstanceStateContext(
+ SidePanelPageComponentInstanceContext,
+ )?.instanceId;
+
+ // Expand targets read state scoped to the side panel page. The context
+ // defaults to a blank instance id, which those reads reject, so match the
+ // condition they enforce rather than merely checking the context exists.
+ if (!isNonEmptyString(sidePanelPageInstanceId)) {
+ return null;
+ }
+
+ return <SidePanelExpandButtonContent />;
+};
diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelTopBar.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelTopBar.tsx
index 7c9000eab41..239d5228fa5 100644
--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelTopBar.tsx
+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelTopBar.tsx
@@ -1,7 +1,7 @@
import { SidePanelBackButton } from '@/side-panel/components/SidePanelBackButton';
import { SidePanelPageInfo } from '@/side-panel/components/SidePanelPageInfo';
import { SidePanelTopBarInputFocusEffect } from '@/side-panel/components/SidePanelTopBarInputFocusEffect';
-import { SidePanelExpandAiChatButton } from '@/side-panel/components/SidePanelExpandAiChatButton';
+import { SidePanelExpandButton } from '@/side-panel/components/SidePanelExpandButton';
import { SidePanelTopBarRightCornerIcon } from '@/side-panel/components/SidePanelTopBarRightCornerIcon';
import { COMMAND_MENU_SIDE_PANEL_PAGES } from '@/side-panel/constants/CommandMenuSidePanelPages';
import { SIDE_PANEL_FOCUS_ID } from '@/side-panel/constants/SidePanelFocusId';
@@ -212,12 +212,12 @@ export const SidePanelTopBar = () => {
</StyledContentContainer>
<StyledRightControlsContainer>
<SidePanelTopBarRightCornerIcon />
- <SidePanelExpandAiChatButton />
+ <SidePanelExpandButton />
{!shouldHideCloseButton && (
<IconButton
Icon={IconX}
size="small"
- variant="secondary"
+ variant="tertiary"
onClick={closeSidePanelMenu}
ariaLabel={t`Close side panel`}
/>
diff --git a/packages/twenty-front/src/modules/side-panel/components/__tests__/SidePanelTopBar.test.tsx b/packages/twenty-front/src/modules/side-panel/components/__tests__/SidePanelTopBar.test.tsx
index 357f51edb3f..fed3987aba5 100644
--- a/packages/twenty-front/src/modules/side-panel/components/__tests__/SidePanelTopBar.test.tsx
+++ b/packages/twenty-front/src/modules/side-panel/components/__tests__/SidePanelTopBar.test.tsx
@@ -28,8 +28,8 @@ jest.mock('@/side-panel/components/SidePanelTopBarRightCornerIcon', () => ({
SidePanelTopBarRightCornerIcon: () => null,
}));
-jest.mock('@/side-panel/components/SidePanelExpandAiChatButton', () => ({
- SidePanelExpandAiChatButton: () => null,
+jest.mock('@/side-panel/components/SidePanelExpandButton', () => ({
+ SidePanelExpandButton: () => null,
}));
const mockCloseSidePanelMenu = jest.fn();
diff --git a/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useSidePanelExpandTarget.test.tsx b/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useSidePanelExpandTarget.test.tsx
new file mode 100644
index 00000000000..3939e5235e7
--- /dev/null
+++ b/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useSidePanelExpandTarget.test.tsx
@@ -0,0 +1,139 @@
+import { renderHook } from '@testing-library/react';
+import { Provider as JotaiProvider } from 'jotai';
+import { type ReactNode } from 'react';
+import { SidePanelPages } from 'twenty-shared/types';
+
+import { useSidePanelExpandTarget } from '@/side-panel/hooks/useSidePanelExpandTarget';
+import { sidePanelPageState } from '@/side-panel/states/sidePanelPageState';
+import { type SidePanelExpandTarget } from '@/side-panel/types/SidePanelExpandTarget';
+import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';
+
+const mockAskAiExpandTarget: SidePanelExpandTarget = {
+ label: 'Expand chat',
+ hasExpandShortcut: true,
+ expand: jest.fn(),
+};
+
+const mockRecordExpandTarget: SidePanelExpandTarget = {
+ label: 'Expand record',
+ hasExpandShortcut: true,
+ expand: jest.fn(),
+};
+
+const mockRecordsExpandTarget: SidePanelExpandTarget = {
+ label: 'Expand view',
+ hasExpandShortcut: true,
+ expand: jest.fn(),
+};
+
+const mockRichTextExpandTarget: SidePanelExpandTarget = {
+ label: 'Expand record',
+ hasExpandShortcut: true,
+ expand: jest.fn(),
+};
+
+let mockHasSidePanelSubPages = false;
+let mockIsMobile = false;
+
+jest.mock('twenty-ui/utilities', () => ({
+ ...jest.requireActual('twenty-ui/utilities'),
+ useIsMobile: () => mockIsMobile,
+}));
+
+jest.mock(
+ '@/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage',
+ () => ({
+ useExpandAskAiSidePanelPage: () => mockAskAiExpandTarget,
+ }),
+);
+
+jest.mock(
+ '@/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage',
+ () => ({
+ useExpandRecordSidePanelPage: () => mockRecordExpandTarget,
+ }),
+);
+
+jest.mock(
+ '@/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage',
+ () => ({
+ useExpandRecordsSidePanelPage: () => mockRecordsExpandTarget,
+ }),
+);
+
+jest.mock(
+ '@/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage',
+ () => ({
+ useExpandRichTextSidePanelPage: () => mockRichTextExpandTarget,
+ }),
+);
+
+jest.mock('@/side-panel/hooks/useSidePanelSubPageHistory', () => ({
+ useSidePanelSubPageHistory: () => ({
+ hasSidePanelSubPages: mockHasSidePanelSubPages,
+ }),
+}));
+
+const wrapper = ({ children }: { children: ReactNode }) => (
+ <JotaiProvider store={jotaiStore}>{children}</JotaiProvider>
+);
+
+const renderExpandTarget = (sidePanelPage: SidePanelPages) => {
+ jotaiStore.set(sidePanelPageState.atom, sidePanelPage);
+
+ return renderHook(() => useSidePanelExpandTarget(), { wrapper });
+};
+
+describe('useSidePanelExpandTarget', () => {
+ beforeEach(() => {
+ mockHasSidePanelSubPages = false;
+ mockIsMobile = false;
+ jest.clearAllMocks();
+ });
+
+ it('should return the ask ai target when the ask ai page is open', () => {
+ const { result } = renderExpandTarget(SidePanelPages.AskAI);
+
+ expect(result.current).toBe(mockAskAiExpandTarget);
+ });
+
+ it('should return the record target when a record page is open', () => {
+ const { result } = renderExpandTarget(SidePanelPages.ViewRecord);
+
+ expect(result.current).toBe(mockRecordExpandTarget);
+ });
+
+ it('should return the records target when a records page is open', () => {
+ const { result } = renderExpandTarget(SidePanelPages.ViewRecords);
+
+ expect(result.current).toBe(mockRecordsExpandTarget);
+ });
+
+ it('should return the rich text target when a rich text page is open', () => {
+ const { result } = renderExpandTarget(SidePanelPages.EditRichText);
+
+ expect(result.current).toBe(mockRichTextExpandTarget);
+ });
+
+ it('should return null when the page has no full page equivalent', () => {
+ const { result } = renderExpandTarget(SidePanelPages.SearchRecords);
+
+ expect(result.current).toBeNull();
+ });
+
+ it('should return null when a sub page has taken over the panel', () => {
+ mockHasSidePanelSubPages = true;
+
+ const { result } = renderExpandTarget(SidePanelPages.ViewRecord);
+
+ expect(result.current).toBeNull();
+ });
+
+ it('should return null on mobile where the panel already fills the viewport', () => {
+ mockIsMobile = true;
+
+ const { result } = renderExpandTarget(SidePanelPages.ViewRecord);
+
+ expect(result.current).toBeNull();
+ });
+});
diff --git a/packages/twenty-front/src/modules/side-panel/hooks/useSidePanelExpandTarget.ts b/packages/twenty-front/src/modules/side-panel/hooks/useSidePanelExpandTarget.ts
new file mode 100644
index 00000000000..a3200164ce1
--- /dev/null
+++ b/packages/twenty-front/src/modules/side-panel/hooks/useSidePanelExpandTarget.ts
@@ -0,0 +1,42 @@
+import { SidePanelPages } from 'twenty-shared/types';
+import { useIsMobile } from 'twenty-ui/utilities';
+
+import { useSidePanelSubPageHistory } from '@/side-panel/hooks/useSidePanelSubPageHistory';
+import { useExpandAskAiSidePanelPage } from '@/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage';
+import { useExpandRecordSidePanelPage } from '@/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage';
+import { useExpandRecordsSidePanelPage } from '@/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage';
+import { useExpandRichTextSidePanelPage } from '@/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage';
+import { sidePanelPageState } from '@/side-panel/states/sidePanelPageState';
+import { type SidePanelExpandTarget } from '@/side-panel/types/SidePanelExpandTarget';
+import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
+
+export const useSidePanelExpandTarget = (): SidePanelExpandTarget | null => {
+ const sidePanelPage = useAtomStateValue(sidePanelPageState);
+ const { hasSidePanelSubPages } = useSidePanelSubPageHistory();
+ const isMobile = useIsMobile();
+
+ const askAiExpandTarget = useExpandAskAiSidePanelPage();
+ const recordExpandTarget = useExpandRecordSidePanelPage();
+ const recordsExpandTarget = useExpandRecordsSidePanelPage();
+ const richTextExpandTarget = useExpandRichTextSidePanelPage();
+
+ // On mobile the panel already fills the viewport, so there is nothing to
+ // expand into. A sub page has taken over the panel content, so expanding the
+ // page underneath it would discard what the user is currently doing.
+ if (isMobile || hasSidePanelSubPages) {
+ return null;
+ }
+
+ switch (sidePanelPage) {
+ case SidePanelPages.AskAI:
+ return askAiExpandTarget;
+ case SidePanelPages.ViewRecord:
+ return recordExpandTarget;
+ case SidePanelPages.ViewRecords:
+ return recordsExpandTarget;
+ case SidePanelPages.EditRichText:
+ return richTextExpandTarget;
+ default:
+ return null;
+ }
+};
diff --git a/packages/twenty-front/src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts b/packages/twenty-front/src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
new file mode 100644
index 00000000000..21a2b072a13
--- /dev/null
+++ b/packages/twenty-front/src/modules/side-panel/pages/ask-ai/hooks/useExpandAskAiSidePanelPage.ts
@@ -0,0 +1,42 @@
+import { useLingui } from '@lingui/react/macro';
+import { useLocation } from 'react-router-dom';
+import { AppPath } from 'twenty-shared/types';
+import { isDefined, isValidUuid } from 'twenty-shared/utils';
+
+import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';
+import { useSidePanelMenu } from '@/side-panel/hooks/useSidePanelMenu';
+import { type SidePanelExpandTarget } from '@/side-panel/types/SidePanelExpandTarget';
+import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
+import { useNavigateApp } from '~/hooks/useNavigateApp';
+
+export const useExpandAskAiSidePanelPage = (): SidePanelExpandTarget => {
+ const { t } = useLingui();
+ const navigate = useNavigateApp();
+ const location = useLocation();
+ const currentAiChatThread = useAtomStateValue(currentAiChatThreadState);
+ const { closeSidePanelMenu } = useSidePanelMenu();
+
+ return {
+ label: t`Expand chat`,
+ hasExpandShortcut: false,
+ expand: () => {
+ void closeSidePanelMenu();
+
+ navigate(
+ AppPath.AiChat,
+ {
+ threadId:
+ isDefined(currentAiChatThread) && isValidUuid(currentAiChatThread)
+ ? currentAiChatThread
+ : null,
+ },
+ undefined,
+ {
+ state: {
+ returnLocation: `${location.pathname}${location.search}${location.hash}`,
+ },
+ },
+ );
+ },
+ };
+};
diff --git a/packages/twenty-front/src/modules/side-panel/pages/record-page/hooks/__tests__/useNavigateToRecordPageFromSidePanel.test.tsx b/packages/twenty-front/src/modules/side-panel/pages/record-page/hooks/__tests__/useNavigateToRecordPageFromSidePanel.test.tsx
new file mode 100644
index 00000000000..dd61c37cbe0
--- /dev/null
+++ b/packages/twenty-front/src/modules/side-panel/pages/record-page/hooks/__tests__/useNavigateToRecordPageFromSidePanel.test.tsx
@@ -0,0 +1,239 @@
+import { renderHook } from '@testing-library/react';
+import { act, type ReactNode } from 'react';
+import { type Store } from 'jotai/vanilla/store';
+import { AppPath, CoreObjectNameSingular } from 'twenty-shared/types';
+
+import { MAIN_CONTEXT_STORE_INSTANCE_ID } from '@/context-store/constants/MainContextStoreInstanceId';
+import { contextStoreRecordShowParentViewComponentState } from '@/context-store/states/contextStoreRecordShowParentViewComponentState';
+import { useNavigateToRecordPageFromSidePanel } from '@/side-panel/pages/record-page/hooks/useNavigateToRecordPageFromSidePanel';
+import { SidePanelPageComponentInstanceContext } from '@/side-panel/states/contexts/SidePanelPageComponentInstanceContext';
+import { sidePanelNavigationStackState } from '@/side-panel/states/sidePanelNavigationStackState';
+import { getShowPageTabListComponentId } from '@/ui/layout/show-page/utils/getShowPageTabListComponentId';
+import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';
+import { getJestMetadataAndApolloMocksWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksWrapper';
+
+const navigateAppMock = jest.fn();
+const closeSidePanelMenuMock = jest.fn();
+const closeDropdownMock = jest.fn();
+
+jest.mock('~/hooks/useNavigateApp', () => ({
+ useNavigateApp: () => navigateAppMock,
+}));
+
+jest.mock('@/side-panel/hooks/useSidePanelMenu', () => ({
+ useSidePanelMenu: () => ({
+ closeSidePanelMenu: closeSidePanelMenuMock,
+ }),
+}));
+
+jest.mock('@/ui/layout/dropdown/hooks/useCloseDropdown', () => ({
+ useCloseDropdown: () => ({ closeDropdown: closeDropdownMock }),
+}));
+
+const PAGE_INSTANCE_ID = 'side-panel-page-instance-id';
+const RECORD_ID = 'b1c2d3e4-0000-4000-8000-000000000000';
+
+const getSidePanelTabListId = () =>
+ getShowPageTabListComponentId({
+ pageId: PAGE_INSTANCE_ID,
+ targetObjectId: RECORD_ID,
+ });
+
+const getRecordPageTabListId = () =>
+ getShowPageTabListComponentId({ targetObjectId: RECORD_ID });
+
+const renderNavigateToRecordPage = ({
+ activeTabIdInSidePanel,
+ parentView,
+}: {
+ activeTabIdInSidePanel: string | null;
+ parentView?: { parentViewObjectNameSingular: string };
+}) => {
+ let store: Store;
+
+ const BaseWrapper = getJestMetadataAndApolloMocksWrapper({
+ apolloMocks: [],
+ onInitializeJotaiStore: (initializedStore) => {
+ store = initializedStore;
+
+ initializedStore.set(
+ activeTabIdComponentState.atomFamily({
+ instanceId: getSidePanelTabListId(),
+ }),
+ activeTabIdInSidePanel,
+ );
+
+ if (parentView !== undefined) {
+ initializedStore.set(
+ contextStoreRecordShowParentViewComponentState.atomFamily({
+ instanceId: MAIN_CONTEXT_STORE_INSTANCE_ID,
+ }),
+ parentView as never,
+ );
+ }
+ },
+ });
+
+ const wrapper = ({ children }: { children: ReactNode }) => (
+ <BaseWrapper>
+ <SidePanelPageComponentInstanceContext.Provider
+ value={{ instanceId: PAGE_INSTANCE_ID }}
+ >
+ {children}
+ </SidePanelPageComponentInstanceContext.Provider>
+ </BaseWrapper>
+ );
+
+ const { result } = renderHook(() => useNavigateToRecordPageFromSidePanel(), {
+ wrapper,
+ });
+
+ return { result, getStore: () => store };
+};
+
+describe('useNavigateToRecordPageFromSidePanel', () => {
+ beforeEach(() => {
+ jest.clearAllMocks();
+ });
+
+ it('should carry the side panel active tab over to the record page', () => {
+ const { result, getStore } = renderNavigateToRecordPage({
+ activeTabIdInSidePanel: 'files',
+ });
+
+ act(() => {
+ result.current.navigateToRecordPage({
+ objectNameSingular: CoreObjectNameSingular.Company,
+ recordId: RECORD_ID,
+ });
+ });
+
+ expect(
+ getStore().get(
+ activeTabIdComponentState.atomFamily({
+ instanceId: getRecordPageTabListId(),
+ }),
+ ),
+ ).toBe('files');
+
+ expect(navigateAppMock).toHaveBeenCalledWith(AppPath.RecordShowPage, {
+ objectNameSingular: CoreObjectNameSingular.Company,
+ objectRecordId: RECORD_ID,
+ });
+ expect(closeSidePanelMenuMock).toHaveBeenCalled();
+ });
+
+ it('should open the timeline tab when the side panel is on its home tab', () => {
+ const { result, getStore } = renderNavigateToRecordPage({
+ activeTabIdInSidePanel: 'home',
+ });
+
+ act(() => {
+ result.current.navigateToRecordPage({
+ objectNameSingular: CoreObjectNameSingular.Company,
+ recordId: RECORD_ID,
+ });
+ });
+
+ expect(
+ getStore().get(
+ activeTabIdComponentState.atomFamily({
+ instanceId: getRecordPageTabListId(),
+ }),
+ ),
+ ).toBe('timeline');
+ });
+
+ it.each([CoreObjectNameSingular.Note, CoreObjectNameSingular.Task])(
+ 'should open the rich text tab for %s when the side panel is on its home tab',
+ (objectNameSingular) => {
+ const { result, getStore } = renderNavigateToRecordPage({
+ activeTabIdInSidePanel: 'home',
+ });
+
+ act(() => {
+ result.current.navigateToRecordPage({
+ objectNameSingular,
+ recordId: RECORD_ID,
+ });
+ });
+
+ expect(
+ getStore().get(
+ activeTabIdComponentState.atomFamily({
+ instanceId: getRecordPageTabListId(),
+ }),
+ ),
+ ).toBe('richText');
+ },
+ );
+
+ it('should clear the parent view when it belongs to another object', () => {
+ const { result, getStore } = renderNavigateToRecordPage({
+ activeTabIdInSidePanel: 'home',
+ parentView: {
+ parentViewObjectNameSingular: CoreObjectNameSingular.Person,
+ },
+ });
+
+ act(() => {
+ result.current.navigateToRecordPage({
+ objectNameSingular: CoreObjectNameSingular.Company,
+ recordId: RECORD_ID,
+ });
+ });
+
+ expect(
+ getStore().get(
+ contextStoreRecordShowParentViewComponentState.atomFamily({
+ instanceId: MAIN_CONTEXT_STORE_INSTANCE_ID,
+ }),
+ ),
+ ).toBeUndefined();
+ });
+
+ it('should keep the parent view when it belongs to the same object', () => {
+ const parentView = {
+ parentViewObjectNameSingular: CoreObjectNameSingular.Company,
+ };
+
+ const { result, getStore } = renderNavigateToRecordPage({
+ activeTabIdInSidePanel: 'home',
+ parentView,
+ });
+
+ act(() => {
+ result.current.navigateToRecordPage({
+ objectNameSingular: CoreObjectNameSingular.Company,
+ recordId: RECORD_ID,
+ });
+ });
+
+ expect(
+ getStore().get(
+ contextStoreRecordShowParentViewComponentState.atomFamily({
+ instanceId: MAIN_CONTEXT_STORE_INSTANCE_ID,
+ }),
+ ),
+ ).toMatchObject(parentView);
+ });
+
+ it('should reset the side panel navigation stack', () => {
+ const { result, getStore } = renderNavigateToRecordPage({
+ activeTabIdInSidePanel: 'home',
+ });
+
+ getStore().set(sidePanelNavigationStackState.atom, [
+ { page: 'view-record', pageTitle: 'Company', pageId: 'x' },
+ ] as never);
+
+ act(() => {
+ result.current.navigateToRecordPage({
+ objectNameSingular: CoreObjectNameSingular.Company,
+ recordId: RECORD_ID,
+ });
+ });
+
+ expect(getStore().get(sidePanelNavigationStackState.atom)).toEqual([]);
+ });
+});
diff --git a/packages/twenty-front/src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts b/packages/twenty-front/src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
new file mode 100644
index 00000000000..4bdfb577e95
--- /dev/null
+++ b/packages/twenty-front/src/modules/side-panel/pages/record-page/hooks/useExpandRecordSidePanelPage.ts
@@ -0,0 +1,40 @@
+import { useLingui } from '@lingui/react/macro';
+import { isDefined } from 'twenty-shared/utils';
+
+import { useNavigateToRecordPageFromSidePanel } from '@/side-panel/pages/record-page/hooks/useNavigateToRecordPageFromSidePanel';
+import { viewableRecordIdComponentState } from '@/side-panel/pages/record-page/states/viewableRecordIdComponentState';
+import { viewableRecordNameSingularComponentState } from '@/side-panel/pages/record-page/states/viewableRecordNameSingularComponentState';
+import { type SidePanelExpandTarget } from '@/side-panel/types/SidePanelExpandTarget';
+import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
+
+export const useExpandRecordSidePanelPage =
+ (): SidePanelExpandTarget | null => {
+ const { t } = useLingui();
+
+ const viewableRecordId = useAtomComponentStateValue(
+ viewableRecordIdComponentState,
+ );
+
+ const viewableRecordNameSingular = useAtomComponentStateValue(
+ viewableRecordNameSingularComponentState,
+ );
+
+ const { navigateToRecordPage } = useNavigateToRecordPageFromSidePanel();
+
+ if (
+ !isDefined(viewableRecordId) ||
+ !isDefined(viewableRecordNameSingular)
+ ) {
+ return null;
+ }
+
+ return {
+ label: t`Expand record`,
+ hasExpandShortcut: true,
+ expand: () =>
+ navigateToRecordPage({
+ objectNameSingular: viewableRecordNameSingular,
+ recordId: viewableRecordId,
+ }),
+ };
+ };
diff --git a/packages/twenty-front/src/modules/side-panel/pages/record-page/hooks/useNavigateToRecordPageFromSidePanel.ts b/packages/twenty-front/src/modules/side-panel/pages/record-page/hooks/useNavigateToRecordPageFromSidePanel.ts
new file mode 100644
index 00000000000..8118ddfd4e8
--- /dev/null
+++ b/packages/twenty-front/src/modules/side-panel/pages/record-page/hooks/useNavigateToRecordPageFromSidePanel.ts
@@ -0,0 +1,104 @@
+import { useStore } from 'jotai';
+import { useCallback } from 'react';
+import { AppPath, CoreObjectNameSingular } from 'twenty-shared/types';
+import { isDefined } from 'twenty-shared/utils';
+
+import { getSidePanelCommandMenuDropdownIdFromCommandMenuId } from '@/command-menu-item/utils/getSidePanelCommandMenuDropdownIdFromCommandMenuId';
+import { MAIN_CONTEXT_STORE_INSTANCE_ID } from '@/context-store/constants/MainContextStoreInstanceId';
+import { contextStoreRecordShowParentViewComponentState } from '@/context-store/states/contextStoreRecordShowParentViewComponentState';
+import { useSidePanelMenu } from '@/side-panel/hooks/useSidePanelMenu';
+import { SidePanelPageComponentInstanceContext } from '@/side-panel/states/contexts/SidePanelPageComponentInstanceContext';
+import { sidePanelNavigationStackState } from '@/side-panel/states/sidePanelNavigationStackState';
+import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';
+import { getShowPageTabListComponentId } from '@/ui/layout/show-page/utils/getShowPageTabListComponentId';
+import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';
+import { useComponentInstanceStateContext } from '@/ui/utilities/state/component-state/hooks/useComponentInstanceStateContext';
+import { useAtomComponentStateCallbackState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateCallbackState';
+import { useNavigateApp } from '~/hooks/useNavigateApp';
+
+type NavigateToRecordPageParams = {
+ objectNameSingular: string;
+ recordId: string;
+};
+
+export const useNavigateToRecordPageFromSidePanel = () => {
+ const store = useStore();
+ const navigate = useNavigateApp();
+ const { closeSidePanelMenu } = useSidePanelMenu();
+ const { closeDropdown } = useCloseDropdown();
+
+ const sidePanelPageInstanceId = useComponentInstanceStateContext(
+ SidePanelPageComponentInstanceContext,
+ )?.instanceId;
+
+ const parentViewState = useAtomComponentStateCallbackState(
+ contextStoreRecordShowParentViewComponentState,
+ MAIN_CONTEXT_STORE_INSTANCE_ID,
+ );
+
+ const navigateToRecordPage = useCallback(
+ ({ objectNameSingular, recordId }: NavigateToRecordPageParams) => {
+ const activeTabId = store.get(
+ activeTabIdComponentState.atomFamily({
+ instanceId: getShowPageTabListComponentId({
+ pageId: sidePanelPageInstanceId,
+ targetObjectId: recordId,
+ }),
+ }),
+ );
+
+ const tabIdToOpen =
+ activeTabId === 'home'
+ ? objectNameSingular === CoreObjectNameSingular.Note ||
+ objectNameSingular === CoreObjectNameSingular.Task
+ ? 'richText'
+ : 'timeline'
+ : activeTabId;
+
+ store.set(
+ activeTabIdComponentState.atomFamily({
+ instanceId: getShowPageTabListComponentId({
+ targetObjectId: recordId,
+ }),
+ }),
+ tabIdToOpen,
+ );
+
+ const parentView = store.get(parentViewState);
+
+ if (
+ isDefined(parentView) &&
+ parentView.parentViewObjectNameSingular !== objectNameSingular
+ ) {
+ store.set(parentViewState, undefined);
+ }
+
+ store.set(sidePanelNavigationStackState.atom, []);
+
+ navigate(AppPath.RecordShowPage, {
+ objectNameSingular,
+ objectRecordId: recordId,
+ });
+
+ if (isDefined(sidePanelPageInstanceId)) {
+ closeDropdown(
+ getSidePanelCommandMenuDropdownIdFromCommandMenuId(
+ sidePanelPageInstanceId,
+ ),
+ );
+ }
+
+ void closeSidePanelMenu();
+ },
+ [
+ closeDropdown,
+ closeSidePanelMenu,
+ navigate,
+ parentViewState,
+ sidePanelPageInstanceId,
+ store,
+ ],
+ );
+
+ return { navigateToRecordPage };
+};
diff --git a/packages/twenty-front/src/modules/side-panel/pages/records-page/hooks/__tests__/useExpandRecordsSidePanelPage.test.tsx b/packages/twenty-front/src/modules/side-panel/pages/records-page/hooks/__tests__/useExpandRecordsSidePanelPage.test.tsx
new file mode 100644
index 00000000000..5879d6b23c2
--- /dev/null
+++ b/packages/twenty-front/src/modules/side-panel/pages/records-page/hooks/__tests__/useExpandRecordsSidePanelPage.test.tsx
@@ -0,0 +1,121 @@
+import { i18n } from '@lingui/core';
+import { I18nProvider } from '@lingui/react';
+import { renderHook } from '@testing-library/react';
+import { act, type ReactNode } from 'react';
+import { AppPath } from 'twenty-shared/types';
+
+import { useExpandRecordsSidePanelPage } from '@/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage';
+import { viewableRecordsObjectMetadataIdComponentState } from '@/side-panel/pages/records-page/states/viewableRecordsObjectMetadataIdComponentState';
+import { viewableRecordsViewIdComponentState } from '@/side-panel/pages/records-page/states/viewableRecordsViewIdComponentState';
+import { SidePanelPageComponentInstanceContext } from '@/side-panel/states/contexts/SidePanelPageComponentInstanceContext';
+import { getJestMetadataAndApolloMocksWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksWrapper';
+import { getMockObjectMetadataItemOrThrow } from '~/testing/utils/getMockObjectMetadataItemOrThrow';
+
+const navigateAppMock = jest.fn();
+const closeSidePanelMenuMock = jest.fn();
+
+jest.mock('~/hooks/useNavigateApp', () => ({
+ useNavigateApp: () => navigateAppMock,
+}));
+
+jest.mock('@/side-panel/hooks/useSidePanelMenu', () => ({
+ useSidePanelMenu: () => ({
+ closeSidePanelMenu: closeSidePanelMenuMock,
+ }),
+}));
+
+const PAGE_INSTANCE_ID = 'side-panel-page-instance-id';
+const VIEW_ID = '11111111-1111-4111-8111-111111111111';
+
+const companyObjectMetadataItem = getMockObjectMetadataItemOrThrow('company');
+
+const renderExpandRecordsSidePanelPage = ({
+ objectMetadataId,
+ viewId,
+}: {
+ objectMetadataId: string | null;
+ viewId: string | null;
+}) => {
+ const BaseWrapper = getJestMetadataAndApolloMocksWrapper({
+ apolloMocks: [],
+ onInitializeJotaiStore: (store) => {
+ store.set(
+ viewableRecordsObjectMetadataIdComponentState.atomFamily({
+ instanceId: PAGE_INSTANCE_ID,
+ }),
+ objectMetadataId,
+ );
+ store.set(
+ viewableRecordsViewIdComponentState.atomFamily({
+ instanceId: PAGE_INSTANCE_ID,
+ }),
+ viewId,
+ );
+ },
+ });
+
+ const wrapper = ({ children }: { children: ReactNode }) => (
+ <BaseWrapper>
+ <I18nProvider i18n={i18n}>
+ <SidePanelPageComponentInstanceContext.Provider
+ value={{ instanceId: PAGE_INSTANCE_ID }}
+ >
+ {children}
+ </SidePanelPageComponentInstanceContext.Provider>
+ </I18nProvider>
+ </BaseWrapper>
+ );
+
+ return renderHook(() => useExpandRecordsSidePanelPage(), { wrapper });
+};
+
+describe('useExpandRecordsSidePanelPage', () => {
+ beforeEach(() => {
+ jest.clearAllMocks();
+ });
+
+ it('should expand to the record index page of the displayed view', () => {
+ const { result } = renderExpandRecordsSidePanelPage({
+ objectMetadataId: companyObjectMetadataItem.id,
+ viewId: VIEW_ID,
+ });
+
+ act(() => {
+ result.current?.expand();
+ });
+
+ expect(navigateAppMock).toHaveBeenCalledWith(
+ AppPath.RecordIndexPage,
+ { objectNamePlural: companyObjectMetadataItem.namePlural },
+ { viewId: VIEW_ID },
+ );
+ expect(closeSidePanelMenuMock).toHaveBeenCalled();
+ });
+
+ it('should not expand when the object metadata is unknown', () => {
+ const { result } = renderExpandRecordsSidePanelPage({
+ objectMetadataId: 'a2b3c4d5-0000-4000-8000-000000000000',
+ viewId: VIEW_ID,
+ });
+
+ expect(result.current).toBeNull();
+ });
+
+ it('should not expand when no view is displayed', () => {
+ const { result } = renderExpandRecordsSidePanelPage({
+ objectMetadataId: companyObjectMetadataItem.id,
+ viewId: null,
+ });
+
+ expect(result.current).toBeNull();
+ });
+
+ it('should not expand when the view id is empty', () => {
+ const { result } = renderExpandRecordsSidePanelPage({
+ objectMetadataId: companyObjectMetadataItem.id,
+ viewId: '',
+ });
+
+ expect(result.current).toBeNull();
+ });
+});
diff --git a/packages/twenty-front/src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts b/packages/twenty-front/src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
new file mode 100644
index 00000000000..6304e3a182a
--- /dev/null
+++ b/packages/twenty-front/src/modules/side-panel/pages/records-page/hooks/useExpandRecordsSidePanelPage.ts
@@ -0,0 +1,57 @@
+import { useLingui } from '@lingui/react/macro';
+import { isNonEmptyString } from '@sniptt/guards';
+import { AppPath } from 'twenty-shared/types';
+import { isDefined } from 'twenty-shared/utils';
+
+import { objectMetadataItemsByIdMapSelector } from '@/object-metadata/states/objectMetadataItemsByIdMapSelector';
+import { useSidePanelMenu } from '@/side-panel/hooks/useSidePanelMenu';
+import { viewableRecordsObjectMetadataIdComponentState } from '@/side-panel/pages/records-page/states/viewableRecordsObjectMetadataIdComponentState';
+import { viewableRecordsViewIdComponentState } from '@/side-panel/pages/records-page/states/viewableRecordsViewIdComponentState';
+import { type SidePanelExpandTarget } from '@/side-panel/types/SidePanelExpandTarget';
+import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
+import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
+import { useNavigateApp } from '~/hooks/useNavigateApp';
+
+export const useExpandRecordsSidePanelPage =
+ (): SidePanelExpandTarget | null => {
+ const { t } = useLingui();
+ const navigate = useNavigateApp();
+ const { closeSidePanelMenu } = useSidePanelMenu();
+
+ const viewableRecordsObjectMetadataId = useAtomComponentStateValue(
+ viewableRecordsObjectMetadataIdComponentState,
+ );
+
+ const viewableRecordsViewId = useAtomComponentStateValue(
+ viewableRecordsViewIdComponentState,
+ );
+
+ const objectMetadataItemsByIdMap = useAtomStateValue(
+ objectMetadataItemsByIdMapSelector,
+ );
+
+ const objectMetadataItem = isDefined(viewableRecordsObjectMetadataId)
+ ? objectMetadataItemsByIdMap.get(viewableRecordsObjectMetadataId)
+ : undefined;
+
+ if (
+ !isDefined(objectMetadataItem) ||
+ !isNonEmptyString(viewableRecordsViewId)
+ ) {
+ return null;
+ }
+
+ return {
+ label: t`Expand view`,
+ hasExpandShortcut: true,
+ expand: () => {
+ navigate(
+ AppPath.RecordIndexPage,
+ { objectNamePlural: objectMetadataItem.namePlural },
+ { viewId: viewableRecordsViewId },
+ );
+
+ void closeSidePanelMenu();
+ },
+ };
+ };
diff --git a/packages/twenty-front/src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts b/packages/twenty-front/src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
new file mode 100644
index 00000000000..fe8f7ca7594
--- /dev/null
+++ b/packages/twenty-front/src/modules/side-panel/pages/rich-text-page/hooks/useExpandRichTextSidePanelPage.ts
@@ -0,0 +1,28 @@
+import { useLingui } from '@lingui/react/macro';
+import { isNonEmptyString } from '@sniptt/guards';
+
+import { useNavigateToRecordPageFromSidePanel } from '@/side-panel/pages/record-page/hooks/useNavigateToRecordPageFromSidePanel';
+import { viewableRichTextComponentState } from '@/side-panel/pages/rich-text-page/states/viewableRichTextComponentState';
+import { type SidePanelExpandTarget } from '@/side-panel/types/SidePanelExpandTarget';
+import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
+
+export const useExpandRichTextSidePanelPage =
+ (): SidePanelExpandTarget | null => {
+ const { t } = useLingui();
+
+ const { recordId, objectNameSingular } = useAtomStateValue(
+ viewableRichTextComponentState,
+ );
+
+ const { navigateToRecordPage } = useNavigateToRecordPageFromSidePanel();
+
+ if (!isNonEmptyString(recordId) || !isNonEmptyString(objectNameSingular)) {
+ return null;
+ }
+
+ return {
+ label: t`Expand record`,
+ hasExpandShortcut: true,
+ expand: () => navigateToRecordPage({ objectNameSingular, recordId }),
+ };
+ };
diff --git a/packages/twenty-front/src/modules/side-panel/types/SidePanelExpandTarget.ts b/packages/twenty-front/src/modules/side-panel/types/SidePanelExpandTarget.ts
new file mode 100644
index 00000000000..45fed7a724d
--- /dev/null
+++ b/packages/twenty-front/src/modules/side-panel/types/SidePanelExpandTarget.ts
@@ -0,0 +1,9 @@
+// A side panel page declares how it expands into its full page equivalent.
+// `expand` is deliberately opaque so a page can navigate to a route, open a
+// full screen overlay, or anything else, without the top bar knowing.
+export type SidePanelExpandTarget = {
+ label: string;
+ expand: () => void;
+ // Pages whose content owns cmd+enter, such as a composer, decline it.
+ hasExpandShortcut: boolean;
+};
diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/OptionsDropdownMenu.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/OptionsDropdownMenu.tsx
index 01cafb3cffd..d283d505afe 100644
--- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/OptionsDropdownMenu.tsx
+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/OptionsDropdownMenu.tsx
@@ -8,8 +8,8 @@ import { useSelectableList } from '@/ui/layout/selectable-list/hooks/useSelectab
import { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement';
import { useLingui } from '@lingui/react/macro';
import { type ReactNode, useId } from 'react';
-import { Button } from 'twenty-ui/input';
-import { getOsControlSymbol } from 'twenty-ui/utilities';
+import { IconDotsVertical } from 'twenty-ui/icon';
+import { IconButton } from 'twenty-ui/input';
type OptionsDropdownMenuProps = {
dropdownId?: string;
@@ -66,10 +66,11 @@ export const OptionsDropdownMenu = ({
dropdownId={dropdownId}
data-select-disable
clickableComponent={
- <Button
- title={t`Options`}
- hotkeys={[getOsControlSymbol(), 'O']}
+ <IconButton
+ Icon={IconDotsVertical}
+ ariaLabel={t`Options`}
size="small"
+ variant="tertiary"
/>
}
dropdownPlacement="top-end"
diff --git a/packages/twenty-front/src/pages/ai-chat/AiChatPage.tsx b/packages/twenty-front/src/pages/ai-chat/AiChatPage.tsx
index d3bdfc14c56..9638d3aee1f 100644
--- a/packages/twenty-front/src/pages/ai-chat/AiChatPage.tsx
+++ b/packages/twenty-front/src/pages/ai-chat/AiChatPage.tsx
@@ -1,5 +1,4 @@
import { styled } from '@linaria/react';
-import { Navigate } from 'react-router-dom';
import { themeCssVariables } from 'twenty-ui/theme-constants';
import { AiChatPageCloseAskAiPanelEffect } from '@/ai/components/AiChatPageCloseAskAiPanelEffect';
@@ -8,13 +7,10 @@ import { AiChatPageHeader } from '@/ai/components/AiChatPageHeader';
import { AiChatPageThreadUrlSyncEffect } from '@/ai/components/AiChatPageThreadUrlSyncEffect';
import { AiChatTab } from '@/ai/components/AiChatTab';
import { AiChatMessageListPreambleContext } from '@/ai/contexts/AiChatMessageListPreambleContext';
-import { useDefaultHomePagePath } from '@/navigation/hooks/useDefaultHomePagePath';
import { WorkspaceSetupChatPreamble } from '@/onboarding/components/WorkspaceSetupChatPreamble';
import { WorkspaceSetupChatKickoffEffect } from '@/onboarding/effect-components/WorkspaceSetupChatKickoffEffect';
import { shouldOpenAiChatAfterOnboardingState } from '@/onboarding/states/shouldOpenAiChatAfterOnboardingState';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
-import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
-import { FeatureFlagKey } from '~/generated-metadata/graphql';
const PANEL_CORNER_RADIUS_DERIVED_FROM_THEME_SCALE = `calc(${themeCssVariables.border.radius.md} + ${themeCssVariables.spacing[1]})`;
@@ -41,18 +37,10 @@ const StyledCenteredChatContainer = styled.div`
`;
export const AiChatPage = () => {
- const { defaultHomePagePath } = useDefaultHomePagePath();
- const isAiChatPageEnabled = useIsFeatureEnabled(
- FeatureFlagKey.IS_AI_CHAT_PAGE_ENABLED,
- );
const shouldOpenAiChatAfterOnboarding = useAtomStateValue(
shouldOpenAiChatAfterOnboardingState,
);
- if (!isAiChatPageEnabled && !shouldOpenAiChatAfterOnboarding) {
- return <Navigate to={defaultHomePagePath} replace />;
- }
-
return (
<StyledPanel>
<AiChatPageThreadUrlSyncEffect />
diff --git a/packages/twenty-front/src/pages/ai-chat/__tests__/AiChatPage.test.tsx b/packages/twenty-front/src/pages/ai-chat/__tests__/AiChatPage.test.tsx
index 9a028af3ccf..1b86085130e 100644
--- a/packages/twenty-front/src/pages/ai-chat/__tests__/AiChatPage.test.tsx
+++ b/packages/twenty-front/src/pages/ai-chat/__tests__/AiChatPage.test.tsx
@@ -17,18 +17,6 @@ import { AiChatPage } from '~/pages/ai-chat/AiChatPage';
i18n.load({ [SOURCE_LOCALE]: messages });
i18n.activate(SOURCE_LOCALE);
-const defaultHomePagePath = '/objects/companies';
-
-jest.mock('@/navigation/hooks/useDefaultHomePagePath', () => ({
- useDefaultHomePagePath: () => ({ defaultHomePagePath }),
-}));
-
-let isAiChatPageEnabled = true;
-
-jest.mock('@/workspace/hooks/useIsFeatureEnabled', () => ({
- useIsFeatureEnabled: () => isAiChatPageEnabled,
-}));
-
jest.mock('@/ai/components/AiChatTab', () => {
const { useContext } = jest.requireActual('react');
const { AiChatMessageListPreambleContext } = jest.requireActual(
@@ -73,14 +61,6 @@ jest.mock(
}),
);
-const mockNavigate = jest.fn();
-jest.mock('react-router-dom', () => ({
- Navigate: (props: { to: string }) => {
- mockNavigate(props.to);
- return <div data-testid="navigate" />;
- },
-}));
-
const Wrapper = ({ children }: { children: ReactNode }) => (
<JotaiProvider store={jotaiStore}>
<I18nProvider i18n={i18n}>{children}</I18nProvider>
@@ -92,7 +72,6 @@ describe('AiChatPage', () => {
jest.clearAllMocks();
sessionStorage.clear();
resetJotaiStore();
- isAiChatPageEnabled = true;
});
it('should dress the chat for onboarding when the post-onboarding hint is set', () => {
@@ -117,25 +96,6 @@ describe('AiChatPage', () => {
expect(headerMock).toHaveBeenCalledWith(false);
});
- it('should host the onboarding chat even when the chat page flag is disabled', () => {
- isAiChatPageEnabled = false;
- jotaiStore.set(shouldOpenAiChatAfterOnboardingState.atom, true);
-
- const { getByTestId } = render(<AiChatPage />, { wrapper: Wrapper });
-
- expect(getByTestId('ai-chat-tab')).toBeInTheDocument();
- expect(mockNavigate).not.toHaveBeenCalled();
- });
-
- it('should redirect home when the flag is disabled outside onboarding', () => {
- isAiChatPageEnabled = false;
-
- const { queryByTestId } = render(<AiChatPage />, { wrapper: Wrapper });
-
- expect(queryByTestId('ai-chat-tab')).not.toBeInTheDocument();
- expect(mockNavigate).toHaveBeenCalledWith(defaultHomePagePath);
- });
-
it('should mark the chat for side panel continuation while mounted', () => {
const { unmount } = render(<AiChatPage />, { wrapper: Wrapper });
diff --git a/packages/twenty-server/src/engine/core-modules/feature-flag/constants/public-feature-flag.const.ts b/packages/twenty-server/src/engine/core-modules/feature-flag/constants/public-feature-flag.const.ts
index efdeeaff6f5..73e14f61a5c 100644
--- a/packages/twenty-server/src/engine/core-modules/feature-flag/constants/public-feature-flag.const.ts
+++ b/packages/twenty-server/src/engine/core-modules/feature-flag/constants/public-feature-flag.const.ts
@@ -13,15 +13,6 @@ export type PublicFeatureFlag = {
};
export const PUBLIC_FEATURE_FLAGS: PublicFeatureFlag[] = [
- {
- key: FeatureFlagKey.IS_AI_CHAT_PAGE_ENABLED,
- metadata: {
- label: 'Full-Page AI Chat',
- description:
- 'Open the AI chat as a full page, with the records it surfaces appearing in the side panel',
- icon: 'IconSparkles',
- },
- },
{
key: FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED,
metadata: {
diff --git a/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts b/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts
index 4a564b43017..c3e7a368af1 100644
--- a/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts
+++ b/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts
@@ -239,7 +239,6 @@ describe('WorkspaceEntityManager', () => {
'test-entity': 'test-entity-id',
},
featureFlagsMap: {
- IS_AI_CHAT_PAGE_ENABLED: false,
IS_APP_CLAIMING_ENABLED: false,
IS_UNIQUE_INDEXES_ENABLED: false,
IS_JSON_FILTER_ENABLED: false,
diff --git a/packages/twenty-server/src/engine/workspace-manager/dev-seeder/core/utils/seed-feature-flags.util.ts b/packages/twenty-server/src/engine/workspace-manager/dev-seeder/core/utils/seed-feature-flags.util.ts
index e15cf77a0dc..13f94e92181 100644
--- a/packages/twenty-server/src/engine/workspace-manager/dev-seeder/core/utils/seed-feature-flags.util.ts
+++ b/packages/twenty-server/src/engine/workspace-manager/dev-seeder/core/utils/seed-feature-flags.util.ts
@@ -20,11 +20,6 @@ export const seedFeatureFlags = async ({
.into(`${schemaName}.${tableName}`, ['key', 'workspaceId', 'value'])
.orIgnore()
.values([
- {
- key: FeatureFlagKey.IS_AI_CHAT_PAGE_ENABLED,
- workspaceId: workspaceId,
- value: true,
- },
{
key: FeatureFlagKey.IS_APP_CLAIMING_ENABLED,
workspaceId: workspaceId,
diff --git a/packages/twenty-shared/src/types/FeatureFlagKey.ts b/packages/twenty-shared/src/types/FeatureFlagKey.ts
index 1d146904181..c026bc7404d 100644
--- a/packages/twenty-shared/src/types/FeatureFlagKey.ts
+++ b/packages/twenty-shared/src/types/FeatureFlagKey.ts
@@ -1,5 +1,4 @@
export enum FeatureFlagKey {
- IS_AI_CHAT_PAGE_ENABLED = 'IS_AI_CHAT_PAGE_ENABLED',
IS_APP_CLAIMING_ENABLED = 'IS_APP_CLAIMING_ENABLED',
IS_UNIQUE_INDEXES_ENABLED = 'IS_UNIQUE_INDEXES_ENABLED',
IS_JSON_FILTER_ENABLED = 'IS_JSON_FILTER_ENABLED',