Skip to content

Commit 3b906c0

Browse files
authored
reduce last actions to 5, re-add user name to error email (#447)
1 parent 0b715b4 commit 3b906c0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/roam/src/components/canvas/Tldraw.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ import { getSetting } from "~/utils/extensionSettings";
9191
import { isPluginTimerReady, waitForPluginTimer } from "~/utils/pluginTimer";
9292
import { HistoryEntry } from "@tldraw/store";
9393
import { TLRecord } from "@tldraw/tlschema";
94+
import getCurrentUserDisplayName from "roamjs-components/queries/getCurrentUserDisplayName";
9495

9596
declare global {
9697
interface Window {
@@ -536,6 +537,7 @@ const TldrawCanvas = ({ title }: { title: string }) => {
536537
type: "Tldraw Error",
537538
context: {
538539
title: title,
540+
user: getCurrentUserDisplayName(),
539541
lastActions: lastActionsRef.current,
540542
},
541543
}).catch(() => {});
@@ -635,7 +637,7 @@ const TldrawCanvas = ({ title }: { title: string }) => {
635637

636638
app.on("change", (entry) => {
637639
lastActionsRef.current.push(entry);
638-
if (lastActionsRef.current.length > 10)
640+
if (lastActionsRef.current.length > 5)
639641
lastActionsRef.current.shift();
640642
});
641643

0 commit comments

Comments
 (0)