Repository navigation
Index and list a source added while the case is busy - #223
Merged
Merged
Conversation
Find similar's background indexer marked each pass done and only noticed new files while idle. A source ingested during a pass was already counted when the indexer went idle, so it sat idle with those files unindexed, and the Build indexes button stayed hidden because the indexer counted as running. Each pass now records how many files it covered and runs again whenever that changes. Add evidence followed its job with a tracker that only moved a bar and reloaded the page at the end, so the new source was missing from the Source filter (and its thumbnails from the gallery) until the whole job finished. It now follows the job with the bottom bar, as a new case does, which refreshes both while the files process. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Two things went wrong after adding a source to a case that was already open, both seen on a real three-source case (a VIC JSON, an E01, then an extraction zip).
Find similar stopped indexing new sources
The background indexer marked each pass done and looked for new files only while idle, comparing file counts from the moment it went idle. A source ingested while a pass was running was already counted by then, so the indexer sat idle with its files unindexed: the E01's 46,386 files in the case above. The Build indexes button stayed hidden too, because the indexer still counted as running. Only closing and reopening the case got it going.
Now each pass records how many files it covered when it ran to its end, and runs again whenever that number changes, however the files arrived (
gleapp/web/indexer.py).test_a_source_added_while_the_indexer_works_is_indexed_tooadds a second source during the content pass and waits for it to be indexed without a restart. It passes with the fix and fails on the old indexer (stuck at 3 of 6 files after a minute).Add evidence didn't list the new source until the job finished
Add evidence followed its job with a tracker that only moved the bar and reloaded the page at the end. The new source was missing from the Source filter, and its thumbnails from the gallery, until the whole job was done. It now follows the job with the bottom bar, as starting a new case does: the gallery refreshes every 5 seconds and the Source list every 15 while the files process (
gleapp/web/static/app.js). Not covered by an automated test (front end only); the JavaScript parses (node --check).Checks
Locally on Windows: 795 passed, 6 skipped before the Add evidence change, and the 105 web and Find similar tests after it; lint (changed files) and line endings pass.
🤖 Generated with Claude Code