Skip to content

Retry stalled character catalog requests - #84

Merged
uyujkk merged 1 commit into
mainfrom
fix/character-catalog
Nov 3, 2026
Merged

uyujkk merged 1 commit into
mainfrom
fix/character-catalog

Conversation

@uyujkk

@uyujkk uyujkk commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Problem

Some users' Genshin and Star Rail character lists never loaded from the miHoYo wiki. Only English names gathered from GameBanana showed, in alphabetical order.

The wiki request sometimes stalls for 20 seconds or more, and which game it hits changes from run to run. The likely cause is miHoYo's CDN rotating to a node that can't be reached, but this wasn't confirmed. Three things made it worse:

  • the request had no timeout of its own, so it waited for HttpClient's 100 s default;
  • it was never retried;
  • the outer catch logged nothing.

Repositories without a recognisable wiki address also never loaded a wiki catalog at all.

Changes

  • CharacterCatalogClient.WithRetryAsync: every catalog request (miHoYo wiki, Endfield, HoYoWiki, GameBanana categories) times out after 20 s. It is retried once after a timeout or network error, but not when the caller cancels or on any other error.
  • CharacterCatalogClient.Describe(wikiUrl, gameWikiUrl): when the repository's own wiki address isn't recognised, the built-in wiki of the matching game is used.
  • Each retry and each final failure is written to app-errors.log, so it shows up in diagnostic reports.

Tests

  • 8 new Core tests cover the wiki fallback and the retry rules.
  • scripts/test-all.ps1: Core 1606, Data 24, Updater 32, Endfield 47, all passing; style check clean.
  • UI smoke tests: 19/19.
  • Live probe in the real app:
    • Genshin, Star Rail and ZZZ each loaded the full wiki catalog.
    • One ZZZ request stalled, timed out and succeeded on the retry.
    • A Genshin repository with no wiki address requested the game's wiki instead. The probe's screenshot was taken before that retry finished, so the final list wasn't seen.
  • Not yet checked on the affected user's machine.

🤖 Generated with Claude Code

The miHoYo wiki request could stall for 20+ seconds on some CDN nodes with
no timeout, no retry and no log, leaving Genshin/HSR character lists empty.

- Each catalog request (wiki, Endfield, HoYoWiki, GameBanana categories)
  times out after 20 s and is retried once on a stall or network error.
- Repositories without a recognisable wiki address fall back to the
  built-in wiki of the matching game.
- Retries and failures are written to app-errors.log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@uyujkk
uyujkk merged commit 9d2603a into main Nov 3, 2026
2 checks passed
@uyujkk uyujkk mentioned this pull request Nov 3, 2026
@uyujkk
uyujkk deleted the fix/character-catalog branch November 4, 2026 00:47
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