From 172be36f1daa3c6dee1b1f39bcbb188c64d523da Mon Sep 17 00:00:00 2001 From: Le-King-Fu Date: Sun, 15 Feb 2026 13:21:11 +0000 Subject: [PATCH] fix: don't pre-select already-imported files when entering source config selectSource had an empty dependency array, causing a stale closure where importedFilesBySource was always the initial empty Map. This made the new-file filter select all files including imported ones. Co-Authored-By: Claude Opus 4.6 --- src/hooks/useImportWizard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useImportWizard.ts b/src/hooks/useImportWizard.ts index 4602428..e604e16 100644 --- a/src/hooks/useImportWizard.ts +++ b/src/hooks/useImportWizard.ts @@ -363,7 +363,7 @@ export function useImportWizard() { dispatch({ type: "SET_STEP", payload: "source-config" }); }, - [] // eslint-disable-line react-hooks/exhaustive-deps + [state.importedFilesBySource] // eslint-disable-line react-hooks/exhaustive-deps ); const loadHeadersWithConfig = useCallback(