Files
amibis/Amibis
dfj 5fba4ac10c Keep latest-phase progress independent of the selected phase
The bar could change when switching phases: latestCompletionRatio was nil
until the selected phase's stats were complete AND the latest list was
cached, and the UI then fell back to the selected phase's own completion
ratio. Right after login the latest list's items are often not cached
yet, so switching phases visibly moved the bar.

Always compute a latest-phase ratio inside CompareGear: stats-based when
both the latest list and the equipped items are cached, otherwise slot
completion against the latest list. Return latestStatsComplete so the UI
can mark the estimate with "~" and keep retrying until stats load
(capped at 20 attempts). The UI now uses latestCompletionRatio directly
instead of falling back to the selected phase.

Also refresh on PLAYER_EQUIPMENT_CHANGED so gear swaps update the bar.

Tests: phase-independent ratio, slot-based fallback while the latest
list is uncached, and equal ratios across selected phases once cached.
106 passing.
2026-10-24 13:37:33 +02:00
..
2026-06-04 00:04:49 +02:00