Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(md): temp disable same state check for md history (#5569)
Seamus2248a39b5f07
diff --git a/apps/web/src/features/block-md/history/HistoryContext.tsx b/apps/web/src/features/block-md/history/HistoryContext.tsxindex 9ca6eff075..502ddec2f5 100644--- a/apps/web/src/features/block-md/history/HistoryContext.tsx+++ b/apps/web/src/features/block-md/history/HistoryContext.tsx@@ -6,7 +6,6 @@ import {buildDiffState,buildWhoMap,diffStates,- serializedEditorStateToMarkdown,} from '@macro-inc/lexical-core';import { useDocumentPeersQuery } from '@queries/sync/document-peers';import type { HistorySession, HistoryVersionId } from '@service-sync/client';@@ -191,19 +190,22 @@ export function HistoryProvider(props: {}}- const index = historyIndex();- if (!index) return sessionize(events);- return sessionize(events).filter((s) => {- const before = index.checkoutAt(s.startMs - 1);- const after = index.checkoutAt(s.endMs);- // Can't compute both states (edge frontiers) — keep rather than hide.- if (!before || !after) return true;- return (- // HACK: basically, some deltas are not visually different, and that's confusing- serializedEditorStateToMarkdown(before) !==- serializedEditorStateToMarkdown(after)- );- });+ return sessionize(events);+ // TODO (seamus/wolf): this is expensive. on 55 bones test doc each+ // each inter of the filter loop took avg 6 seconds.+ // const index = historyIndex();+ // if (!index) return sessionize(events);+ // return sessionize(events).filter((s) => {+ // const before = index.checkoutAt(s.startMs - 1);+ // const after = index.checkoutAt(s.endMs);+ // // Can't compute both states (edge frontiers) — keep rather than hide.+ // if (!before || !after) return true;+ // return (+ // // HACK: basically, some deltas are not visually different, and that's confusing+ // serializedEditorStateToMarkdown(before) !==+ // serializedEditorStateToMarkdown(after)+ // );+ // });});const checkoutAt = (ms: number): SerializedEditorState | null =>