Description
After running more than one scan in a session, exporting the IPs of an older batch yields an empty / 0-byte file, even though the History entry still shows the correct success count. The export of the batch that is currently "live" works; subsequent exports of aged-out batches are empty.
Steps to reproduce
- Run a scan, then export Valid IPs (TXT) → file has content. ✅
- Run a second scan.
- Go to History → Export Valid on the first scan (or use Valid IPs (All)).
- Downloaded file is 0 bytes, despite the History entry showing N successes. ❌
Root cause
In src/App.tsx:
const mergedResults = liveResults.length ? liveResults : allResults;
liveResults holds only the current batch (reset at each scan start). allResults accumulates every batch (persisted to localStorage). Because the ternary returns liveResults whenever it's non-empty, a finished scan shadows allResults, so any export filtering mergedResults by an older batchId finds nothing → empty file.
Expected
Exporting any batch from History (and "All") returns its results regardless of how many scans ran afterwards.
Fix
Make mergedResults a deduped union of the live batch and all persisted batches. (PR opened.)
Description
After running more than one scan in a session, exporting the IPs of an older batch yields an empty / 0-byte file, even though the History entry still shows the correct success count. The export of the batch that is currently "live" works; subsequent exports of aged-out batches are empty.
Steps to reproduce
Root cause
In
src/App.tsx:liveResultsholds only the current batch (reset at each scan start).allResultsaccumulates every batch (persisted to localStorage). Because the ternary returnsliveResultswhenever it's non-empty, a finished scan shadowsallResults, so any export filteringmergedResultsby an olderbatchIdfinds nothing → empty file.Expected
Exporting any batch from History (and "All") returns its results regardless of how many scans ran afterwards.
Fix
Make
mergedResultsa deduped union of the live batch and all persisted batches. (PR opened.)