From e4e69185edd534ca39aa28eecf6eebe8a1f96139 Mon Sep 17 00:00:00 2001 From: Michael Gartner Date: Tue, 16 Sep 2025 14:57:26 -0600 Subject: [PATCH] reduce last actions to 5, re-add user name to error email --- apps/roam/src/components/canvas/Tldraw.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/roam/src/components/canvas/Tldraw.tsx b/apps/roam/src/components/canvas/Tldraw.tsx index 351c10804..ba737fe6b 100644 --- a/apps/roam/src/components/canvas/Tldraw.tsx +++ b/apps/roam/src/components/canvas/Tldraw.tsx @@ -91,6 +91,7 @@ import { getSetting } from "~/utils/extensionSettings"; import { isPluginTimerReady, waitForPluginTimer } from "~/utils/pluginTimer"; import { HistoryEntry } from "@tldraw/store"; import { TLRecord } from "@tldraw/tlschema"; +import getCurrentUserDisplayName from "roamjs-components/queries/getCurrentUserDisplayName"; declare global { interface Window { @@ -536,6 +537,7 @@ const TldrawCanvas = ({ title }: { title: string }) => { type: "Tldraw Error", context: { title: title, + user: getCurrentUserDisplayName(), lastActions: lastActionsRef.current, }, }).catch(() => {}); @@ -635,7 +637,7 @@ const TldrawCanvas = ({ title }: { title: string }) => { app.on("change", (entry) => { lastActionsRef.current.push(entry); - if (lastActionsRef.current.length > 10) + if (lastActionsRef.current.length > 5) lastActionsRef.current.shift(); });