fix(settings): name descending size sort explicitly

The library sort setting used `size` for largest-first sorting while the
ascending option used `sizeAsc`. That made the pair asymmetric and left the
current settings model carrying a legacy-looking key.

Rename the current descending key to `sizeDesc` in the type, menu, and sort
logic. Stored `size` values are normalized to `sizeDesc` on read, so existing
users keep the same largest-first behavior while new writes use the explicit
key.

Test Plan:
- deno task build
- RUSTC_WRAPPER= CARGO_BUILD_RUSTC_WRAPPER= just build
- git diff --check

Refs: local review feedback
This commit is contained in:
2026-05-19 21:28:40 +02:00
parent 59efe9e2d7
commit ebeee2d90a
4 changed files with 13 additions and 6 deletions
@@ -5,7 +5,7 @@ import { GameSort } from '../../lib/types';
const OPTIONS: ReadonlyArray<{ key: GameSort; label: string }> = [
{ key: 'az', label: 'Name (AZ)' },
{ key: 'size', label: 'Size (largest)' },
{ key: 'sizeDesc', label: 'Size (largest)' },
{ key: 'sizeAsc', label: 'Size (smallest)' },
{ key: 'status', label: 'Status' },
];