Commit Graph

5022 Commits

Author SHA1 Message Date
Georges-Antoine Assi
31c19f754e Merge pull request #3854 from rommapp/feat/scan-settings-v2-ui
feat: editable v2 UI for scan settings
2026-07-20 18:58:15 -04:00
Georges-Antoine Assi
4031072eaf cleanup 2026-07-20 17:31:36 -04:00
Georges-Antoine Assi
33332488d6 cleanup 2026-07-20 16:33:00 -04:00
Georges-Antoine Assi
e1ce87018f rnu generate 2026-07-20 16:16:58 -04:00
Georges-Antoine Assi
e4ff481731 tweaks 2026-07-20 16:15:33 -04:00
Georges-Antoine Assi
191cd1f24c feat(config): editable v2 UI for scan settings
Expose the scan.* section of config.yml (metadata & artwork priority,
per-field artwork overrides, region priority, language priority, media
types, gamelist and pegasus export) in an editable v2 Settings page.

Backend:
- Add PUT /api/config/scan (platforms.write) with a validated
  ScanSettingsPayload and ConfigManager.update_scan_settings().
- Expose GAMELIST_AUTO_EXPORT_ON_SCAN and PEGASUS_AUTO_EXPORT_ON_SCAN
  in ConfigResponse / GET /api/config.
- Preserve the streaming section on runtime config writes (previously
  dropped on every write).

Frontend:
- New Settings/ScanSettings.vue page + ScanPriorityList.vue reorderable
  list (drag + up/down for keyboard/gamepad); region/language use
  RComboboxField.
- Wire the scan-settings route, permissions, and sidebar entry.
- Regenerate OpenAPI types; add all new strings to every locale.

Closes #3849

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 11:24:31 -04:00
Georges-Antoine Assi
8ddcf01330 Merge pull request #3852 from rommapp/fix/gamepad-phantom-pad-nav-loop
fix(v2): ignore phantom/non-standard gamepads in nav polling
2026-07-20 11:18:09 -04:00
Georges-Antoine Assi
f223da4fe1 cleanup 2026-07-20 11:15:57 -04:00
Georges-Antoine Assi
2c4ce5fd24 fix(v2): gate phantom-pad guard on connected only, not mapping
Requiring mapping === "standard" rejected legitimate controllers that
report an empty mapping (some Switch Pro, Joy-Con, 8BitDo browser/OS
combos) while still exposing the standard button indices, breaking
navigation for them. There are only two mapping values, so the check
dropped every empty-mapping device. Gate on pad.connected alone, which
is the actual discriminator for the disconnected phantom entries that
caused #3851.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 11:02:21 -04:00
Georges-Antoine Assi
bee00457e9 fix(v2): ignore phantom/non-standard gamepads in nav polling
The v2 gamepad polling loop reads buttons and axes by hardcoded W3C
standard-mapping indices, but only guarded against null pads. Firefox
(and Zen) expose phantom or non-standard-mapping gamepads even with no
real controller attached, whose analog controls drift across the press
threshold. Index 4/5 (LB/RB) are bound to AppNav section cycling, so
each oscillation re-fired cycleSection and looped the app through
home/platforms/collections/search with no user input, making the UI
unusable.

Add an isUsablePad() guard requiring pad.connected and a "standard"
mapping, applied in both the polling loop and detectPadPresence. Every
button/axis read assumes the standard mapping, so a non-standard pad
cannot be interpreted safely regardless.

Fixes #3851

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 10:54:11 -04:00
Georges-Antoine Assi
137242c4a9 Merge pull request #3847 from rommapp/fix/first-scan-platform-created-as-folder
Surface never-scanned platform folders in the scan picker
2026-07-20 10:53:36 -04:00
Georges-Antoine Assi
8fe615920e hide elems in narrow container 2026-07-20 09:51:15 -04:00
Georges-Antoine Assi
7f3fb8eab3 frontend cleanup 2026-07-20 08:42:58 -04:00
Georges-Antoine Assi
3aa774f378 Merge pull request #3845 from rommapp/feat/flashpoint-launch-action
feat: add "Open in Flashpoint" game action
2026-07-19 22:35:43 -04:00
Georges-Antoine Assi
b0a7d595cc Merge pull request #3844 from rommapp/fix/multi-file-rom-emulator-extension
fix: load selected file with correct extension for multi-file roms
2026-07-19 22:35:03 -04:00
Georges-Antoine Assi
470f3aebd5 cleanup 2026-07-19 22:33:40 -04:00
Georges-Antoine Assi
edd36d83f4 test: expect URL-encoded path segment for selected file
The greptile suggestion added encodeURIComponent to the selected file
name in getDownloadPath, but the test still expected a literal space.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 22:21:16 -04:00
Georges-Antoine Assi
c660612b5e cleanup 2026-07-19 22:18:40 -04:00
Georges-Antoine Assi
503db343a2 fix: validate flashpoint_id as UUID before launch
The ROM update API accepts any non-empty string in flashpoint_id. A value
containing `#` or `?` would be parsed as a URI fragment/query, launching the
wrong title. Gate both the action's visibility and the launch on a UUID match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 22:15:24 -04:00
Georges-Antoine Assi
a67132a908 Surface never-scanned platform folders in the scan picker
A platform folder created on disk (optionally bound in Library
Management) has no database row until its first scan imports a ROM, so
it was invisible to the scan platform picker and a first scan could not
be triggered for it. The picker also filtered to rom_count > 0, hiding
even zero-ROM database platforms (e.g. those created via romm-cli).

Backend:
- Add GET /platforms/filesystem returning folders on disk without a
  database row yet (locally-resolved metadata, id -1, rom_count 0).
- scan_platforms / the scan socket now accept platform_fs_slugs so a
  folder can be scanned by slug; database platforms stay accepted by id.

Frontend (v2):
- Fetch filesystem folders, key the scan picker by fs_slug, include
  zero-ROM database platforms, and tag never-scanned folders.

Fixes #3832

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 22:13:16 -04:00
Georges-Antoine Assi
05857c0148 cleanup 2026-07-19 22:12:18 -04:00
Georges-Antoine Assi
2ac81fa841 Apply suggestion from @greptile-apps[bot]
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-07-19 22:07:27 -04:00
Georges-Antoine Assi
23ff801581 feat: add "Open in Flashpoint" game action
Adds a v2 game action that hands a ROM's flashpoint_id to the OS
`flashpoint://` protocol handler so the locally installed Flashpoint
launcher starts the title. The action only appears when the ROM has a
flashpoint_id.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 21:59:15 -04:00
Georges-Antoine Assi
1ec40fdb29 fix: load selected file with correct extension for multi-file roms
Multi-file roms (e.g. multi-disk Amiga games) failed to launch in the
EmulatorJS player with "Unsupported file format: ''", while single-file
roms on the same platform worked.

EmulatorJS derives the on-disk filename it writes to the emulator FS from
the last path segment of the game URL, and the core determines the disk
format from that filename's extension. getDownloadPath used the ROM-level
fs_name for that segment. For multi-file roms the rom is a folder, so
fs_name has no extension, and the core received an extension-less file.

When a single file is selected, use that file's real name (extension
included) as the content path segment instead of fs_name. The backend
already serves the correct file for a single file_ids value and only uses
the path segment for zip/m3u naming, so multi-file and no-selection cases
are unchanged.

Fixes #3746

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 21:55:59 -04:00
Georges-Antoine Assi
9f9f502492 Merge pull request #3841 from rommapp/fix/playmatch-wizard-error-message
Fix wrong error wording for flag-only providers in setup wizard
2026-07-19 21:10:19 -04:00
Georges-Antoine Assi
c30a02471b cleanup 2026-07-19 20:52:23 -04:00
Georges-Antoine Assi
a62ff66ffb Merge pull request #3840 from rommapp/fix/inverted-status-filter-refetch
Fix v2 gallery not refetching when filter logic operator changes
2026-07-19 20:50:48 -04:00
Georges-Antoine Assi
2eef394ea3 cleanup 2026-07-19 20:44:29 -04:00
Georges-Antoine Assi
ed4baf155f Merge pull request #3839 from rommapp/fix/netplay-malformed-polling-url
fix(netplay): correct room-list and socket URLs behind a reverse proxy
2026-07-19 20:41:33 -04:00
Georges-Antoine Assi
de63580fcf trunk fmt everything 2026-07-19 20:35:51 -04:00
Georges-Antoine Assi
07b1d04557 cleanup comments 2026-07-19 20:06:20 -04:00
Georges-Antoine Assi
8781d65f55 fix(netplay): install netplay overrides before any await in onGameStart
Move the getOpenRooms and io-wrap overrides to the top of EJS_onGameStart so
they are installed synchronously, before room polling or a Create/Join action
can start, rather than at the tail of the callback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 19:20:33 -04:00
Georges-Antoine Assi
71b5dfd8f2 Fix wrong error wording for flag-only providers in setup wizard
The setup wizard's metadata step showed "API key invalid" for any
enabled provider that failed its heartbeat probe, including flag-only
providers like PlayMatch and Hasheous that have no API key. This
contradicted the Settings > Metadata sources view, which already adapts
its wording per provider.

Mirror that behavior: add a `requiresKey` flag to each source and use
connection-oriented wording for flag-only providers ("Unreachable" on a
failed probe, "Provider disabled" when off) instead of key-oriented
wording. Reuses existing locale keys, so no new translations are needed.

Fixes #3795

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 19:17:51 -04:00
Georges-Antoine Assi
8c1016dabf Fix v2 gallery not refetching when filter logic operator changes
The v2 gallery refetch watcher in GalleryShell only watched the filter
selection arrays, not the per-filter logic operators (any/all/none).
Toggling a filter to the inverse ("none") updated the store but did not
trigger a refetch, so the results only changed when the selection itself
was edited or after a reload (URL hydration re-runs the initial fetch).

Watch all *Logic operators alongside their selections so inverting a
filter (e.g. statuses -> "none") refetches immediately.

Fixes #3798

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 19:17:38 -04:00
Georges-Antoine Assi
096346a981 feat(scan): per-field artwork priority overrides
Add optional scan.priority.cover / screenshot / manual keys that each
override scan.priority.artwork for a single artwork field, falling back
to the shared artwork priority when omitted. This lets users, for
example, keep original box art for covers while sourcing screenshots
from a different provider.

Backward compatible: absent keys leave behavior unchanged. Config-only
(no UI), read-only exposure via GET /api/config.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 18:56:47 -04:00
Georges-Antoine Assi
0f11d8b9cb fix(netplay): correct room-list and socket URLs behind a reverse proxy
RomM's netplay overrides targeted an outdated EmulatorJS API, so on the
nightly build they were dead code and the emulator's own URL logic ran.
That built the room-list request from `netplay.url` (the page host with no
scheme), which resolved relative to the SPA route and duplicated the domain
inside the path. nginx's SPA fallback then answered with index.html, so the
room list was always empty. The socket also used the default socket.io path
instead of RomM's mounted /netplay/socket.io.

- Set EJS_netplayServer to window.location.origin (scheme included).
- Override netplay.getOpenRooms on the current netplay instance to hit
  /api/netplay/list with a root-relative path.
- Wrap the EmulatorJS-bundled global io to inject the /netplay/socket.io path.

Fixes #3799

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 18:56:41 -04:00
Georges-Antoine Assi
0d487ad426 Merge pull request #3834 from AlmostEasyGoing/fix-stats-progressbar
(fix) Missing last platform-stats progressbar
2026-07-19 18:36:21 -04:00
AlmostEasyGoing
3abfeb0e7f Removed unnecessary none-display 2026-07-19 22:28:14 +02:00
Georges-Antoine Assi
c9ee613062 Merge branch 'master' into feat/pcsx2-streaming-v2 2026-07-19 15:59:15 -04:00
Georges-Antoine Assi
adfaf30acd Merge pull request #3831 from rommapp/fix/emulatorjs-save-slot-continuity
fix(player): keep origin save bound and surface save slots in v2 EmulatorJS
2026-07-19 15:56:34 -04:00
Georges-Antoine Assi
f4383e7ec4 fix: avoid overwriting an unpicked save slot when resuming from a state
Only auto-bind a default save as the "Save & Quit" write-back target when
the choice is unambiguous (a single save, or no compatible state armed).
With multiple saves and a state armed, loading the state injects a
different SRAM timeline, so binding an arbitrary user_saves[0] let
Save & Quit PUT over a named slot the user never selected. In that case
leave the save unbound and require an explicit slot pick.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 15:45:17 -04:00
Georges-Antoine Assi
90eaf234b2 Merge branch 'master' into fix/emulatorjs-save-slot-continuity 2026-07-19 15:29:24 -04:00
Georges-Antoine Assi
5c6fc37c65 cleanup 2026-07-19 15:23:42 -04:00
Georges-Antoine Assi
556fa8fa01 Merge branch 'master' into fix/v2-clear-selection-after-delete 2026-07-19 15:22:06 -04:00
Zach Clendenen
ef07ea5889 fix(v2): mute global hotkeys while a game owns the keyboard
The g-prefix sequences and the / search shortcut listened during play,
so pressing common game keys (g then h/p/c, or /) navigated away and
killed the session. Gate the handler on the playing store flag.

EmulatorJS set the flag on play but never cleared it on unmount, leaving
pad and hotkey navigation dead after exiting a game. Ruffle never set it
at all, so Flash sessions had no protection. Both players now flag the
session on play and release it on unmount.
2026-07-19 12:06:19 -05:00
Zach Clendenen
549ed33dd7 fix(v2): keep gamepad input with the stream while a session is active
useGamepad gates its pad-to-UI translation on the playing store flag, but
the v2 Stream player never set it, so button presses kept navigating the
app (and a Back/Start press could tear the session down mid-game). Flag
the session while launching or playing and clear it on unmount.
2026-07-19 12:06:16 -05:00
Georges-Antoine Assi
02f4897979 refactor: drop failed_items from BulkOperationResponse
failed_items was just the length of failed_ids. Remove the redundant
counter from the delete endpoints (roms + firmware) and the response
type; callers that need the count derive it from failed_ids.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 12:30:01 -04:00
Georges-Antoine Assi
54d07d85b4 fix(player): keep origin save bound and surface save slots in v2 EmulatorJS
Decouple save-file and savestate selection in the v2 player so they are no
longer mutually exclusive. When a compatible savestate exists, the config
screen still opens on the States tab, but the origin save now stays bound
instead of being nulled. This keeps "Save & Quit" updating that save file in
place (PUT) rather than spawning a new slot-less save (POST) that named-slot
sync clients never see.

Surface the save slot as a chip wherever a save renders (config-screen list,
resume preview, and the in-game save picker), guarded so states and slot-less
web saves show nothing. Adds the `play.slot` key across all locales and wires
`slot` into the story fixtures.

v1 (frozen) is left untouched; the change is v2-only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 12:28:43 -04:00
Georges-Antoine Assi
3ace17a89a fix(v2): snapshot delete-dialog state before awaiting
The delete handler re-read the dialog refs (roms, platform, exclude flag)
after the request resolved. Because the dialog is a singleton, a fresh
showDeleteRomDialog event arriving mid-request could swap those refs, so
the completed request would prune the new dialog's IDs instead of the
ones it processed. Snapshot the state at entry and act on the snapshot.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 12:15:10 -04:00
Georges-Antoine Assi
25910518f8 fix(v2): keep failed ROMs selected on partial delete
The bulk delete endpoint deletes per-ROM and can partially fail, but the
v2 dialog pruned every requested ROM from the selection and gallery. A
ROM that failed to delete stayed in the library yet lost its selected
state, so the user couldn't retry the failed subset.

Return the failed IDs from the delete endpoints (roms + firmware, both
via BulkOperationResponse) and, on the client, only prune the ROMs that
were actually removed. Failed ROMs stay selected and visible for retry;
the single-ROM route only navigates away when its ROM was deleted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 12:13:41 -04:00