13 Commits

Author SHA1 Message Date
Georges-Antoine Assi
0ab433b6f0
run trunk fmt 2026-04-01 19:27:34 -04:00
cc
ce85a26185 fix: skip expensive platform stats on homepage
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>
2026-03-22 17:59:07 -04:00
cc
778097f4a0 feat: add per-platform metadata coverage and region breakdown to server stats
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>
2026-03-09 22:15:08 -04:00
zurdi
c2faccabc3
refactor: update StatsReturn structure and related components; remove unused code and enhance platform stats display 2025-05-20 16:09:03 +00:00
zurdi
2cca4c7367
refactor: update StatsReturn structure and enhance stats retrieval; add PlatformsSize component for detailed platform stats 2025-05-19 17:50:11 +00:00
Georges-Antoine Assi
7d54ef877b
[HOTFIX] Remove single forward-slash endpoints 2025-02-11 13:48:24 -05:00
Michael Manganiello
70825830c4
misc: Set prefix and tags to API routers
Improve OpenAPI documentation by setting tags to each API router. Also,
set a prefix to each router to group the endpoints by their
functionality.
2025-02-09 11:31:13 -03:00
Michael Manganiello
8abbae4c02
misc: Make backend handle URLs with trailing slash
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
2024-08-07 00:22:21 -03:00
Georges-Antoine Assi
9ad28f3294
more refactoring again 2024-05-05 16:32:40 -04:00
Georges-Antoine Assi
def2608c28
refactor db handlers 2024-05-05 15:46:07 -04:00
Georges-Antoine Assi
1a2c914045
refactor handlers out into own files 2024-05-05 12:45:56 -04:00
Georges-Antoine Assi
81b5bcf9ba
refactor handler names 2024-01-18 14:04:35 -05:00
Zurdi
0af3ffb86f refactor stats and user handlers 2024-01-17 01:43:16 +01:00