Commit Graph

2385 Commits

Author SHA1 Message Date
Georges-Antoine Assi
5e8fac36a7 Merge branch 'master' into claude/awesome-gates-NUpke 2026-05-25 11:10:04 -04:00
Georges-Antoine Assi
9a87348c22 cleanup 2026-05-25 11:02:35 -04:00
Georges-Antoine Assi
fb13f54f48 cleanup 2026-05-24 17:43:01 -04:00
Claude
5adffeca71 perf(roms): skip rom_files load on gallery list endpoint
The gallery list endpoint was eager-loading every rom_file row for each
paginated ROM via selectinload, then re-joining each row back to its
parent rom for the is_top_level computation. For platforms with extracted
multi-file ROMs (Xbox 360 ~1394 files/ROM, Switch ~199 files/ROM), this
made /api/roms time out at 120s even with a rom_id index.

Cards never displayed individual files — only the has_simple_single_file
/ has_nested_single_file / has_multiple_files booleans that derive from
the file list. Denormalize the underlying state onto roms as multi_file
(folder-based vs single-file) and top_level_file_count, recompute the
booleans from those columns, drop the selectinload from filter_roms, and
move the files field from SimpleRomSchema to DetailedRomSchema so the
gallery payload no longer ships file rows.

Also drop the redundant joinedload(RomFile.rom) and switch the relation
to lazy="select" so subsequent file.rom accesses resolve from the
session identity map instead of re-JOINing the parent rom per file row.

ShowQRCode.vue's folder-based DS/3DS fallback now fetches the detailed
rom on demand, since SimpleRom no longer carries files.
2026-05-24 15:02:02 +00:00
Georges-Antoine Assi
4a89dadb55 update scna pages 2026-05-22 22:32:33 -04:00
Georges-Antoine Assi
f84796da08 Merge pull request #3385 from Spinnich/pr/chd-raw-hashing
feat(hashing): compute raw CHD hashes and route disc-data SHA1 to Hasheous
2026-05-18 14:52:54 -04:00
Georges-Antoine Assi
e6d4ede939 cleanup 2026-05-18 07:40:59 -04:00
Georges-Antoine Assi
c97ec449e2 drop more aspect ratrio 2026-05-17 14:07:46 -04:00
Georges-Antoine Assi
18a271b653 fix(home): center-align recently added cards vertically
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 12:42:59 -04:00
Spinnich
01f0b1d2b5 feat(hashing): compute raw CHD hashes and route disc-data SHA1 to Hasheous
CHD files now follow the same hash logic as all other file types — CRC32,
MD5, and SHA1 are computed from raw container bytes. This allows
ScreenScraper to log KO entries for unrecognised CHD files, which it
could not do when only the disc-data SHA1 was being computed.

The CHD header SHA1 (disc-data SHA1) is separately extracted and stored
in a new chd_sha1_hash field on RomFile, with a migration adding the
column to rom_files. Hasheous receives only this disc-data SHA1 (no
CRC/MD5) since it indexes disc-based games by disc-data SHA1, not raw
file hashes.

The RAHasher multi-file path now passes the largest CHD directly instead
of a /* wildcard, which RAHasher cannot expand. Hash computations are
wrapped in asyncio.to_thread to avoid blocking the event loop during
large reads.

Hash-lookup metadata handlers (ScreenScraper, Hasheous, Playmatch) now
fall back to rom.files (stored DB hashes) when fs_rom files are not
rehashed, fixing hash-based matching for UNMATCHED and UPDATE scan types.

The Disc SHA-1 is displayed in the ROM detail view for both single-file
(FileInfo.vue) and multi-file (FileSelectItem.vue) CHD games.
2026-05-17 08:01:05 -04:00
Georges-Antoine Assi
8e009dffc0 render covers at their natural aspect ratio and drop the cover-style setting
Covers now use object-fit: contain inside a fixed slot, so each image
keeps its own aspect ratio (letterboxed where needed) instead of being
cropped to the platform's configured ratio. The slot itself still uses
a single default aspect ratio for grid stability, so cards don't reflow
as images load.

With per-platform aspect ratio no longer doing anything visible, remove
the Cover style picker from the platform info drawer and clean up dead
plumbing: galleryViewStore.getAspectRatio no longer reads
platform.aspect_ratio, platformId is dropped from Skeleton / SearchCover
/ MatchRom / showSearchCoverDialog, and the orphaned i18n keys
(cover-style, settings, old-squared-cases, old-horizontal-cases) are
stripped from all platform.json locale files.

Backend aspect_ratio column is left in place; no client sends it anymore.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 11:11:09 -04:00
copilot-swe-agent[bot]
2bb86e4836 Make setup platform rows toggle checkbox selection on click
Agent-Logs-Url: https://github.com/rommapp/romm/sessions/00a7f2a2-cabf-470b-a73e-a127ffcdccd5

Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-05-08 13:55:00 +00:00
sabuswai
228c640f18 Add credentialless attribute to YouTube iframe
add credentialless attribute to YouTube iframe for COEP compatibility
2026-05-07 01:13:07 -05:00
zurdi
28484e7d8d fix(UserBtn): add transparent class to avatar for improved styling 2026-04-21 13:20:37 +00:00
Georges-Antoine Assi
72c668289d changes from bot review 2026-04-20 21:41:42 -04:00
Georges-Antoine Assi
98f1d65a7c fixes 2026-04-20 21:36:59 -04:00
copilot-swe-agent[bot]
042ddf16e1 fix: address code review comments in RefreshMetadataDialog
Agent-Logs-Url: https://github.com/rommapp/romm/sessions/fec651c3-d741-4c7d-a79f-bd469343602e

Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-04-20 18:00:08 +00:00
copilot-swe-agent[bot]
b9d784d3b4 feat: add RefreshMetadataDialog with scan type and metadata source selection
Agent-Logs-Url: https://github.com/rommapp/romm/sessions/fec651c3-d741-4c7d-a79f-bd469343602e

Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-04-20 17:58:06 +00:00
Georges-Antoine Assi
7b20101d50 Merge pull request #3270 from Namaneo/home-boxarts
A bunch of minor bug fixes
2026-04-16 11:16:16 -04:00
Georges-Antoine Assi
ed15fa13d4 fix type errors 2026-04-16 10:37:12 -04:00
Julien Loir
a3cc1daada Check for computed large cover instead of ROM property 2026-04-16 12:43:08 +02:00
Julien Loir
98185a309b Make home boxarts respect gallery configuration 2026-04-16 12:14:21 +02:00
Spinnich
e8ec8a0b18 fix(linting): fix import order in AddRoms.vue and RemoveRoms.vue
Move @/__generated__ import after third-party modules to satisfy
trunk's @trivago/prettier-plugin-sort-imports ordering rules.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 06:56:07 -04:00
Spinnich
15b485b118 fix(collections): address reviewer feedback on types and concurrency
- Use CollectionSchema instead of ReturnType<typeof collectionsStore.getCollection>
  in AddRoms.vue and RemoveRoms.vue (simpler, per gantoine review)
- Wrap bulk INSERT in a savepoint so a concurrent duplicate-key violation
  is caught via IntegrityError and ignored rather than aborting the transaction
- Only bump Collection.updated_at in remove_roms_from_collection when rows
  were actually deleted (rowcount > 0), matching add_roms_to_collection behavior

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 06:46:12 -04:00
Spinnich
4cc0c868b7 Fix linting and formatting issues from trunk CI 2026-04-14 20:27:45 -04:00
Spinnich
2ecefa3d3f Fix race condition in collection and favorite rom membership updates
Replace full rom_ids list replacement with atomic POST/DELETE endpoints
that add or remove individual ROMs from a collection. This prevents
concurrent rapid clicks from overwriting each other (last-write-wins).

Also fix missing session.flush() in add_rom_user() and add collection
endpoint tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 15:08:53 -04:00
Georges-Antoine Assi
154165fadf final fixes 2026-04-12 19:26:34 -04:00
Georges-Antoine Assi
105ed84e43 feat: show TheGamesDB link on platform drawer when tgdb_id is set
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 19:04:51 -04:00
Georges-Antoine Assi
dbb455ece7 Merge pull request #3248 from rommapp/copilot/fix-collapsible-menu-overflow
Fix settings drawer logout button overflowing on mobile
2026-04-12 16:29:48 -04:00
Georges-Antoine Assi
62e540d60e changes from bot review 2026-04-12 15:43:14 -04:00
Georges-Antoine Assi
4928041593 manual cleanu 2026-04-12 11:04:12 -04:00
Georges-Antoine Assi
522df9d31a feat: add libretro thumbnails as an artwork source
Adds the libretro thumbnail repository as a first-class artwork source so
region-correct box art (PAL/Europe, Japan, etc.) can be matched directly
to ROM filenames, addressing rommapp/romm#3239.

Implementation follows the SGDB handler pattern (artwork-only, no game
metadata): MetadataSource enum entry, scan-time fetch wired into the
SCAN_ARTWORK_PRIORITY loop, /search/roms integration, MatchRom dialog
chip + cover selection, and a heartbeat flag.

Matching is exact case-insensitive against the directory listing first
(so a ROM named "(Europe)" lands on the (Europe) artwork), with a
JaroWinkler fuzzy fallback at 0.8 that strips parenthetical tags from
both sides. Listings are cached in Redis with a 24h TTL.

`libretro_id` is persisted on the Rom model as the SHA1 hex of the
matched libretro filename — stable across scans, distinct per region,
indexed for lookup. Migration 0077 adds the column.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 22:57:20 -04:00
copilot-swe-agent[bot]
cb6b23b21a Fix logout button overflow on mobile by conditionally applying unset-height only on desktop
Agent-Logs-Url: https://github.com/rommapp/romm/sessions/3ff1983b-80c8-48cf-9c1f-3339b60712ff

Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-04-11 23:24:26 +00:00
Georges-Antoine Assi
1b23a3ebb3 changes from bot review 2026-04-08 11:17:17 -04:00
Georges-Antoine Assi
702c062499 [ROMM-3235] Improve light mode text 2026-04-08 09:22:40 -04:00
Georges-Antoine Assi
c7eaa292be add DC and PSX to DS_3DS_PLATFORMS for jewel-case aspect ratios 2026-04-08 08:33:23 -04:00
Georges-Antoine Assi
cb96c861a6 display default entries separate 2026-04-04 14:49:37 -04:00
Georges-Antoine Assi
518372f1f5 ru trunk fmt 2026-04-03 14:23:24 -04:00
copilot-swe-agent[bot]
ddb0ee7699 Fix 500 error on /api/tasks/status after cleanup_missing_roms task completes
Agent-Logs-Url: https://github.com/rommapp/romm/sessions/f7f2aeec-91a7-482f-a4f6-a921d4bdab66

Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-04-03 17:34:25 +00:00
zurdi
dfd92c3ebb feat: add April Fools emulation support toggle 2026-04-01 12:27:55 +00:00
zurdi
62d427a37f feat: april fools 2026-03-31 22:44:47 +00:00
zurdi
7fce50a3c5 fix: update ThemeOption component to bind value correctly and simplify vuetify theme logic 2026-03-20 17:57:45 +00:00
copilot-swe-agent[bot]
87c6da4d59 Remove bevel from game card cover image by changing elevated to flat variant
Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-03-12 23:01:29 +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
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
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
f8a9740e8f rejig styles 2026-03-10 21:52:33 -04:00
Georges-Antoine Assi
0c18c2588c run fmt 2026-03-10 21:47:27 -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