Skip to content

make loading per-platform stats opt-in so homepage doesn't fetch them#3158

Open
cciollaro wants to merge 1 commit intorommapp:masterfrom
cciollaro:fix/stats-lazy-platform-breakdown
Open

make loading per-platform stats opt-in so homepage doesn't fetch them#3158
cciollaro wants to merge 1 commit intorommapp:masterfrom
cciollaro:fix/stats-lazy-platform-breakdown

Conversation

@cciollaro
Copy link
Copy Markdown

@cciollaro cciollaro commented Mar 22, 2026

I realized like a week after augmenting the stats response that stats are also loaded from homepage and don't need the per-platform info. So I wanted to make the per-platform info opt-in so we don't slow down homepage loads for people. Homepage and stats page are the only two locations this endpoint is called.

Summary

  • The /stats endpoint is called on both the homepage and the Server Stats page, but only the stats page displays metadata coverage and region breakdown
  • Adds an include_platform_stats query param (default false) so the homepage skips the expensive per-platform queries
  • Only the Server Stats page passes include_platform_stats=true

Test plan

  • Visit homepage — verify stats bar loads quickly, no metadata/region data in network response
  • Visit Server Stats page — verify metadata coverage and region breakdown still display correctly

This PR was developed with AI assistance (Claude Code), as required by CONTRIBUTING.md.

🤖 Generated with Claude Code

The /stats endpoint is called on both the homepage and the server stats
page, but only the stats page displays metadata coverage and region
breakdown. Add an `include_platform_stats` query param (default false)
so the homepage avoids the expensive per-platform queries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cciollaro cciollaro marked this pull request as ready for review March 23, 2026 16:26
@cciollaro cciollaro changed the title fix: skip expensive platform stats on homepage make loading per-platform stats opt-in so homepage doesn't fetch them Mar 23, 2026
@gantoine gantoine added the on-hold Pending further research or blocked by another issue label Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on-hold Pending further research or blocked by another issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants