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: make documents open fast again (#4727)
Wolf Mermelstein23ba130a1220
diff --git a/js/app/packages/block-md/history/HistoryContext.tsx b/js/app/packages/block-md/history/HistoryContext.tsxindex 28d8cca1c8..1011cf1c79 100644--- a/js/app/packages/block-md/history/HistoryContext.tsx+++ b/js/app/packages/block-md/history/HistoryContext.tsx@@ -95,7 +95,7 @@ export function HistoryProvider(props: {// local scrubbing from it. The full snapshot (not updates) is required so// getAllChanges() carries the per-change timestamp metadata.const [historyDoc] = createResource(- () => props.documentId(),+ () => (isOpen() ? props.documentId() : undefined),async (documentId) => {const result = await syncServiceClient.getSnapshot({ documentId });if (result.isErr()) throw new Error(String(result.error));@@ -106,7 +106,9 @@ export function HistoryProvider(props: {);// Peer -> user mapping for labelling sessions; lightweight JSON.- const peerMap = useDocumentPeersQuery(props.documentId);+ const peerMap = useDocumentPeersQuery(() =>+ isOpen() ? props.documentId() : ''+ );// AI peers are recognizable from the peer id alone (reserved block) and all// collapse into the single Macro identity. Checked before the peer map,