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>
Enhances the server stats page with two new per-platform statistics:
- Metadata coverage: shows which sources matched ROMs (ordered by user's scan priority config)
- Region breakdown: shows ROM counts per region with flag emojis
Backend adds two new efficient queries (single GROUP BY for metadata, Python-side aggregation for regions).
Frontend redesigns platform cards with a tabular detail layout, size bar visualization, and expandable region chips.
> This PR was developed with AI assistance (Claude Code) per CONTRIBUTING.md disclosure requirements.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
According to multiple FastAPI discussions [1], FastAPI only includes a
built-in mechanism to redirect requests including a trailing slash, to
its variation without slash, using a `307` status code.
This can be an issue when certain clients do not send the same headers
on the redirected request.
This change adds a custom FastAPI `APIRouter`, that registers both route
path variations (with and without trailing slash), while only marking
the path without slash for being included in the OpenAPI schema.
[1] https://github.com/fastapi/fastapi/discussions/7298