Repository navigation
fix(discover): reanalyze files where they are, not through the smart-folder watcher - #120
Merged
Merged
Conversation
…folder watcher Reanalyze on a Discover file card and "Reanalyze N" in Organize sent the file to SmartFolderWatcher.reanalyzeFile, which refuses any file outside a watched Smart Folder. Discover's files are source files, so the action always ended in "This file is not inside a configured Smart Folder". Both controls now re-run the Discover analysis run for those paths with bypassCache, so the analyzers skip the cached result: - analysis IPC: the single-file analyze payload accepts bypassCache and passes it to the document, image and media analyzers - preload: files.analyze forwards bypassCache - useAnalysis: reanalyzeFiles(paths) runs the per-file path with the cache bypassed, does not auto-advance to Organize, and reports reanalysis results in its own words; refused while a run is active - Organize: the button is disabled while an analysis runs The watcher's embeddings.reanalyzeFile route is left in place; it no longer has a renderer caller.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Reanalyze on a Discover file card, and Reanalyze N in Organize, sent the file to
SmartFolderWatcher.reanalyzeFile. The watcher refuses any file outside a watched Smart Folder, and Discover's files are source files, so the action ended in:Change
Both controls now re-run Discover's own analysis run for those paths with
bypassCache, so the analyzers skip the cached result and the card updates in place.src/main/ipc/analysis.js): the single-file analyze payload acceptsbypassCache(boolean) and passes it to the document, image and media analyzers.files.analyzeforwardsbypassCache.useAnalysis: newreanalyzeFiles(paths), exposed throughuseAnalysisRun(). It always uses the per-file path, does not auto-advance to Organize, does not set the total-failure state, and reports "Reanalyzed N files" / "Reanalysis failed for N files".UncategorizedActionsBartakesonReanalyzeand is disabled while an analysis runs.Behaviour to know about
embeddings.reanalyzeFile,EMBEDDINGS.REANALYZE_FILE,SmartFolderWatcher.reanalyzeFile) is left in place but no longer has a renderer caller. Removing it also means removing the watcher's exclusion-exemption logic and its tests, so it is left for a separate change.Testing
npm run cirun locally on Windows: passes (944 suites, 13,916 tests passed, 4 skipped; typecheck, allverify:*checks and the production build).reanalyzeFiles(cache bypass, path matching, no auto-advance, failure wording, busy and empty refusals), the card action and the Organize button.