[#308] Add a "Rescan all logs" checkbox to force a full blueprint log rescan - #310
Conversation
|
@claude review |
Osiris-DevWorks
left a comment
There was a problem hiding this comment.
The core #308 logic is correct and thread-clean: _blueprint_scan_since returns None on force, the scanner treats since=None as the epoch floor (so it genuinely forces a full rescan), the checkbox is read once on the main thread before the queue starts, and reset_force_rescan_checkbox() runs on both success and error paths. Nice. A few things to tidy before it lands, none blocking on their own:
retranslate_ui()omits the new checkbox (src/gui/blueprint_tracker_tab.py) — it re-translates_scan_other_channels_checkboxbut not_force_rescan_checkbox, so on a runtime language switch the force-rescan text/tooltip won't update. Add the matchingsetText/setToolTip.- Empty translations —
force_rescan_checkbox/_tooltipwere added tolanguages/{french,spanish,portuguese_br}/ui.jsonwith bothhtandatempty. English fallback keeps it working, but each activated language needs at least an AI translation (this is also the current merge conflict against the tip — those three files — so fold it into the rebase). - Docstring pointer —
_blueprint_scan_sincesays "see test_blueprint_scan_channels.py" but its tests live intest_blueprint_force_rescan.py. - HELP.md — the new "Rescan all logs" checkbox isn't documented (the added bullet covers #272's other-channels toggle instead). Low urgency since the tooltip covers it in-app.
Scope is resolved now that #289 has merged — please rebase (the only conflicts are the three ui.json files above). Coordinate with #272, which touches the same tab layout row.
Generated by Claude Code
…ueprints Players with more than one install (LIVE + HOTFIX, since they're the same account progression) could earn a blueprint on one channel and never see it marked owned, since the log scan only ever covered the active channel. Adds a checkbox to the Blueprint Tracker tab: when on, "Scan Logs for Owned Blueprints" also scans whichever of LIVE/HOTFIX isn't currently active, if it's installed. PTU/EPTU/TECH-PREVIEW are never included -- those are separate test builds with their own progression, not the same blueprint history. - src/utils/settings.py: new scan_other_channels setting; generalized the per-channel BP Scan watermark functions to accept an explicit channel parameter (already stored per-channel, just had no way to target a channel other than the active one). - src/gui/main_window.py: new pure _channels_to_scan() helper (which channels to queue) plus a sequential scan queue that runs each channel through the existing single-channel worker unchanged, then shows one combined summary once the queue drains. - src/gui/blueprint_tracker_tab.py: the checkbox itself. - docs/HELP.md: documents the new checkbox under the existing "Scan Logs for Owned Blueprints" bullet. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Most players with a HOTFIX-era account run both channels, and scanning the inactive one too is what makes the Owned set actually complete. Defaulting off meant a user could miss blueprints already earned on the other channel simply because they hadn't discovered the checkbox yet -- opting in after the fact doesn't recover what should have been scanned from the start. Users who don't want the extra scan can still turn it off.
… literals, translations HELP.md and a code comment both said the LIVE/HOTFIX cross-scan checkbox was off by default; the code has defaulted it to enabled since commit 1a59415. Fixed both to match. Replaced the hardcoded "LIVE"/"HOTFIX" literals in _LINKED_CHANNELS with AppSettings.CHANNEL_LIVE/CHANNEL_HOTFIX. Added AI translations for the two new blueprint_tracker keys in French, Spanish, and Portuguese (Brazilian), which previously had no entry at all.
…iris-DevWorks#272's branch Rebased the force-rescan checkbox feature onto the current issue/268-scan-other-channels rebase so both checkboxes land in the same tab row cleanly. Also addresses review feedback: - retranslate_ui() now updates the force-rescan checkbox's text and tooltip on a language switch (it previously only handled the scan-other-channels checkbox). - Fixed the _blueprint_scan_since docstring pointing at test_blueprint_scan_channels.py instead of its actual test file, test_blueprint_force_rescan.py. - Documented the new checkbox in HELP.md. - Added AI translations for force_rescan_checkbox/_tooltip in French, Spanish, and Portuguese (Brazilian), previously empty stubs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
a49210a to
846d6e0
Compare
|
Rebased onto #272's updated branch so both checkboxes land in the same row cleanly. Addressed the review feedback:
Full test suite passes. |
Closes #308.
Problem
"Scan Logs for Owned Blueprints" only reads events newer than the last scan's watermark (#222), which keeps repeat scans fast but leaves no way to recover if a user's Owned set ends up wrong -- e.g. an accidental unown, or a scan that ran before a log file finished being written.
Fix
Adds a "Rescan all logs (ignore last scan)" checkbox on the Blueprint Tracker tab, in the same row as the existing "Also scan LIVE/HOTFIX" checkbox (#268). When checked, the next scan bypasses the saved watermark for every queued channel and re-walks each log back to the scanner's own March-2026 epoch floor.
One-shot by design: MainWindow unchecks it once the whole queued scan finishes (success or error), so it doesn't silently keep forcing a slow full rescan on every future click. Deliberately not persisted to
AppSettings, unlike "also scan other channels" -- this isn't a standing preference.New pure helper
_blueprint_scan_since(force_rescan, watermark)decides the effective watermark per queued channel, mirroring the existing_channels_to_scan()pattern for testability.Depends on #272
This branch is built on top of
issue/268-scan-other-channels-for-owned-blueprints(#272, still open) since the new checkbox shares a layout row with that PR's checkbox. That branch isn't on the upstream repo, so this PR is based onrelease/2.3.0like #272 itself -- the diff below includes #272's changes too until #272 merges. Please review/merge #272 first (or review this one together with it); once #272 lands, this diff will shrink to just the #308 checkbox.Testing
tests/test_blueprint_force_rescan.py(4 cases: forced vs unforced, with and without an existing watermark). Full suite passes. Built a portable combined with every other in-flight 2.3.0 branch and confirmed in-app: checking the box and running a scan re-reads every log from scratch instead of just new events, and the checkbox unchecks itself once the scan completes.🤖 Generated with Claude Code