SIGN IN SIGN UP

fix(gui): prefer firmware codename over catalog name for M650 variants (#1366)

* fix(gui): prefer firmware codename over catalog name for M650 variants

The asset catalog stores one static displayName per depot regardless of
which extended_model_id colour/hand variant a physical unit reports. A
plain Signature M650 (BLE direct) shares the Signature M650 L depot's
modelId (2b02a), so it always rendered as "Signature M650 L".

Add variant_display_name(): when the catalog name is exactly the
device's own reported name plus extra trailing qualifier word(s) (e.g.
"L"), prefer the device's own wording. A catalog name that isn't a
superset of the codename is left untouched, so the catalog stays
authoritative outside this variant-suffix case.

Fixes #1332

Co-authored-by: AprilNEA <github@sku.moe>

* fix(gui): only strip a recognized variant qualifier from the catalog name

variant_display_name treated any trailing catalog word(s) beyond the
codename's length as a wrong variant suffix to strip. That also
matches the opposite, legitimate case: a terse codename ("MX Master")
against a catalog name carrying a real generation suffix ("MX Master
3S") the codename doesn't repeat — stripping "3S" there loses a
correct, more specific model name.

Narrow the override to catalog names whose only trailing difference is
a recognized variant-qualifier word (currently "L"/"Left", the #1332
case), leaving a real model word like "3S" or "X" untouched.

Co-authored-by: AprilNEA <github@sku.moe>

* test(gui): cover per-device names with shared asset caching

Co-authored-by: AprilNEA <github@sku.moe>

---------

Co-authored-by: AprilNEA <github@sku.moe>
A
Anıl Akpınar committed
d8bf61f75ca6f52935c8255248378fc6e1c6d71c
Parent: 11317be
Committed by GitHub <noreply@github.com> on 9/24/2026, 3:39:31 PM