Skip to content

fix(ocr): resolve custom ship aliases in GUI fleet selection - #533

Open
ShiinaKuroko wants to merge 1 commit into
OpenWSGR:mainfrom
ShiinaKuroko:fix/ship-alias-search
Open

fix(ocr): resolve custom ship aliases in GUI fleet selection#533
ShiinaKuroko wants to merge 1 commit into
OpenWSGR:mainfrom
ShiinaKuroko:fix/ship-alias-search

Conversation

@ShiinaKuroko

@ShiinaKuroko ShiinaKuroko commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Context

This is a follow-up fix for the OCR-enhanced fleet selection path introduced in #521.

The issue is triggered by the GUI weekly-task / fleet-preset path:

  • the GUI plan sends the canonical backend name (85??) when no explicit custom search_name is present
  • the user alias configuration maps the in-game custom name to that canonical name (????: 85??)
  • the enhanced ship-selection flow searches the in-game list before running OCR, so searching for 85?? filters out the actual ???? entry and OCR receives no matching ship

Fix

  • reverse-resolve the registered user alias before typing the in-game search keyword
  • preserve an explicitly supplied custom alias
  • fall back to the original canonical name when no alias is configured

This remains a backend fallback because the GUI execution path depends on the backend alias registry loaded from ocr.ship_name_aliases. No GUI code is changed.

Tests

  • python -m pytest -q (764 passed)
  • pre-commit run --files autowsgr/vision/ocr_rules.py autowsgr/ui/choose_ship_page.py testing/ui/test_choose_ship_page.py

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
autowsgr/vision/ocr_rules.py 88.88% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@ShiinaKuroko ShiinaKuroko changed the title fix(ui): use custom ship alias for search fix(ocr): resolve custom ship aliases in GUI fleet selection Aug 5, 2026
@ShiinaKuroko
ShiinaKuroko force-pushed the fix/ship-alias-search branch from 4dc2270 to 86f35ce Compare August 5, 2026 03:45
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