AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
fix: guard new memo selection during creation
tianma-ifcb81868e4b77
diff --git a/apps/desktop/package.json b/apps/desktop/package.jsonindex 9228e570..4330c9bc 100644--- a/apps/desktop/package.json+++ b/apps/desktop/package.json@@ -1,6 +1,6 @@{"name": "@edgeever/desktop",- "version": "1.6.45",+ "version": "1.6.46","desktopName": "EdgeEver","private": true,"description": "Native EdgeEver desktop client",diff --git a/apps/web/src/components/WorkspaceApp.tsx b/apps/web/src/components/WorkspaceApp.tsxindex 01263e3e..bbd1fe28 100644--- a/apps/web/src/components/WorkspaceApp.tsx+++ b/apps/web/src/components/WorkspaceApp.tsx@@ -672,6 +672,7 @@ export const WorkspaceApp = ({const [selectedMemoId, setSelectedMemoId] = useState<string | null>(null);const [createdMemoEditId, setCreatedMemoEditId] = useState<string | null>(null);const pendingCreatedMemoIdRef = useRef<string | null>(null);+ const creatingMemoSelectionRef = useRef(false);const [selectedMemoIds, setSelectedMemoIds] = useState<Set<string>>(new Set());const [memoSelectionMode, setMemoSelectionMode] = useState(false);const [selectionMoveTargetNotebookId, setSelectionMoveTargetNotebookId] = useState("");@@ -1064,6 +1065,7 @@ export const WorkspaceApp = ({const clearPendingCreatedMemo = useCallback(() => {pendingCreatedMemoIdRef.current = null;+ creatingMemoSelectionRef.current = false;}, []);const applyMobileEditorReturnPreview = useCallback((memoId: string | null) => {@@ -1542,6 +1544,10 @@ export const WorkspaceApp = ({useEffect(() => {const selectedMemoInList = selectedMemoId ? memos.some((memo) => memo.id === selectedMemoId) : false;+ if (creatingMemoSelectionRef.current || pendingCreatedMemoIdRef.current) {+ return;+ }+if (createdMemoEditId && selectedMemoId === createdMemoEditId) {// Keep the create request alive until the editor consumes it. The new// memo can appear in the list before its detail query has mounted the@@ -1650,6 +1656,10 @@ export const WorkspaceApp = ({openStandaloneMobileEditor(data.memo.id);}},+ onError: () => {+ clearPendingCreatedMemo();+ setCreatedMemoEditId(null);+ },});const saveTemplateMutation = useMutation({@@ -2049,6 +2059,7 @@ export const WorkspaceApp = ({setTemplatesOpen(false);setMobileBottomNavActive("home");+ creatingMemoSelectionRef.current = true;createMemoMutation.mutate({notebookId: targetNotebookId,title: template?.title ?? "",diff --git a/package.json b/package.jsonindex 954d2ab8..648824f3 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "edgeever",- "version": "1.6.45",+ "version": "1.6.46","private": true,"type": "module","workspaces": [