The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Remove react-router dependency from twenty-ui (#26477)
Raphaël Bosi54c45b59071f
diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/__stories__/EventRowMainObjectUpdated.stories.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/__stories__/EventRowMainObjectUpdated.stories.tsxindex 1f1f53076cf..30b870895b1 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/__stories__/EventRowMainObjectUpdated.stories.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/__stories__/EventRowMainObjectUpdated.stories.tsx@@ -1,10 +1,11 @@import { EventRowMainObjectUpdated } from '@/activities/timeline-activities/rows/main-object/components/EventRowMainObjectUpdated';import { type Meta, type StoryObj } from '@storybook/react-vite';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { getTestEnrichedObjectMetadataItemsMock } from '~/testing/utils/getTestEnrichedObjectMetadataItemsMock';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const meta: Meta<typeof EventRowMainObjectUpdated> = {title: 'Modules/TimelineActivities/Rows/MainObject/EventRowMainObjectUpdated',@@ -41,7 +42,7 @@ const meta: Meta<typeof EventRowMainObjectUpdated> = {ComponentDecorator,ObjectMetadataItemsDecorator,ToastDecorator,- RouterDecorator,+ MemoryRouterDecorator,],};diff --git a/packages/twenty-front/src/modules/advanced-text-editor/components/__stories__/AdvancedTextEditor.stories.tsx b/packages/twenty-front/src/modules/advanced-text-editor/components/__stories__/AdvancedTextEditor.stories.tsxindex 22c4f06156e..79a99015b01 100644--- a/packages/twenty-front/src/modules/advanced-text-editor/components/__stories__/AdvancedTextEditor.stories.tsx+++ b/packages/twenty-front/src/modules/advanced-text-editor/components/__stories__/AdvancedTextEditor.stories.tsx@@ -5,13 +5,14 @@ import { buildFullRichTextWithVariableTagExtensions } from '@/advanced-text-editimport { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, fn, userEvent, waitFor } from 'storybook/test';import { TIPTAP_DOCUMENT_SCHEMA_VERSION, isDefined } from 'twenty-shared/utils';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator';import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';import { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const STORY_RICH_TEXT_PROFILE = {chrome: 'document',@@ -90,7 +91,7 @@ const meta: Meta<typeof EditorWrapper> = {ComponentDecorator,ObjectMetadataItemsDecorator,ToastDecorator,- RouterDecorator,+ MemoryRouterDecorator,WorkspaceDecorator,],};diff --git a/packages/twenty-front/src/modules/advanced-text-editor/components/__stories__/FormAdvancedTextFieldInput.stories.tsx b/packages/twenty-front/src/modules/advanced-text-editor/components/__stories__/FormAdvancedTextFieldInput.stories.tsxindex 5b2e205fb86..3d23436322e 100644--- a/packages/twenty-front/src/modules/advanced-text-editor/components/__stories__/FormAdvancedTextFieldInput.stories.tsx+++ b/packages/twenty-front/src/modules/advanced-text-editor/components/__stories__/FormAdvancedTextFieldInput.stories.tsx@@ -5,7 +5,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';import { HttpResponse, graphql } from 'msw';import { expect, fn, userEvent, within } from 'storybook/test';import { TIPTAP_DOCUMENT_SCHEMA_VERSION } from 'twenty-shared/utils';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator';@@ -13,6 +13,7 @@ import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecoratoimport { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';import { getWorkflowNodeIdMock } from '~/testing/mock-data/workflow';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const STORY_FORM_EDITOR_PROFILE = {chrome: 'field',@@ -114,7 +115,7 @@ const meta: Meta<typeof FormAdvancedTextFieldInput> = {ComponentDecorator,ObjectMetadataItemsDecorator,ToastDecorator,- RouterDecorator,+ MemoryRouterDecorator,WorkspaceDecorator,],};diff --git a/packages/twenty-front/src/modules/ai/components/__stories__/ToolRecordsWidget.stories.tsx b/packages/twenty-front/src/modules/ai/components/__stories__/ToolRecordsWidget.stories.tsxindex 09f584d6590..318fdc39e33 100644--- a/packages/twenty-front/src/modules/ai/components/__stories__/ToolRecordsWidget.stories.tsx+++ b/packages/twenty-front/src/modules/ai/components/__stories__/ToolRecordsWidget.stories.tsx@@ -1,12 +1,13 @@import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, within } from 'storybook/test';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ToolRecordsWidget } from '@/ai/components/ToolRecordsWidget';import { IconsProviderDecorator } from '~/testing/decorators/IconsProviderDecorator';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const meta: Meta<typeof ToolRecordsWidget> = {title: 'Modules/AI/ToolRecordsWidget',@@ -15,7 +16,7 @@ const meta: Meta<typeof ToolRecordsWidget> = {IconsProviderDecorator,WorkspaceDecorator,ObjectMetadataItemsDecorator,- RouterDecorator,+ MemoryRouterDecorator,ComponentDecorator,],parameters: {diff --git a/packages/twenty-front/src/modules/auth/components/__stories__/Logo.stories.tsx b/packages/twenty-front/src/modules/auth/components/__stories__/Logo.stories.tsxindex bebb0c3fa8f..3b5b4cd428e 100644--- a/packages/twenty-front/src/modules/auth/components/__stories__/Logo.stories.tsx+++ b/packages/twenty-front/src/modules/auth/components/__stories__/Logo.stories.tsx@@ -1,18 +1,15 @@import { type Meta, type StoryObj } from '@storybook/react-vite';import { Logo } from '@/auth/components/Logo';-import {- AVATAR_URL_MOCK,- ComponentDecorator,- RouterDecorator,-} from 'twenty-ui/testing';+import { AVATAR_URL_MOCK, ComponentDecorator } from 'twenty-ui/testing';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const logoUrl = AVATAR_URL_MOCK;const meta: Meta<typeof Logo> = {title: 'Modules/Auth/Logo',component: Logo,- decorators: [ComponentDecorator, RouterDecorator],+ decorators: [ComponentDecorator, MemoryRouterDecorator],};export default meta;diff --git a/packages/twenty-front/src/modules/command-menu-item/components/__stories__/RecordIndexCommandMenuDropdown.stories.tsx b/packages/twenty-front/src/modules/command-menu-item/components/__stories__/RecordIndexCommandMenuDropdown.stories.tsxindex 57c7b0b819c..3c79aa9d668 100644--- a/packages/twenty-front/src/modules/command-menu-item/components/__stories__/RecordIndexCommandMenuDropdown.stories.tsx+++ b/packages/twenty-front/src/modules/command-menu-item/components/__stories__/RecordIndexCommandMenuDropdown.stories.tsx@@ -12,10 +12,11 @@ import { CommandMenuComponentInstanceContext } from '@/command-menu/states/conteimport { EMPTY_COMMAND_MENU_CONTEXT_API } from '@/command-menu-item/constants/EmptyCommandMenuContextApi';import { isDropdownOpenComponentState } from '@/ui/layout/dropdown/states/isDropdownOpenComponentState';import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';-import { RouterDecorator } from 'twenty-ui/testing';+import { ContextStoreDecorator } from '~/testing/decorators/ContextStoreDecorator';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const meta: Meta<typeof RecordIndexCommandMenuDropdown> = {title: 'Modules/CommandMenu/RecordIndexCommandMenuDropdown',@@ -58,7 +59,7 @@ const meta: Meta<typeof RecordIndexCommandMenuDropdown> = {ContextStoreDecorator,ObjectMetadataItemsDecorator,ToastDecorator,- RouterDecorator,+ MemoryRouterDecorator,],};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.tsxindex e7365cdadef..f0bc0c8ec9d 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@@ -11,11 +11,12 @@ import { CommandMenuComponentInstanceContext } from '@/command-menu/states/conteimport { MAIN_CONTEXT_STORE_INSTANCE_ID } from '@/context-store/constants/MainContextStoreInstanceId';import { ContextStoreComponentInstanceContext } from '@/context-store/states/contexts/ContextStoreComponentInstanceContext';import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ContextStoreDecorator } from '~/testing/decorators/ContextStoreDecorator';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { JestContextStoreSetter } from '~/testing/jest/JestContextStoreSetter';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const meta: Meta<typeof RecordPageSidePanelCommandMenuDropdown> = {title: 'Modules/CommandMenu/RecordPageSidePanelCommandMenuDropdown',@@ -60,7 +61,7 @@ const meta: Meta<typeof RecordPageSidePanelCommandMenuDropdown> = {ContextStoreDecorator,ObjectMetadataItemsDecorator,ToastDecorator,- RouterDecorator,+ MemoryRouterDecorator,],args: {commandMenuId: 'story-command-menu',diff --git a/packages/twenty-front/src/modules/command-menu-item/edit/components/__stories__/CommandMenuItemEditButton.stories.tsx b/packages/twenty-front/src/modules/command-menu-item/edit/components/__stories__/CommandMenuItemEditButton.stories.tsxindex 044e2ae2368..caa8bac86c0 100644--- a/packages/twenty-front/src/modules/command-menu-item/edit/components/__stories__/CommandMenuItemEditButton.stories.tsx+++ b/packages/twenty-front/src/modules/command-menu-item/edit/components/__stories__/CommandMenuItemEditButton.stories.tsx@@ -7,9 +7,10 @@ import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';import { type Meta, type StoryObj } from '@storybook/react-vite';import { Provider as JotaiProvider } from 'jotai';import { expect, userEvent, waitFor, within } from 'storybook/test';-import { RouterDecorator } from 'twenty-ui/testing';+import { ContextStoreDecorator } from '~/testing/decorators/ContextStoreDecorator';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const meta: Meta<typeof CommandMenuItemEditButton> = {title: 'Modules/CommandMenu/CommandMenuItemEditButton',@@ -29,7 +30,7 @@ const meta: Meta<typeof CommandMenuItemEditButton> = {},ContextStoreDecorator,ObjectMetadataItemsDecorator,- RouterDecorator,+ MemoryRouterDecorator,],};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/grid/components/__stories__/RecordCalendarGrid.stories.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/grid/components/__stories__/RecordCalendarGrid.stories.tsxindex 743a2bb542a..7e92aed8302 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/grid/components/__stories__/RecordCalendarGrid.stories.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/grid/components/__stories__/RecordCalendarGrid.stories.tsx@@ -19,7 +19,7 @@ import { type RecordField } from '@/object-record/record-field/types/RecordFieldimport { useRecordIndexFieldMetadataDerivedStates } from '@/object-record/record-index/hooks/useRecordIndexFieldMetadataDerivedStates';import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';import { ViewBarFilterDropdownIds } from '@/views/constants/ViewBarFilterDropdownIds';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ContextStoreDecorator } from '~/testing/decorators/ContextStoreDecorator';import { IconsProviderDecorator } from '~/testing/decorators/IconsProviderDecorator';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';@@ -29,6 +29,7 @@ import { getTestEnrichedObjectMetadataItemsMock } from '~/testing/utils/getTestEimport { setTestViewsInMetadataStore } from '~/testing/utils/setTestViewsInMetadataStore';import { ViewCalendarLayout } from '~/generated-metadata/graphql';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const meta: Meta<typeof RecordCalendarGrid> = {title: 'Modules/ObjectRecord/RecordCalendar/Grid',@@ -158,7 +159,7 @@ const meta: Meta<typeof RecordCalendarGrid> = {ToastDecorator,ComponentDecorator,IconsProviderDecorator,- RouterDecorator,+ MemoryRouterDecorator,],};diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/__stories__/FormMultiRecordPicker.stories.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/__stories__/FormMultiRecordPicker.stories.tsxindex 874f87b15d5..45f0f448bcd 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/__stories__/FormMultiRecordPicker.stories.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/__stories__/FormMultiRecordPicker.stories.tsx@@ -2,13 +2,14 @@ import { FormMultiRecordPicker } from '@/object-record/record-field/ui/form-typeimport { styled } from '@linaria/react';import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, fn, userEvent, within } from 'storybook/test';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';import { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';import { MOCKED_STEP_ID } from '~/testing/mock-data/workflow';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const meta: Meta<typeof FormMultiRecordPicker> = {title: 'UI/Data/Field/Form/Input/FormMultiRecordPicker',@@ -23,7 +24,7 @@ const meta: Meta<typeof FormMultiRecordPicker> = {ComponentDecorator,WorkspaceDecorator,ToastDecorator,- RouterDecorator,+ MemoryRouterDecorator,],};diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/__stories__/FormSingleRecordPicker.stories.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/__stories__/FormSingleRecordPicker.stories.tsxindex 1dea14b265a..85ea338150d 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/__stories__/FormSingleRecordPicker.stories.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/__stories__/FormSingleRecordPicker.stories.tsx@@ -2,13 +2,14 @@ import { FormSingleRecordPicker } from '@/object-record/record-field/ui/form-typimport { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, fn, userEvent, within } from 'storybook/test';import { isDefined } from 'twenty-shared/utils';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';import { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';import { MOCKED_STEP_ID } from '~/testing/mock-data/workflow';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const meta: Meta<typeof FormSingleRecordPicker> = {title: 'UI/Data/Field/Form/Input/FormSingleRecordPicker',@@ -63,7 +64,7 @@ export const WithVariables: Story = {ComponentDecorator,ObjectMetadataItemsDecorator,ToastDecorator,- RouterDecorator,+ MemoryRouterDecorator,],play: async ({ canvasElement }) => {const canvas = within(canvasElement);diff --git a/packages/twenty-front/src/modules/page-layout/components/__stories__/PageLayoutTabList.stories.tsx b/packages/twenty-front/src/modules/page-layout/components/__stories__/PageLayoutTabList.stories.tsxindex d71edaf97ee..88dc92e44c3 100644--- a/packages/twenty-front/src/modules/page-layout/components/__stories__/PageLayoutTabList.stories.tsx+++ b/packages/twenty-front/src/modules/page-layout/components/__stories__/PageLayoutTabList.stories.tsx@@ -5,7 +5,6 @@ import { styled } from '@linaria/react';import type { Meta, StoryObj } from '@storybook/react-vite';import { type ComponentProps, useEffect, useMemo } from 'react';import { expect, userEvent, waitFor, within } from 'storybook/test';-import { ComponentWithRouterDecorator } from 'twenty-ui/testing';import { PageLayoutTabList } from '@/page-layout/components/PageLayoutTabList';import { PageLayoutTabListEffect } from '@/page-layout/components/PageLayoutTabListEffect';@@ -21,6 +20,7 @@ import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';import { useAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentState';import { themeCssVariables } from 'twenty-ui/theme-constants';import { PageLayoutType } from '~/generated-metadata/graphql';+import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';const StyledContainer = styled.div<{ containerWidth: number }>`border: 1px solid ${themeCssVariables.border.color.strong};diff --git a/packages/twenty-front/src/modules/settings/billing/components/__stories__/SettingsBillingLimitsTable.stories.tsx b/packages/twenty-front/src/modules/settings/billing/components/__stories__/SettingsBillingLimitsTable.stories.tsxindex 25f4b446d3b..f467ca4e75f 100644--- a/packages/twenty-front/src/modules/settings/billing/components/__stories__/SettingsBillingLimitsTable.stories.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/__stories__/SettingsBillingLimitsTable.stories.tsx@@ -1,6 +1,6 @@import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, userEvent, waitFor, within } from 'storybook/test';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { SettingsBillingLimitsTable } from '@/settings/billing/components/SettingsBillingLimitsTable';import { type UsageQuotaWithConsumption } from '@/settings/billing/types/UsageQuotaWithConsumption';@@ -8,6 +8,7 @@ import {UsageOperationType,UsageResourceType,} from '~/generated-metadata/graphql';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const buildQuota = (overrides: Partial<UsageQuotaWithConsumption>,@@ -60,7 +61,7 @@ const API_KEY_QUOTA = buildQuota({const meta: Meta<typeof SettingsBillingLimitsTable> = {title: 'Modules/Settings/Billing/SettingsBillingLimitsTable',component: SettingsBillingLimitsTable,- decorators: [ComponentDecorator, RouterDecorator],+ decorators: [ComponentDecorator, MemoryRouterDecorator],args: { quotas: [ALL_OPERATIONS_QUOTA, CUSTOM_USER_QUOTA, API_KEY_QUOTA] },};diff --git a/packages/twenty-front/src/modules/settings/developers/components/__stories__/SettingsApiKeysFieldItemTableRow.stories.tsx b/packages/twenty-front/src/modules/settings/developers/components/__stories__/SettingsApiKeysFieldItemTableRow.stories.tsxindex 18f48d8e243..ccfc992aef3 100644--- a/packages/twenty-front/src/modules/settings/developers/components/__stories__/SettingsApiKeysFieldItemTableRow.stories.tsx+++ b/packages/twenty-front/src/modules/settings/developers/components/__stories__/SettingsApiKeysFieldItemTableRow.stories.tsx@@ -1,12 +1,13 @@import { type Meta, type StoryObj } from '@storybook/react-vite';import { SettingsApiKeysFieldItemTableRow } from '@/settings/developers/components/SettingsApiKeysFieldItemTableRow';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const meta: Meta<typeof SettingsApiKeysFieldItemTableRow> = {title: 'Modules/Settings/Developers/ApiKeys/SettingsApiKeysFieldItemTableRow',component: SettingsApiKeysFieldItemTableRow,- decorators: [ComponentDecorator, RouterDecorator],+ decorators: [ComponentDecorator, MemoryRouterDecorator],args: {apiKey: {id: '3f4a42e8-b81f-4f8c-9c20-1602e6b34791',diff --git a/packages/twenty-front/src/modules/settings/developers/components/__stories__/SettingsDevelopersWebhookForm.stories.tsx b/packages/twenty-front/src/modules/settings/developers/components/__stories__/SettingsDevelopersWebhookForm.stories.tsxindex a3b783a133b..4cfb9074baa 100644--- a/packages/twenty-front/src/modules/settings/developers/components/__stories__/SettingsDevelopersWebhookForm.stories.tsx+++ b/packages/twenty-front/src/modules/settings/developers/components/__stories__/SettingsDevelopersWebhookForm.stories.tsx@@ -5,18 +5,19 @@ import { expect, within } from 'storybook/test';import { SettingsDevelopersWebhookForm } from '@/settings/developers/components/SettingsDevelopersWebhookForm';import { WebhookFormMode } from '@/settings/developers/constants/WebhookFormMode';import { Toaster } from 'twenty-ui/components';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const meta: Meta<typeof SettingsDevelopersWebhookForm> = {title: 'Modules/Settings/Developers/Components/SettingsDevelopersWebhookForm',component: SettingsDevelopersWebhookForm,decorators: [ComponentDecorator,- RouterDecorator,+ MemoryRouterDecorator,ObjectMetadataItemsDecorator,ToastDecorator,],diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/GraphQLPlayground.stories.tsx b/packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/GraphQLPlayground.stories.tsxindex 4b705e8f06a..fc8ae6cd848 100644--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/GraphQLPlayground.stories.tsx+++ b/packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/GraphQLPlayground.stories.tsx@@ -4,11 +4,9 @@ import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomStatimport { type Meta, type StoryObj } from '@storybook/react-vite';import { useEffect } from 'react';import { action } from 'storybook/actions';-import {- ComponentDecorator,- ComponentWithRouterDecorator,-} from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { graphqlMocks } from '~/testing/graphqlMocks';+import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';const PlaygroundApiKeySetterEffect = () => {const setPlaygroundApiKey = useSetAtomState(playgroundApiKeyState);diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/PlaygroundSetupForm.stories.tsx b/packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/PlaygroundSetupForm.stories.tsxindex abe492fc4ef..0d5be98a3d0 100644--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/PlaygroundSetupForm.stories.tsx+++ b/packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/PlaygroundSetupForm.stories.tsx@@ -1,12 +1,13 @@import { PlaygroundSetupForm } from '@/settings/mcp-and-apis/components/PlaygroundSetupForm';import { type Meta, type StoryObj } from '@storybook/react-vite';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const meta: Meta<typeof PlaygroundSetupForm> = {title: 'Modules/Settings/Playground/PlaygroundSetupForm',component: PlaygroundSetupForm,- decorators: [ComponentDecorator, RouterDecorator, ToastDecorator],+ decorators: [ComponentDecorator, MemoryRouterDecorator, ToastDecorator],parameters: {docs: {description: {diff --git a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/stories/SettingsRoleAssignment.stories.tsx b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/stories/SettingsRoleAssignment.stories.tsxindex f28f0749f05..e2cd9de0aac 100644--- a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/stories/SettingsRoleAssignment.stories.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/stories/SettingsRoleAssignment.stories.tsx@@ -6,8 +6,9 @@ import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtimport { UserContext } from '@/users/contexts/UserContext';import { type Meta, type StoryObj } from '@storybook/react-vite';import { isDefined } from 'twenty-shared/utils';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { mockedRoles } from '~/testing/mock-data/generated/metadata/roles/mock-roles-data';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const SettingsRoleAssignmentWrapper = (args: React.ComponentProps<typeof SettingsRoleAssignment>,@@ -41,7 +42,7 @@ const meta: Meta<typeof SettingsRoleAssignmentWrapper> = {<Story /></UserContext.Provider>),- RouterDecorator,+ MemoryRouterDecorator,ComponentDecorator,],};diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/components/stories/SettingsRolePermissions.stories.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/components/stories/SettingsRolePermissions.stories.tsxindex 8d99714885d..164b70c6499 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/components/stories/SettingsRolePermissions.stories.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/components/stories/SettingsRolePermissions.stories.tsx@@ -3,8 +3,9 @@ import { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDrimport { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtomFamilyState';import { type Meta, type StoryObj } from '@storybook/react-vite';import { isDefined } from 'twenty-shared/utils';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { mockedRoles } from '~/testing/mock-data/generated/metadata/roles/mock-roles-data';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const SettingsRolePermissionsWrapper = (args: React.ComponentProps<typeof SettingsRolePermissions>,@@ -31,7 +32,7 @@ const SettingsRolePermissionsWrapper = (const meta: Meta<typeof SettingsRolePermissionsWrapper> = {title: 'Modules/Settings/Roles/RolePermissions/SettingsRolePermissions',component: SettingsRolePermissionsWrapper,- decorators: [RouterDecorator, ComponentDecorator],+ decorators: [MemoryRouterDecorator, ComponentDecorator],};export default meta;diff --git a/packages/twenty-front/src/modules/settings/roles/role-settings/components/stories/SettingsRoleSettings.stories.tsx b/packages/twenty-front/src/modules/settings/roles/role-settings/components/stories/SettingsRoleSettings.stories.tsxindex 26c5d731dd9..a2aed98060d 100644--- a/packages/twenty-front/src/modules/settings/roles/role-settings/components/stories/SettingsRoleSettings.stories.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-settings/components/stories/SettingsRoleSettings.stories.tsx@@ -3,8 +3,9 @@ import { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDrimport { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtomFamilyState';import { type Meta, type StoryObj } from '@storybook/react-vite';import { isDefined } from 'twenty-shared/utils';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { mockedRoles } from '~/testing/mock-data/generated/metadata/roles/mock-roles-data';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const SettingsRoleSettingsWrapper = (args: React.ComponentProps<typeof SettingsRoleSettings>,@@ -32,7 +33,7 @@ const SettingsRoleSettingsWrapper = (const meta: Meta<typeof SettingsRoleSettingsWrapper> = {title: 'Modules/Settings/Roles/RoleSettings/SettingsRoleSettings',component: SettingsRoleSettingsWrapper,- decorators: [RouterDecorator, ComponentDecorator],+ decorators: [MemoryRouterDecorator, ComponentDecorator],};export default meta;diff --git a/packages/twenty-front/src/modules/side-panel/pages/__stories__/SidePanelComposerPages.stories.tsx b/packages/twenty-front/src/modules/side-panel/pages/__stories__/SidePanelComposerPages.stories.tsxindex 6513fc8f73c..af5ae2e75b6 100644--- a/packages/twenty-front/src/modules/side-panel/pages/__stories__/SidePanelComposerPages.stories.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/__stories__/SidePanelComposerPages.stories.tsx@@ -4,7 +4,7 @@ import { HttpResponse, graphql } from 'msw';import { useEffect, useState } from 'react';import { expect, userEvent, within } from 'storybook/test';import { CoreObjectNameSingular } from 'twenty-shared/types';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { SidePanelComposeCalendarEventPage } from '@/side-panel/pages/compose-calendar-event/components/SidePanelComposeCalendarEventPage';import { composeCalendarEventInitialValuesComponentState } from '@/side-panel/pages/compose-calendar-event/states/composeCalendarEventInitialValuesComponentState';@@ -18,6 +18,7 @@ import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadatimport { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const STORY_PAGE_INSTANCE_ID = 'side-panel-composer-story';const GOOGLE_ACCOUNT_ID = '20202020-9ac0-4390-9a1a-ab4d2c4e1bb7';@@ -210,7 +211,7 @@ const meta = {ComponentDecorator,ObjectMetadataItemsDecorator,ToastDecorator,- RouterDecorator,+ MemoryRouterDecorator,WorkspaceDecorator,],} satisfies Meta<typeof SidePanelComposerStory>;diff --git a/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/components/__stories__/RecordCreationFlow.stories.tsx b/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/components/__stories__/RecordCreationFlow.stories.tsxindex edcdde25ed9..ff9dfa786f2 100644--- a/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/components/__stories__/RecordCreationFlow.stories.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/components/__stories__/RecordCreationFlow.stories.tsx@@ -41,7 +41,7 @@ import {import { AppPath, OpenRecordIn, SidePanelPages } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { Button } from 'twenty-ui/primitives/input';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { getOsControlSymbol } from 'twenty-ui/utilities';import {EngineComponentKey,@@ -57,6 +57,7 @@ import { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';import { mockedCompanyRecords } from '~/testing/mock-data/generated/data/companies/mock-companies-data';import { mockCurrentWorkspace } from '~/testing/mock-data/users';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const createCompanyRequest = fn();const onRecordCreated = fn();@@ -280,7 +281,7 @@ const meta = {decorators: [ObjectMetadataItemsDecorator,ToastDecorator,- RouterDecorator,+ MemoryRouterDecorator,ComponentDecorator,],parameters: {diff --git a/packages/twenty-front/src/modules/ui/field/display/components/SocialLink/__stories__/SocialLink.stories.tsx b/packages/twenty-front/src/modules/ui/field/display/components/SocialLink/__stories__/SocialLink.stories.tsxindex f7b11cc5c86..e1124878482 100644--- a/packages/twenty-front/src/modules/ui/field/display/components/SocialLink/__stories__/SocialLink.stories.tsx+++ b/packages/twenty-front/src/modules/ui/field/display/components/SocialLink/__stories__/SocialLink.stories.tsx@@ -1,9 +1,9 @@import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, fn, userEvent, within } from 'storybook/test';-import { ComponentWithRouterDecorator } from 'twenty-ui/testing';import { LinkType } from '@/ui/field/display/components/SocialLink/LinkType';import { SocialLink } from '@/ui/field/display/components/SocialLink/SocialLink';+import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';const meta: Meta<typeof SocialLink> = {title: 'UI/Navigation/Link/SocialLink',diff --git a/packages/twenty-front/src/modules/ui/field/display/components/internal/ContactLink/__stories__/ContactLink.stories.tsx b/packages/twenty-front/src/modules/ui/field/display/components/internal/ContactLink/__stories__/ContactLink.stories.tsxindex 71841159036..481e430a345 100644--- a/packages/twenty-front/src/modules/ui/field/display/components/internal/ContactLink/__stories__/ContactLink.stories.tsx+++ b/packages/twenty-front/src/modules/ui/field/display/components/internal/ContactLink/__stories__/ContactLink.stories.tsx@@ -1,8 +1,8 @@import { type Meta, type StoryObj } from '@storybook/react-vite';import { fn } from 'storybook/test';-import { ComponentWithRouterDecorator } from 'twenty-ui/testing';import { ContactLink } from '@/ui/field/display/components/internal/ContactLink/ContactLink';+import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';const meta: Meta<typeof ContactLink> = {title: 'UI/Navigation/Link/ContactLink',diff --git a/packages/twenty-front/src/modules/ui/layout/fullscreen/components/__stories__/FullScreenContainer.stories.tsx b/packages/twenty-front/src/modules/ui/layout/fullscreen/components/__stories__/FullScreenContainer.stories.tsxindex 544890c93e8..86755841c25 100644--- a/packages/twenty-front/src/modules/ui/layout/fullscreen/components/__stories__/FullScreenContainer.stories.tsx+++ b/packages/twenty-front/src/modules/ui/layout/fullscreen/components/__stories__/FullScreenContainer.stories.tsx@@ -1,10 +1,8 @@import { FullScreenContainer } from '@/ui/layout/fullscreen/components/FullScreenContainer';import { styled } from '@linaria/react';import { type Meta, type StoryObj } from '@storybook/react-vite';-import {- ComponentDecorator,- ComponentWithRouterDecorator,-} from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';+import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';const meta: Meta<typeof FullScreenContainer> = {title: 'UI/Layout/FullScreenContainer',diff --git a/packages/twenty-front/src/modules/ui/layout/tab-list/components/__stories__/TabListRoot.stories.tsx b/packages/twenty-front/src/modules/ui/layout/tab-list/components/__stories__/TabListRoot.stories.tsxindex 794e9dcbbf3..68be47dbfca 100644--- a/packages/twenty-front/src/modules/ui/layout/tab-list/components/__stories__/TabListRoot.stories.tsx+++ b/packages/twenty-front/src/modules/ui/layout/tab-list/components/__stories__/TabListRoot.stories.tsx@@ -2,10 +2,10 @@ import { styled } from '@linaria/react';import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, userEvent, within } from 'storybook/test';import { Tabs } from 'twenty-ui/primitives/navigation';-import { ComponentWithRouterDecorator } from 'twenty-ui/testing';import { TabList } from '@/ui/layout/tab-list/components/TabList';import { TabListRoot } from '@/ui/layout/tab-list/components/TabListRoot';+import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';const StyledRecordPanel = styled.section`height: 320px;diff --git a/packages/twenty-front/src/modules/ui/layout/tab-list/components/__stories__/Tablist.stories.tsx b/packages/twenty-front/src/modules/ui/layout/tab-list/components/__stories__/Tablist.stories.tsxindex b7993515a48..13d8c3f4858 100644--- a/packages/twenty-front/src/modules/ui/layout/tab-list/components/__stories__/Tablist.stories.tsx+++ b/packages/twenty-front/src/modules/ui/layout/tab-list/components/__stories__/Tablist.stories.tsx@@ -13,10 +13,7 @@ import {IconPhone,IconUser,} from 'twenty-ui/icon';-import {- AVATAR_URL_MOCK,- ComponentWithRouterDecorator,-} from 'twenty-ui/testing';+import { AVATAR_URL_MOCK } from 'twenty-ui/testing';const tabs = [{ id: 'general', title: 'General', logo: AVATAR_URL_MOCK },@@ -42,6 +39,7 @@ const tabs = [];import { themeCssVariables } from 'twenty-ui/theme-constants';+import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';const StyledInteractiveContainer = styled.div`border: 1px solid ${themeCssVariables.border.color.strong};diff --git a/packages/twenty-front/src/modules/ui/navigation/link/components/UndecoratedLink/__stories__/UndecoratedLink.stories.tsx b/packages/twenty-front/src/modules/ui/navigation/link/components/UndecoratedLink/__stories__/UndecoratedLink.stories.tsxindex b43e5c234e4..1a1e5243ed8 100644--- a/packages/twenty-front/src/modules/ui/navigation/link/components/UndecoratedLink/__stories__/UndecoratedLink.stories.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/link/components/UndecoratedLink/__stories__/UndecoratedLink.stories.tsx@@ -1,7 +1,8 @@import { type Meta, type StoryObj } from '@storybook/react-vite';import { UndecoratedLink } from '@/ui/navigation/link/components/UndecoratedLink/UndecoratedLink';-import { ComponentWithRouterDecorator } from 'twenty-ui/testing';+import { expect, userEvent, within } from 'storybook/test';+import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';const meta: Meta<typeof UndecoratedLink> = {title: 'UI/Navigation/UndecoratedLink',diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/__stories__/NavigationDrawerCollapseButton.stories.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/__stories__/NavigationDrawerCollapseButton.stories.tsxindex 75a2ebb1b77..c9184c6bc8d 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/__stories__/NavigationDrawerCollapseButton.stories.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/__stories__/NavigationDrawerCollapseButton.stories.tsx@@ -2,11 +2,12 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, userEvent, waitFor, within } from 'storybook/test';import { NavigationDrawerCollapseButton } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerCollapseButton';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const meta: Meta<typeof NavigationDrawerCollapseButton> = {title: 'UI/Navigation/NavigationDrawer/NavigationDrawerCollapseButton',- decorators: [ComponentDecorator, RouterDecorator],+ decorators: [ComponentDecorator, MemoryRouterDecorator],component: NavigationDrawerCollapseButton,play: async ({ canvasElement, args }) => {const canvas = within(canvasElement);diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/classify-action/components/__stories__/WorkflowClassifyQuestionCriteria.stories.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/classify-action/components/__stories__/WorkflowClassifyQuestionCriteria.stories.tsxindex aa845947dd9..50377735289 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/classify-action/components/__stories__/WorkflowClassifyQuestionCriteria.stories.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/classify-action/components/__stories__/WorkflowClassifyQuestionCriteria.stories.tsx@@ -3,10 +3,11 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';import { useState } from 'react';import { expect, fn, userEvent, within } from 'storybook/test';import { type WorkflowClassifyCriterion } from 'twenty-shared/workflow';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';import { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const INITIAL_CRITERIA: WorkflowClassifyCriterion[] = [{@@ -24,7 +25,7 @@ const meta = {decorators: [WorkflowStepDecorator,ComponentDecorator,- RouterDecorator,+ MemoryRouterDecorator,WorkspaceDecorator,],parameters: { msw: graphqlMocks },diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/classify-action/components/__stories__/WorkflowEditActionClassify.stories.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/classify-action/components/__stories__/WorkflowEditActionClassify.stories.tsxindex 60a020b22c8..0f58894263e 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/classify-action/components/__stories__/WorkflowEditActionClassify.stories.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/classify-action/components/__stories__/WorkflowEditActionClassify.stories.tsx@@ -3,11 +3,12 @@ import { WorkflowEditActionClassify } from '@/workflow/workflow-steps/workflow-aimport { type Meta, type StoryObj } from '@storybook/react-vite';import { useState } from 'react';import { expect, fn, screen, userEvent, within } from 'storybook/test';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';import { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';import { getWorkflowNodeIdMock } from '~/testing/mock-data/workflow';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const DEFAULT_ACTION: WorkflowClassifyAction = {id: getWorkflowNodeIdMock(),@@ -31,7 +32,7 @@ const meta = {decorators: [WorkflowStepDecorator,ComponentDecorator,- RouterDecorator,+ MemoryRouterDecorator,WorkspaceDecorator,],args: { action: DEFAULT_ACTION, actionOptions: { onActionUpdate: fn() } },diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/__stories__/WorkflowEditActionCode.stories.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/__stories__/WorkflowEditActionCode.stories.tsxindex a1f4718ec2a..43cef59bf74 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/__stories__/WorkflowEditActionCode.stories.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/__stories__/WorkflowEditActionCode.stories.tsx@@ -3,7 +3,7 @@ import { WorkflowEditActionCode } from '@/workflow/workflow-steps/workflow-actioimport { type Meta, type StoryObj } from '@storybook/react-vite';import { HttpResponse, graphql } from 'msw';import { fn } from 'storybook/test';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ARGOS_CAPTURE_DISABLED } from '~/testing/constants/ArgosCaptureDisabled';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';@@ -12,6 +12,7 @@ import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecoratoimport { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';import { getWorkflowNodeIdMock } from '~/testing/mock-data/workflow';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const DEFAULT_ACTION: WorkflowCodeAction = {id: getWorkflowNodeIdMock(),@@ -131,7 +132,7 @@ const meta: Meta<typeof WorkflowEditActionCode> = {ComponentDecorator,ObjectMetadataItemsDecorator,ToastDecorator,- RouterDecorator,+ MemoryRouterDecorator,WorkspaceDecorator,],};diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionCreateRecord.stories.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionCreateRecord.stories.tsxindex 5f9dee4afc4..11777011c1c 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionCreateRecord.stories.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionCreateRecord.stories.tsx@@ -1,7 +1,7 @@import { WorkflowEditActionCreateRecord } from '@/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionCreateRecord';import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, fn, userEvent, within } from 'storybook/test';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator';@@ -9,6 +9,7 @@ import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecoratoimport { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';import { getWorkflowNodeIdMock } from '~/testing/mock-data/workflow';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const meta: Meta<typeof WorkflowEditActionCreateRecord> = {title: 'Modules/Workflow/Actions/CreateRecord/EditAction',@@ -43,7 +44,7 @@ const meta: Meta<typeof WorkflowEditActionCreateRecord> = {WorkflowStepActionDrawerDecorator,WorkflowStepDecorator,ComponentDecorator,- RouterDecorator,+ MemoryRouterDecorator,ObjectMetadataItemsDecorator,ToastDecorator,WorkspaceDecorator,diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionDeleteRecord.stories.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionDeleteRecord.stories.tsxindex feda45f00a9..625dd7aeb84 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionDeleteRecord.stories.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionDeleteRecord.stories.tsx@@ -3,7 +3,7 @@ import { type WorkflowDeleteRecordAction } from '@/workflow/types/Workflow';import { WorkflowEditActionDeleteRecord } from '@/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionDeleteRecord';import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, fn, userEvent, within } from 'storybook/test';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator';@@ -12,6 +12,7 @@ import { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';import { mockedPersonRecords } from '~/testing/mock-data/generated/data/people/mock-people-data';import { getWorkflowNodeIdMock } from '~/testing/mock-data/workflow';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const DEFAULT_ACTION = {id: getWorkflowNodeIdMock(),@@ -50,7 +51,7 @@ const meta: Meta<typeof WorkflowEditActionDeleteRecord> = {ComponentDecorator,ObjectMetadataItemsDecorator,ToastDecorator,- RouterDecorator,+ MemoryRouterDecorator,WorkspaceDecorator,],};diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionEmailBase.stories.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionEmailBase.stories.tsxindex f3280e6f1f5..70207571854 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionEmailBase.stories.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionEmailBase.stories.tsx@@ -6,7 +6,7 @@ import { WorkflowEditActionEmailBase } from '@/workflow/workflow-steps/workflow-import { type Meta, type StoryObj } from '@storybook/react-vite';import { HttpResponse, graphql } from 'msw';import { expect, fn, within } from 'storybook/test';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator';@@ -14,6 +14,7 @@ import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecoratoimport { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';import { getWorkflowNodeIdMock } from '~/testing/mock-data/workflow';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const MOCK_CONNECTED_ACCOUNT_ID = '20202020-9ac0-4390-9a1a-ab4d2c4e1bb7';@@ -229,7 +230,7 @@ const meta: Meta<typeof WorkflowEditActionEmailBase> = {ComponentDecorator,ObjectMetadataItemsDecorator,ToastDecorator,- RouterDecorator,+ MemoryRouterDecorator,WorkspaceDecorator,],};diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionFindRecords.stories.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionFindRecords.stories.tsxindex 848aa05368c..30ba9ebb4a1 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionFindRecords.stories.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionFindRecords.stories.tsx@@ -2,7 +2,7 @@ import { type WorkflowFindRecordsAction } from '@/workflow/types/Workflow';import { WorkflowEditActionFindRecords } from '@/workflow/workflow-steps/workflow-actions/find-records-action/components/WorkflowEditActionFindRecords';import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, fn, screen, userEvent, waitFor, within } from 'storybook/test';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator';@@ -10,6 +10,7 @@ import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecoratoimport { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';import { getWorkflowNodeIdMock } from '~/testing/mock-data/workflow';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const DEFAULT_ACTION = {id: getWorkflowNodeIdMock(),@@ -48,7 +49,7 @@ const meta: Meta<typeof WorkflowEditActionFindRecords> = {ComponentDecorator,ObjectMetadataItemsDecorator,ToastDecorator,- RouterDecorator,+ MemoryRouterDecorator,WorkspaceDecorator,],};diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionUpdateRecord.stories.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionUpdateRecord.stories.tsxindex 39e15f78411..862046f38b5 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionUpdateRecord.stories.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionUpdateRecord.stories.tsx@@ -3,7 +3,7 @@ import { type WorkflowUpdateRecordAction } from '@/workflow/types/Workflow';import { WorkflowEditActionUpdateRecord } from '@/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionUpdateRecord';import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, fn, userEvent, within } from 'storybook/test';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator';@@ -12,6 +12,7 @@ import { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';import { mockedPersonRecords } from '~/testing/mock-data/generated/data/people/mock-people-data';import { getWorkflowNodeIdMock } from '~/testing/mock-data/workflow';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const DEFAULT_ACTION = {id: getWorkflowNodeIdMock(),@@ -52,7 +53,7 @@ const meta: Meta<typeof WorkflowEditActionUpdateRecord> = {ComponentDecorator,ObjectMetadataItemsDecorator,ToastDecorator,- RouterDecorator,+ MemoryRouterDecorator,WorkspaceDecorator,],};diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/filter-action/components/__stories__/WorkflowEditActionFilter.stories.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/filter-action/components/__stories__/WorkflowEditActionFilter.stories.tsxindex 54fbe02feaf..5a3d063d8e8 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/filter-action/components/__stories__/WorkflowEditActionFilter.stories.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/filter-action/components/__stories__/WorkflowEditActionFilter.stories.tsx@@ -3,13 +3,14 @@ import { WorkflowEditActionFilter } from '@/workflow/workflow-steps/workflow-actimport { type Meta, type StoryObj } from '@storybook/react-vite';import { fn } from 'storybook/test';import { StepLogicalOperator, ViewFilterOperand } from 'twenty-shared/types';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator';import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';import { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';import { getWorkflowNodeIdMock } from '~/testing/mock-data/workflow';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const DEFAULT_ACTION: WorkflowFilterAction = {id: getWorkflowNodeIdMock(),@@ -86,7 +87,7 @@ const meta: Meta<typeof WorkflowEditActionFilter> = {WorkflowStepActionDrawerDecorator,WorkflowStepDecorator,ComponentDecorator,- RouterDecorator,+ MemoryRouterDecorator,WorkspaceDecorator,ToastDecorator,],diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/__stories__/WorkflowEditActionFormBuilder.stories.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/__stories__/WorkflowEditActionFormBuilder.stories.tsxindex 48415ad45fa..7e478f03ae7 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/__stories__/WorkflowEditActionFormBuilder.stories.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/__stories__/WorkflowEditActionFormBuilder.stories.tsx@@ -3,13 +3,14 @@ import { WorkflowEditActionFormBuilder } from '@/workflow/workflow-steps/workfloimport { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, fn, userEvent, waitFor, within } from 'storybook/test';import { FieldMetadataType } from 'twenty-shared/types';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator';import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';import { getWorkflowNodeIdMock } from '~/testing/mock-data/workflow';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const DEFAULT_ACTION = {id: getWorkflowNodeIdMock(),@@ -60,7 +61,7 @@ const meta: Meta<typeof WorkflowEditActionFormBuilder> = {WorkflowStepActionDrawerDecorator,WorkflowStepDecorator,ComponentDecorator,- RouterDecorator,+ MemoryRouterDecorator,ObjectMetadataItemsDecorator,ToastDecorator,],diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/__stories__/WorkflowEditActionFormFiller.stories.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/__stories__/WorkflowEditActionFormFiller.stories.tsxindex 5d1ad3434a0..b92e09c0e2f 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/__stories__/WorkflowEditActionFormFiller.stories.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/__stories__/WorkflowEditActionFormFiller.stories.tsx@@ -3,13 +3,14 @@ import { WorkflowEditActionFormFiller } from '@/workflow/workflow-steps/workflowimport { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, within } from 'storybook/test';import { FieldMetadataType } from 'twenty-shared/types';-import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';import { ToastDecorator } from '~/testing/decorators/ToastDecorator';import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator';import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';import { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';+import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';const meta: Meta<typeof WorkflowEditActionFormFiller> = {title: 'Modules/Workflow/Actions/Form/WorkflowEditActionFormFiller',@@ -21,7 +22,7 @@ const meta: Meta<typeof WorkflowEditActionFormFiller> = {WorkflowStepActionDrawerDecorator,ComponentDecorator,WorkflowStepDecorator,- RouterDecorator,+ MemoryRouterDecorator,ObjectMetadataItemsDecorator,WorkspaceDecorator,ToastDecorator,diff --git a/packages/twenty-front/src/pages/settings/developers/__stories__/playground/SettingsGraphQLPlayground.stories.tsx b/packages/twenty-front/src/pages/settings/developers/__stories__/playground/SettingsGraphQLPlayground.stories.tsxindex b7c81b84702..e3bff7a922a 100644--- a/packages/twenty-front/src/pages/settings/developers/__stories__/playground/SettingsGraphQLPlayground.stories.tsx+++ b/packages/twenty-front/src/pages/settings/developers/__stories__/playground/SettingsGraphQLPlayground.stories.tsx@@ -2,12 +2,10 @@ import { playgroundApiKeyState } from '@/settings/mcp-and-apis/states/playgroundimport { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';import { type Meta, type StoryObj } from '@storybook/react-vite';import { action } from 'storybook/actions';-import {- ComponentDecorator,- ComponentWithRouterDecorator,-} from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { SettingsGraphQLPlayground } from '~/pages/settings/developers/playground/SettingsGraphQLPlayground';import { graphqlMocks } from '~/testing/graphqlMocks';+import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';const meta: Meta<typeof SettingsGraphQLPlayground> = {title: 'Pages/Settings/Playground/GraphQLPlayground',diff --git a/packages/twenty-front/src/pages/settings/developers/__stories__/playground/SettingsRestPlayground.stories.tsx b/packages/twenty-front/src/pages/settings/developers/__stories__/playground/SettingsRestPlayground.stories.tsxindex 8341a14a117..ca7bf6d76af 100644--- a/packages/twenty-front/src/pages/settings/developers/__stories__/playground/SettingsRestPlayground.stories.tsx+++ b/packages/twenty-front/src/pages/settings/developers/__stories__/playground/SettingsRestPlayground.stories.tsx@@ -2,12 +2,10 @@ import { playgroundApiKeyState } from '@/settings/mcp-and-apis/states/playgroundimport { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';import { type Meta, type StoryObj } from '@storybook/react-vite';import { action } from 'storybook/actions';-import {- ComponentDecorator,- ComponentWithRouterDecorator,-} from 'twenty-ui/testing';+import { ComponentDecorator } from 'twenty-ui/testing';import { SettingsRestPlayground } from '~/pages/settings/developers/playground/SettingsRestPlayground';import { graphqlMocks } from '~/testing/graphqlMocks';+import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';const meta: Meta<typeof SettingsRestPlayground> = {title: 'Pages/Settings/Playground/RestPlayground',diff --git a/packages/twenty-front/src/testing/ComponentStorybookLayout.tsx b/packages/twenty-front/src/testing/ComponentStorybookLayout.tsxdeleted file mode 100644index bf1a66e702a..00000000000--- a/packages/twenty-front/src/testing/ComponentStorybookLayout.tsx+++ /dev/null@@ -1,29 +0,0 @@-import { type JSX } from 'react';-import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';--const StyledLayout = styled.div<{ width?: number }>`- border: 1px solid ${themeCssVariables.border.color.light};- border-radius: 5px;-- display: flex;- flex-direction: row;-- height: fit-content;- max-width: calc(100% - 40px);- min-width: ${({ width }) => (width ? 'unset' : '300px')};- padding: 20px;- width: ${({ width }) => (width ? width + 'px' : 'fit-content')};-`;--type ComponentStorybookLayoutProps = {- width?: number;- children: JSX.Element;-};--export const ComponentStorybookLayout = ({- width,- children,-}: ComponentStorybookLayoutProps) => (- <StyledLayout width={width}>{children}</StyledLayout>-);diff --git a/packages/twenty-front/src/testing/decorators/ComponentWithRouterDecorator.tsx b/packages/twenty-front/src/testing/decorators/ComponentWithRouterDecorator.tsxindex 60df7428ba9..cb5d498f1cb 100644--- a/packages/twenty-front/src/testing/decorators/ComponentWithRouterDecorator.tsx+++ b/packages/twenty-front/src/testing/decorators/ComponentWithRouterDecorator.tsx@@ -13,7 +13,7 @@ import {isRouteParams,} from '~/testing/decorators/PageDecorator';-import { ComponentStorybookLayout } from '~/testing/ComponentStorybookLayout';+import { ComponentStorybookLayout } from 'twenty-ui/testing';interface StrictArgs {[name: string]: unknown;diff --git a/packages/twenty-ui/CHANGELOG.md b/packages/twenty-ui/CHANGELOG.mdindex 2f71035e62b..7a1a1410148 100644--- a/packages/twenty-ui/CHANGELOG.md+++ b/packages/twenty-ui/CHANGELOG.md@@ -4,6 +4,7 @@### Breaking Changes+- `twenty-ui/testing` no longer exports `RouterDecorator`, `ComponentWithRouterDecorator`, `RouteParams`, `isRouteParams`, or `computeLocation`. Use application-owned router decorators when routing is needed, or `ComponentDecorator` for router-free stories. React Router is no longer a peer dependency.- `ResizeHandle` owns pointer and keyboard resizing through `value`/`onValueChange` or `defaultValue`, with configurable `min`, `max`, and `step`. The public `useResizeHandle` hook is removed.- **Public module ownership changes without a deprecation window.** This release removes 55 public React exports and the `twenty-ui/primitives/json-visualizer` entry point. Applications using the removed imports must migrate when upgrading; compatibility exports are not provided.- Import shared compositions, including `JsonTree`, menu presets, and Toast components and hooks, from `twenty-ui/components`. Foundational controls retain `twenty-ui/primitives/<family>` imports. The optional code editor retains `twenty-ui/components/code-editor`.diff --git a/packages/twenty-ui/README.md b/packages/twenty-ui/README.mdindex 7b644447c85..ef460e66d33 100644--- a/packages/twenty-ui/README.md+++ b/packages/twenty-ui/README.md@@ -118,8 +118,8 @@ twenty-ui is released under the [MIT](https://github.com/twentyhq/twenty/blob/maPrimitives provide foundational interaction and presentation. Shared components compose primitives into reusable presets, pickers, menu rows, notifications, and the JSON viewer. Both layers accept data, labels, and callbacks from their host.-Routing adapters, record formatting, product illustrations, and feature-specific animation belong to `twenty-front`. Implementation parts live in `internal` or `parts` directories and are excluded from published barrels.+Record formatting, product illustrations, and feature-specific animation belong to `twenty-front`. Implementation parts live in `internal` or `parts` directories and are excluded from published barrels.Run `node --import tsx scripts/checkModuleOwnership.ts` from this package after changing the public interface. When intentionally adding or removing a public React component, regenerate `docs/module-ownership.json` with `node --import tsx scripts/checkModuleOwnership.ts --write` and review the snapshot diff. CI checks the committed snapshot and the dependency boundaries without updating them.-`twenty-ui/testing` includes routing decorators and requires the optional `react-router-dom` peer. The package check verifies each published entry point, allowing that peer only in testing and the Monaco peers only in `twenty-ui/components/code-editor`.+The package check allows the optional Monaco peers only in `twenty-ui/components/code-editor`.diff --git a/packages/twenty-ui/package.json b/packages/twenty-ui/package.jsonindex 29feff21a07..4ef0b4b295f 100644--- a/packages/twenty-ui/package.json+++ b/packages/twenty-ui/package.json@@ -69,8 +69,7 @@"vite-plugin-dts": "^4.5.4","vite-plugin-sass-dts": "^1.3.31","vite-plugin-svgr": "^4.3.0",- "vitest": "^4.1.0",- "react-router-dom": "^7.18.4"+ "vitest": "^4.1.0"},"dependencies": {"@base-ui/react": "^1.8.0",@@ -86,8 +85,7 @@"@monaco-editor/react": "^4.7.0","monaco-editor": ">= 0.25.0 < 1","react": "^19.0.0",- "react-dom": "^19.0.0",- "react-router-dom": "^7.18.4"+ "react-dom": "^19.0.0"},"scripts": {"build": "npx vite build"@@ -264,9 +262,6 @@},"monaco-editor": {"optional": true- },- "react-router-dom": {- "optional": true}}}diff --git a/packages/twenty-ui/scripts/checkModuleOwnership.ts b/packages/twenty-ui/scripts/checkModuleOwnership.tsindex f8937eac0cf..0b643a79d54 100644--- a/packages/twenty-ui/scripts/checkModuleOwnership.ts+++ b/packages/twenty-ui/scripts/checkModuleOwnership.ts@@ -26,6 +26,7 @@ const IMPLEMENTATION_ONLY_PATTERN = /\/(internal|internals|parts)\//;const SUPPORT_DIRECTORY_PATTERN = /\/(contexts|hooks)\//;const TEST_DIRECTORY_PATTERN = /\/(testing|__tests__|__stories__|__mocks__)\//;const TEST_FILE_PATTERN = /\.(stories|test|spec)\.tsx?$/;+const ROUTER_IMPORT_PATTERN = /^react-router(?:-dom)?(?:\/|$)/;const shouldUpdateSnapshot = process.argv.includes('--write');const actualOwnership: Record<keyof typeof ownership, string[]> = {primitives: [],@@ -119,12 +120,11 @@ for (const file of globSync('**/*.{ts,tsx}', { cwd: SOURCE_ROOT })) {);for (const { fileName: moduleName } of importedFiles) {if (- !isTestOrDeclaration &&- (moduleName === 'react-router-dom' ||- moduleName === 'react-router' ||- moduleName.startsWith('twenty-front') ||- moduleName.startsWith('@/') ||- moduleName.startsWith('~/'))+ ROUTER_IMPORT_PATTERN.test(moduleName) ||+ (!isTestOrDeclaration &&+ (moduleName.startsWith('twenty-front') ||+ moduleName.startsWith('@/') ||+ moduleName.startsWith('~/')))) {errors.push(`${file} depends on application code: ${moduleName}`);}diff --git a/packages/twenty-ui/scripts/checkOptionalDependencies.ts b/packages/twenty-ui/scripts/checkOptionalDependencies.tsindex d634190b42d..64a9c5e65a9 100644--- a/packages/twenty-ui/scripts/checkOptionalDependencies.ts+++ b/packages/twenty-ui/scripts/checkOptionalDependencies.ts@@ -18,7 +18,6 @@ const PACKAGE_PATH = path.resolve('..',);const ALLOWED_OPTIONAL_PEERS_BY_ENTRY_POINT: Record<string, string[]> = {- './testing': ['react-router-dom'],'./components/code-editor': ['@monaco-editor/react', 'monaco-editor'],};const OPTIONAL_PEER_DEPENDENCY_NAMES = Object.entries(diff --git a/packages/twenty-ui/src/components/navigation/RoundedLink/__stories__/RoundedLink.stories.tsx b/packages/twenty-ui/src/components/navigation/RoundedLink/__stories__/RoundedLink.stories.tsxindex 02081642247..ccbb2986812 100644--- a/packages/twenty-ui/src/components/navigation/RoundedLink/__stories__/RoundedLink.stories.tsx+++ b/packages/twenty-ui/src/components/navigation/RoundedLink/__stories__/RoundedLink.stories.tsx@@ -1,13 +1,14 @@+import { type MouseEvent } from 'react';import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, fn, userEvent, within } from 'storybook/test';import { RoundedLink } from '@ui/components/navigation/RoundedLink/RoundedLink';-import { ComponentWithRouterDecorator } from '@ui/testing';+import { ComponentDecorator } from '@ui/testing';const meta: Meta<typeof RoundedLink> = {title: 'UI/Navigation/Link/RoundedLink',component: RoundedLink,- decorators: [ComponentWithRouterDecorator],+ decorators: [ComponentDecorator],args: {href: '/test',label: 'Rounded chip',@@ -16,19 +17,23 @@ const meta: Meta<typeof RoundedLink> = {export default meta;type Story = StoryObj<typeof RoundedLink>;-const clickJestFn = fn();+const handleClick = fn((event: MouseEvent<HTMLElement>) => {+ event.preventDefault();+});export const Default: Story = {args: {- onClick: clickJestFn,+ onClick: handleClick,},play: async ({ canvasElement }) => {const canvas = within(canvasElement);- await expect(clickJestFn).toHaveBeenCalledTimes(0);- const link = canvas.getByRole('link');+ await expect(handleClick).toHaveBeenCalledTimes(0);+ const link = canvas.getByRole('link', { name: 'Rounded chip' });++ await expect(link).toHaveAttribute('href', '/test');await userEvent.click(link);- await expect(clickJestFn).toHaveBeenCalledTimes(1);+ await expect(handleClick).toHaveBeenCalledTimes(1);},};diff --git a/packages/twenty-ui/src/testing/decorators/ComponentWithRouterDecorator.tsx b/packages/twenty-ui/src/testing/decorators/ComponentWithRouterDecorator.tsxdeleted file mode 100644index 437fe85187f..00000000000--- a/packages/twenty-ui/src/testing/decorators/ComponentWithRouterDecorator.tsx+++ /dev/null@@ -1,84 +0,0 @@-import { type JSX } from 'react';-import { type Decorator } from '@storybook/react-vite';-import {- createMemoryRouter,- createRoutesFromElements,- Outlet,- Route,- RouterProvider,-} from 'react-router-dom';--import { ComponentStorybookLayout } from '../ComponentStorybookLayout';--interface StrictArgs {- [name: string]: unknown;-}-export type RouteParams = {- [param: string]: string;-};--export const isRouteParams = (obj: any): obj is RouteParams => {- if (typeof obj !== 'object' || obj === null) {- return false;- }-- return Object.keys(obj).every((key) => typeof obj[key] === 'string');-};--export const computeLocation = (- routePath: string,- routeParams?: RouteParams,-) => {- return {- pathname: routePath.replace(- /:(\w+)/g,- (paramName) => routeParams?.[paramName] ?? '',- ),- };-};--const Providers = () => (- <ComponentStorybookLayout>- <Outlet />- </ComponentStorybookLayout>-);--const createRouter = ({- Story,- args,- initialEntries,- initialIndex,-}: {- Story: () => JSX.Element;- args: StrictArgs;- initialEntries?: {- pathname: string;- }[];- initialIndex?: number;-}) =>- createMemoryRouter(- createRoutesFromElements(- <Route element={<Providers />}>- <Route path={(args.routePath as string) ?? '*'} element={<Story />} />- </Route>,- ),- { initialEntries, initialIndex },- );--export const ComponentWithRouterDecorator: Decorator = (Story, { args }) => {- return (- <RouterProvider- useTransitions={false}- router={createRouter({- Story,- args,- initialEntries:- args.routePath &&- typeof args.routePath === 'string' &&- (args.routeParams === undefined || isRouteParams(args.routeParams))- ? [computeLocation(args.routePath, args.routeParams)]- : [{ pathname: '/' }],- })}- />- );-};diff --git a/packages/twenty-ui/src/testing/decorators/RouterDecorator.tsx b/packages/twenty-ui/src/testing/decorators/RouterDecorator.tsxdeleted file mode 100644index 7f1be7046f8..00000000000--- a/packages/twenty-ui/src/testing/decorators/RouterDecorator.tsx+++ /dev/null@@ -1,8 +0,0 @@-import { type Decorator } from '@storybook/react-vite';-import { MemoryRouter } from 'react-router-dom';--export const RouterDecorator: Decorator = (Story) => (- <MemoryRouter>- <Story />- </MemoryRouter>-);diff --git a/packages/twenty-ui/src/testing/index.ts b/packages/twenty-ui/src/testing/index.tsindex 5a4a3d4f742..9c6a2c2e89e 100644--- a/packages/twenty-ui/src/testing/index.ts+++ b/packages/twenty-ui/src/testing/index.ts@@ -15,12 +15,5 @@ export type {} from './decorators/CatalogDecorator';export { CatalogDecorator } from './decorators/CatalogDecorator';export { ComponentDecorator } from './decorators/ComponentDecorator';-export type { RouteParams } from './decorators/ComponentWithRouterDecorator';-export {- isRouteParams,- computeLocation,- ComponentWithRouterDecorator,-} from './decorators/ComponentWithRouterDecorator';-export { RouterDecorator } from './decorators/RouterDecorator';export { AVATAR_URL_MOCK } from './mocks/avatarUrlMock';export type { CatalogStory } from './types/CatalogStory';diff --git a/yarn.lock b/yarn.lockindex 134d232dc34..3c818622943 100644--- a/yarn.lock+++ b/yarn.lock@@ -50617,7 +50617,6 @@ __metadata:react-docgen-typescript: "npm:^2.2.2"react-dom: "npm:^19.2.0"react-responsive: "npm:^9.0.2"- react-router-dom: "npm:^7.18.4"sass: "npm:^1.83.0"sass-embedded: "npm:^1.83.0"size-limit: "npm:^12.1.0"@@ -50637,14 +50636,11 @@ __metadata:monaco-editor: ">= 0.25.0 < 1"react: ^19.0.0react-dom: ^19.0.0- react-router-dom: ^7.18.4peerDependenciesMeta:"@monaco-editor/react":optional: truemonaco-editor:optional: true- react-router-dom:- optional: truelanguageName: unknownlinkType: soft