patch messages in thread (#12191)

closes https://github.com/twentyhq/twenty/issues/12190
This commit is contained in:
Etienne
2025-05-23 12:24:13 +02:00
committed by GitHub
parent ec9d8e4e95
commit ddab513c0b
18 changed files with 28 additions and 17 deletions

View File

@ -3,6 +3,7 @@ import { renderHook, waitFor } from '@testing-library/react';
import { viewableRecordIdComponentState } from '@/command-menu/pages/record-page/states/viewableRecordIdComponentState';
import { CommandMenuPageComponentInstanceContext } from '@/command-menu/states/contexts/CommandMenuPageComponentInstanceContext';
import gql from 'graphql-tag';
import { QUERY_MAX_RECORDS } from 'twenty-shared/constants';
import { generateEmptyJestRecordNode } from '~/testing/jest/generateEmptyJestRecordNode';
import { getJestMetadataAndApolloMocksWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksWrapper';
import { useEmailThreadInCommandMenu } from '../useEmailThreadInCommandMenu';
@ -155,7 +156,7 @@ const mocks = [
filter: { messageThreadId: { eq: '1' } },
orderBy: [{ receivedAt: 'AscNullsLast' }],
lastCursor: undefined,
limit: 10,
limit: QUERY_MAX_RECORDS,
},
},
result: jest.fn(() => ({

View File

@ -16,6 +16,7 @@ import { useUpsertRecordsInStore } from '@/object-record/record-store/hooks/useU
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
import { isDefined } from 'twenty-shared/utils';
// to improve - https://github.com/twentyhq/twenty/issues/12190
export const useEmailThreadInCommandMenu = () => {
const viewableRecordId = useRecoilComponentValueV2(
viewableRecordIdComponentState,