Skip to content

Index and list a source added while the case is busy - #223

Merged
charpy4n6 merged 1 commit into
mainfrom
fix/indexer-new-sources
Sep 27, 2026
Merged

charpy4n6 merged 1 commit into
mainfrom
fix/indexer-new-sources

Conversation

@charpy4n6

Copy link
Copy Markdown
Collaborator

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_too adds 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

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]>
@charpy4n6
charpy4n6 merged commit 7457bb5 into main Sep 27, 2026
8 checks passed
@charpy4n6
charpy4n6 deleted the fix/indexer-new-sources branch September 30, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant