Commit Graph

3365 Commits

Author SHA1 Message Date
Georges-Antoine Assi
b1cd003625 run fmt 2026-03-11 22:27:33 -04:00
Georges-Antoine Assi
6900f91f54 run fmt 2026-03-11 22:03:16 -04:00
copilot-swe-agent[bot]
d45530cd8b Add typed RomUserData model for documented partial ROM user props update
Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-03-12 01:41:10 +00:00
Georges-Antoine Assi
fcfb74a8a2 Merge pull request #3119 from rommapp/copilot/use-pico-8-cover-art
feat: use PICO-8 built-in cover art from .p8.png cartridge files
2026-03-11 21:22:36 -04:00
Georges-Antoine Assi
744d92d6d1 lower fs name 2026-03-11 21:05:01 -04:00
Georges-Antoine Assi
122cdf072d fix tests 2026-03-11 20:52:23 -04:00
Georges-Antoine Assi
7961af6525 run fmt 2026-03-11 19:13:19 -04:00
copilot-swe-agent[bot]
24fe5b941f refactor: move get_pico8_cover_url to FSRomsHandler, use validate_path for safe path construction
Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-03-11 22:17:22 +00:00
Zurdi
4c680f4919 Merge pull request #3121 from Bergbok/playable-filter-fix
fix: add missing platforms to playable game filter
2026-03-11 16:24:00 +01:00
Bergbok
99e41cecc2 refactor: create list for playable platforms that don't use EJS 2026-03-11 17:18:13 +02:00
Bergbok
ed61158aee fix: include DOS, Game Boy Color and Sega 32X games in playable filter 2026-03-11 16:40:39 +02:00
Bergbok
cad510a0b0 refactor: remove duplicate C64 entry from EJS_SUPPORTED_PLATFORMS 2026-03-11 16:37:49 +02:00
Bergbok
8517fb9aca fix: include browser games in playable filter 2026-03-11 16:11:08 +02:00
copilot-swe-agent[bot]
2958e6f12b feat: use PICO-8 built-in cover art from .p8.png cartridge files
Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-03-11 02:35:18 +00:00
Georges-Antoine Assi
6f02a4beff Merge pull request #3114 from tmgast/feature/client-api-tokens
Add client API tokens with QR pairing flow
2026-03-10 22:17:05 -04:00
nendo
fb37c5cafe fix fork to match upstream changes and verify tests 2026-03-11 11:01:23 +09:00
Georges-Antoine Assi
9b95e85dee Merge pull request #3110 from cciollaro/feat/stats-metadata-coverage-regions
Per-platform metadata coverage and region breakdown to server stats
2026-03-10 21:58:32 -04:00
nendo
6de2a478f3 fix: remove dead code and add missing validation
- Consolidate PAIR_CODE_TTL_SECONDS to single source in utils
- Add min_length=1 validation on scopes field
- Remove unused pairExpiresIn ref, rawToken ref, dead emitter listener
- Fix formattedCode fallback to return normalized value
2026-03-11 10:56:35 +09:00
nendo
ea5b7546aa refactor: address PR #3114 review feedback
- Use atomic getdel for pairing code exchange
- Add cascade="all, delete-orphan" to User.client_tokens
- Move generate/hash_client_token into AuthHandler as static methods
- Extract endpoint helpers to utils/client_tokens.py
2026-03-11 10:56:35 +09:00
nendo
d97791f1d4 fix: address PR review feedback
- Add back_populates="client_tokens" to ClientToken.user relationship
- Fix rate limit race condition: increment-first pattern instead of
  read-then-write
- Remove unused User import from tests
- Add i18n keys to all non-en_US locales
2026-03-11 10:56:35 +09:00
nendo
bd5b3375f0 fix: remove unused User import and add i18n keys to all locales
Fixes trunk_check (unused import) and check-translations (missing
keys in non-en_US locales) CI failures.
2026-03-11 10:56:35 +09:00
nendo
e0b25fbc6c feat(client-tokens): add client API tokens with QR pairing flow
Long-lived, revocable, scope-restricted tokens for external clients
(mobile apps, retro handhelds, third-party tools). Includes:

- Backend: model, migration, DB handler, auth integration (rmm_ prefix
  routing in HybridAuthBackend), CRUD + pairing + exchange endpoints,
  rate limiting, scope intersection enforcement, admin oversight
- Frontend: settings page with token management table, stepped
  create/deliver dialog (config -> copy/pair), QR code with RomM logo,
  admin token table, standalone /pair page for QR scan landing
- /pair page supports custom-scheme callbacks for app deep linking,
  falls back to displaying code for manual entry
- 33 backend tests across 5 classes (CRUD, auth, isolation, pairing,
  admin)
2026-03-11 10:56:35 +09:00
Georges-Antoine Assi
0c18c2588c run fmt 2026-03-10 21:47:27 -04:00
cc
0db3be7d83 fix: revert TypedDict keys to int (Pydantic validates at runtime)
Pydantic enforces response types before JSON serialization, so the
Python dict must use int keys to match the actual data. JSON handles
the int-to-string conversion automatically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 20:14:03 -04:00
cc
a4e8d9df49 fix: sort without mutating store, move constants to module scope
- Spread allPlatforms before sorting to avoid mutating Pinia store
- Move _METADATA_SOURCE_COLUMNS to module level
- Add optional chain on sourceInfo v-img src

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 20:09:19 -04:00
cc
f82a4e15f5 fix: address remaining review feedback
- Use i18n key for "games" label instead of hardcoded "Roms"
- Remove min-width on size bar fill so zero-size platforms show no bar
- Align Python TypedDict keys to str to match JSON wire format

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 19:58:14 -04:00
cc
52c53505a1 refactor: address review feedback
- Derive metadata source columns from Rom model instead of hardcoded list
- Replace getOrderedCoverage() function calls with a computed map to avoid
  redundant sorting on each render

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 19:27:50 -04:00
Georges-Antoine Assi
3ebeb10b1c Merge pull request #3116 from JamieeBond/feature/shared-logic-path-video
Add property for path_video and refactor places which use similar logic
2026-03-10 16:58:09 -04:00
Georges-Antoine Assi
478b7b970a run fmt 2026-03-10 16:53:36 -04:00
Georges-Antoine Assi
a4a4fd29c8 Merge pull request #3111 from rommapp/copilot/improve-firmware-detection-message
Show firmware count in scan results to improve BIOS detection discoverability
2026-03-10 16:37:03 -04:00
Georges-Antoine Assi
8e4c5114cc Merge pull request #3109 from rommapp/copilot/fix-cleanup-all-hangs-issue
Move "Clean up All" missing ROMs deletion to background task
2026-03-10 16:26:00 -04:00
Georges-Antoine Assi
2dd3c18562 fix tunk check 2026-03-10 16:21:40 -04:00
Georges-Antoine Assi
8f8ef1f700 some changes from review 2026-03-10 16:13:21 -04:00
Jamie Bond
1e6f0d6000 Add property for path_video and refactor places which use similar logic to access video paths 2026-03-10 20:32:54 +01:00
Georges-Antoine Assi
f0e5abadc9 fix tests again 2026-03-10 09:23:12 -04:00
Georges-Antoine Assi
f6eb686559 fix tests 2026-03-10 08:38:43 -04:00
HydroSulphide
b9ea937373 Merge branch 'master' into fix-oauth-token-expiry-and-refresh-rotation 2026-03-10 08:51:44 +01:00
HydroSulphide
fd788684b9 fix: TOCTOU race condition allows duplicate refresh token use 2026-03-10 08:38:32 +01:00
HydroSulphide
02336974a6 Implemented greptile suggestions 2026-03-10 08:04:07 +01:00
HydroSulphide
8758cb31b7 Tried to fix everything the bot complained about and the failed pytests.
Three tests were also implemented to check initial implementation that now invalidates expired access and refresh tokens and also rotating refresh tokens.

Since I introduced wrapper functions for create_oauth_token to distinguish between access and refresh token there is no need to set the token type in the data dict, since the type is now enforced in the wrapper functions create_access_token and create_refresh_token.

By convention I renamed create_oauth_token to _create_oauth_token as it is considered a private helper function now.
2026-03-10 07:22:02 +01:00
Georges-Antoine Assi
bbb257b68a style to my liking 2026-03-09 23:37:35 -04:00
Georges-Antoine Assi
fae1e120c2 Merge pull request #3107 from rommapp/copilot/add-oidc-rp-initiated-logout
Implement OIDC RP-Initiated Logout (end-session endpoint)
2026-03-09 23:12:37 -04:00
Georges-Antoine Assi
11c16e92bd run fmt 2026-03-09 22:53:30 -04:00
copilot-swe-agent[bot]
54fdc62e8e refactor: aggregate firmware socket event to fire once per platform with a count
Instead of emitting scan:scanning_firmware once per firmware file, emit
a single event per platform after all firmware is processed, carrying
only the firmware_count. Frontend tracks firmware_count (int) on each
ScanningPlatform instead of a full firmware list.

Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-03-10 02:45:50 +00:00
copilot-swe-agent[bot]
41a9a2106d Use existing /tasks/run endpoint instead of custom cleanup-missing endpoint
Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-03-10 02:40:47 +00:00
copilot-swe-agent[bot]
980360805b Fix test: use async_cache instead of sync_cache to inject OIDC session data
Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-03-10 02:39:36 +00:00
Georges-Antoine Assi
9e31430c88 run fmt 2026-03-09 22:32:54 -04:00
copilot-swe-agent[bot]
09ff700e9a feat: show firmware files in scan results to improve discoverability
- Backend: emit scan:scanning_firmware socket event per firmware
- Frontend: track and display firmware per platform in scan results
- Frontend: add firmware stats chip to scan stats bar
- Frontend: update empty state message to mention firmware
- i18n: add firmware-related translation keys

Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-03-10 02:31:15 +00:00
copilot-swe-agent[bot]
f938e627b4 Move cleanup-all missing ROMs to background task to prevent browser hang
Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-03-10 02:25:58 +00: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