Skip to content

[#308] Add a "Rescan all logs" checkbox to force a full blueprint log rescan - #310

Open
Stealrull wants to merge 4 commits into
Osiris-DevWorks:release/2.3.0from
Stealrull:feature/blueprint-force-rescan-checkbox
Open

[#308] Add a "Rescan all logs" checkbox to force a full blueprint log rescan#310
Stealrull wants to merge 4 commits into
Osiris-DevWorks:release/2.3.0from
Stealrull:feature/blueprint-force-rescan-checkbox

Conversation

@Stealrull

Copy link
Copy Markdown
Collaborator

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 on release/2.3.0 like #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

@Ishikudeska

Copy link
Copy Markdown
Collaborator

@claude review

@Osiris-DevWorks Osiris-DevWorks left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_checkbox but not _force_rescan_checkbox, so on a runtime language switch the force-rescan text/tooltip won't update. Add the matching setText/setToolTip.
  • Empty translationsforce_rescan_checkbox / _tooltip were added to languages/{french,spanish,portuguese_br}/ui.json with both ht and at empty. 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_since says "see test_blueprint_scan_channels.py" but its tests live in test_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

Stealrull and others added 4 commits July 27, 2026 11:08
…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>
@Stealrull
Stealrull force-pushed the feature/blueprint-force-rescan-checkbox branch from a49210a to 846d6e0 Compare July 27, 2026 01:49
@Stealrull

Copy link
Copy Markdown
Collaborator Author

Rebased onto #272's updated branch so both checkboxes land in the same row cleanly. Addressed the review feedback:

  • retranslate_ui() now updates the force-rescan checkbox's text and tooltip on a language switch.
  • Fixed the 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.

Full test suite passes.

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.

3 participants