diff --git a/src/frontend/apps/e2e/__tests__/app-impress/doc-version.spec.ts b/src/frontend/apps/e2e/__tests__/app-impress/doc-version.spec.ts index c1aec64e..e689c610 100644 --- a/src/frontend/apps/e2e/__tests__/app-impress/doc-version.spec.ts +++ b/src/frontend/apps/e2e/__tests__/app-impress/doc-version.spec.ts @@ -142,6 +142,7 @@ test.describe('Doc Version', () => { const thread = page.locator('.bn-thread'); await thread.getByRole('paragraph').first().fill('This is a comment'); await thread.locator('[data-test="save"]').click(); + await expect(thread).toBeHidden(); await goToGridDoc(page, { title: randomDoc, diff --git a/src/frontend/apps/impress/src/features/docs/doc-editor/components/comments/DocsThreadStore.tsx b/src/frontend/apps/impress/src/features/docs/doc-editor/components/comments/DocsThreadStore.tsx index a8484ae8..a0c13f83 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-editor/components/comments/DocsThreadStore.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-editor/components/comments/DocsThreadStore.tsx @@ -1,7 +1,7 @@ import { CommentBody, ThreadStore } from '@blocknote/core/comments'; import type { Awareness } from 'y-protocols/awareness'; -import { APIError, APIList, errorCauses, fetchAPI } from '@/api'; +import { APIError, errorCauses, fetchAPI } from '@/api'; import { Doc } from '@/features/docs/doc-management'; import { useEditorStore } from '../../stores'; @@ -15,7 +15,7 @@ import { ServerThread, } from './types'; -type ServerThreadListResponse = APIList; +type ServerThreadListResponse = ServerThread[]; export class DocsThreadStore extends ThreadStore { protected static COMMENTS_PING = 'commentsPing'; @@ -335,7 +335,7 @@ export class DocsThreadStore extends ThreadStore { const threads = (await response.json()) as ServerThreadListResponse; const next = new Map(); - threads.results.forEach((thread) => { + threads.forEach((thread) => { const threadData: ClientThreadData = serverThreadToClientThread(thread); next.set(thread.id, threadData); });