Skip to content

Start achievement cycling before icon prefetch and request smaller Xbox icon assets#59

Merged
kzryzstof merged 2 commits into
mainfrom
copilot/implement-achievement-cycle-without-icons
Apr 15, 2026
Merged

Start achievement cycling before icon prefetch and request smaller Xbox icon assets#59
kzryzstof merged 2 commits into
mainfrom
copilot/implement-achievement-cycle-without-icons

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

Achievement rotation was blocked until all Xbox icons finished prefetching, which delayed name/description updates. This change decouples cycle readiness from icon availability and reduces icon payload size by requesting fixed-dimension assets.

  • Session readiness and cycle start

    • Xbox session is now marked ready once achievements are fetched/sorted, not after full icon prefetch.
    • Achievement name/description sources can cycle immediately while icon prefetch continues asynchronously.
    • Session-ready contract/comments were updated across Xbox session/monitoring interfaces to reflect the new behavior.
  • Icon rendering behavior while downloads are pending

    • On achievement change with a new icon URL, the current icon is cleared immediately (no stale carryover).
    • Text sources continue updating as usual; icon appears only after download + reload completes.
    • If only unlock state changes (same URL), state is updated without redundant image download.
  • Xbox icon payload reduction

    • Achievement icon URLs are normalized to request w=200&h=200 image variants.
    • Existing size params are preserved when already present.
    • Media asset URLs are normalized consistently with primary icon URLs.
  • Prefetch pacing

    • Reduced per-icon throttle delay in background prefetch to speed cache warmup without making prefetch a gating path.
/* Session is considered ready as soon as achievements are fetched/sorted.
 * Icon prefetching continues in the background and should not block the cycle. */
if (on_ready) {
    on_ready();
}
prefetch_achievement_icons(session->achievements);

@kzryzstof kzryzstof marked this pull request as ready for review April 15, 2026 00:21
@kzryzstof kzryzstof merged commit a7f204d into main Apr 15, 2026
7 checks passed
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.

2 participants