From 4cbebec31ca450e58d998516f183dec9ad999a85 Mon Sep 17 00:00:00 2001 From: shrimbly Date: Tue, 24 Feb 2026 13:06:40 +1300 Subject: [PATCH] fix(privacy): stop leaking directoryPath in saved workflow JSON - Remove directoryPath field from WorkflowFile literal in saveToFile - Change loadWorkflow fallback chain to exclude workflow.directoryPath - directoryPath already stored in localStorage via saveSaveConfig() - Keep optional directoryPath field in WorkflowFile type for backward compatibility - Old files with directoryPath will still load, new files won't contain it --- src/store/workflowStore.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/store/workflowStore.ts b/src/store/workflowStore.ts index e5f2c299..171a378d 100644 --- a/src/store/workflowStore.ts +++ b/src/store/workflowStore.ts @@ -1541,8 +1541,8 @@ const workflowStoreImpl: StateCreator = (set, get) => ({ const configs = loadSaveConfigs(); const savedConfig = workflow.id ? configs[workflow.id] : null; - // Determine the workflow directory path (passed in, from saved config, or embedded in workflow) - const directoryPath = workflowPath || savedConfig?.directoryPath || workflow.directoryPath; + // Determine the workflow directory path (passed in or from saved config) + const directoryPath = workflowPath || savedConfig?.directoryPath || null; // Hydrate images if we have a directory path and the workflow has image refs let hydratedWorkflow = workflow; @@ -1737,7 +1737,6 @@ const workflowStoreImpl: StateCreator = (set, get) => ({ version: 1, id: workflowId, name: workflowName, - directoryPath: saveDirectoryPath, nodes: currentNodes, edges, edgeStyle,