* fix(ui): stop the search gallery shifting against the other tabs
With classic scrollbars, the document-scrolled tabs (Home, Platforms,
Collections) lose the scrollbar's width to the document scrollbar, but
the gallery handed its own scrollbar's width back to the top bar and the
content. Search therefore laid out 10px wider on the right, moving the
nav pill, user menu, divider and toolbar on every tab switch.
Drop that compensation so the gallery's scrollbar takes the same space a
document scrollbar does, and have the document-scrolled tab pages always
reserve the gutter so a short page matches a long one and the gallery.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4gEUfseKAL1fjKAHqu
* refactor(ui): scroll the gallery with the page like the other tabs
GalleryShell scrolled inside its own full-viewport panel, unlike Home,
Platforms and Collections, which scroll the document. The two layouts
needed scrollbar-width bookkeeping to line up and still drifted apart.
RVirtualScroller gains an opt-in `pageScroll` mode that windows its rows
on the document's scroll, takes its full height in the page flow, and
lets wide list rows widen it so sticky chrome follows a sideways scroll.
GalleryShell uses it, pins its toolbar on the page scroll, and fixes the
AlphaStrip, back-to-top button and floating dock to the viewport. The
body overflow lock, the published scrollbar width and the phone bottom
spacer go away; the layout's own bottom padding clears the tab bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4gEUfseKAL1fjKAHqu
* test(ui): cover the page offset in RVirtualScroller's pageScroll mode
Places content above the list and grows it, checking that the rendered
rows and the scrollToIndex target follow the list's page offset.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4gEUfseKAL1fjKAHqu
* fix(ui): count only the visible part of a virtual list that starts mid-viewport
viewportRange added the full viewport height to the clamped top, so a
list starting partway down the screen (a gallery under its page header)
counted rows still below the fold as visible, and the gallery fetched
and rendered them. Measure the bottom from the real viewport edge, and
report an empty range when the list lies wholly outside it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4gEUfseKAL1fjKAHqu
* docs(ui): shorten the scrollRestoration header comment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4gEUfseKAL1fjKAHqu
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(jsdos): play a .jsdos bundle that sits inside a game folder
The play check read the ROM's own extension, which is empty for a folder,
so a bundle moved into a folder (for example beside its manual) lost its
Play button. The backend now exposes has_jsdos_bundle, true when the ROM
is a bundle or has one at its folder's top level, and the js-dos player
asks the content endpoint for that file instead of a zip of the folder.
Fixes#5615
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(jsdos): assert the player downloads only the bundle file
Addresses Greptile's review on #5672: covers the bundle file id in the player URL and drops a comment that restated the constant.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: code-review
Pin has_jsdos_bundle's value for a plain single file and for a bundle
missing from disk, on both the SQL and the with_files path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011waFLKWoBw9KCu31UJJ7Te
* pr-ready: code-review
Expose missing_from_fs on RomFileSchema so the js-dos player skips a
bundle gone from disk, the same rule has_jsdos_bundle applies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011waFLKWoBw9KCu31UJJ7Te
* pr-ready: simplify
Share the top-level file predicate and the present-file exists subquery
between is_easyrpg_game and has_jsdos_bundle, compute the top-level files
once in apply_file_stats, and fold the two marker flag tests into one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011waFLKWoBw9KCu31UJJ7Te
* pr-ready: review-polish
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011waFLKWoBw9KCu31UJJ7Te
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011waFLKWoBw9KCu31UJJ7Te
* refactor(jsdos): rename isJsDosBundle to hasJsDosBundle
It also matches a folder that holds a bundle, so the name now says what
the backend flag it reads says.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011waFLKWoBw9KCu31UJJ7Te
* fix(scan): derive a scanned rom's file flags from the files it read
A scan emits scan:scanning_rom before it writes the rom's file rows, so a
new rom reached clients with every file flag false (has_simple_single_file,
has_multiple_files, has_jsdos_bundle and the rest) until a reload. The
emits now derive those flags from the files the scan just read whenever it
rebuilt them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011waFLKWoBw9KCu31UJJ7Te
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The grid kept 60 cards per side, about 10 rows at 6 columns, so every
frame styled and laid out roughly three times the visible DOM. The budget
drops to 12 cards with a 2-row floor: 2 rows on wide screens, a deeper
buffer on narrow ones. List layout is unchanged.
Written primarily by Claude Code.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(ui): show how many games a filtered platform page lists
The platform header showed only the library total, so a filter or search
gave no sense of how much it hid. Add a Shown stat next to In library
while any filter or search is active, translated in every locale.
Fixes#3893
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(ui): show the result count on the filter button
Drop the Shown header stat. The gallery filter button's badge now carries
the number of matching games whenever a filter or search narrows the list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(ui): show the result count inside the gallery search field
Move the count off the filter button, which goes back to the active
filter count. RTextField gains a suffix prop, and Platform and Collection
galleries show "N of total" in their search field while a search or
filter narrows them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(ui): label the RTextField suffix story
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
The metric pills showed only an icon and a value; their names appeared
only after a click. Add the same top tooltip the other action buttons use.
Refs #4805
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ui): dim verification sources the ROM did not match
A miss used the same neutral look as the provider cards' linked state,
so it could read as verified. Dim it like an unlinked provider.
Fixes#4009
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(ui): share one opacity token for inactive states
Disabled controls, unlinked providers, locked achievements, switched-off
hash matchers and unmatched verification sources each hard-coded 0.55.
Add --r-opacity-inactive and use it in all twelve, so the inactive look
is tuned in one place. Carousel thumbnails and controller-debug axis
lines keep their own value: they are not inactive states.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The generic platform artwork is added as an SVG gamepad, and
DEFAULT_PLATFORM_ICON now points at /assets/platforms/default.svg. Load
chains that ended on the ICO now end on that SVG, including a platform
with no shipped icon. The component tests expect the SVG URL, and a new
case checks that the constant and shippedPlatformIconUrl("default") both
resolve to it.
Fixes#5599
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
* chore(coherence): adopt Coherence with specs, invariants and a PR report
Install @posthog/coherence as a frontend dev dependency and wire its
Claude Code hooks into the committed .claude/settings.json, so every
agent session in the repo gets the vocabulary, specs, journal and checks.
The hooks call the binary under frontend/ through $CLAUDE_PROJECT_DIR.
Declare 23 components and the entrances that carry outside trust, and
six invariants, each refuted with a deliberate break before it counted:
- every /api route requires auth and its scopes, except a named public
list (new route sweep in tests/endpoints/test_route_guards.py)
- a hidden rom, platform or firmware answers every id route exactly as
a missing id would (new sweep over every method of every id route)
- the unscoped save, state and screenshot fetches by id are reached only
from their own routers (chokepoints)
- validate_path never resolves outside its base folder
The PR workflow runs in comment mode: one report comment, failing only
when Coherence itself breaks. Trunk skips Prettier and markdownlint on
*.spec.md and *.practice.md, since Prettier escapes their globs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(routes): satisfy mypy in the route guard sweep
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(coherence): record the worktree test database enactment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(roms): answer a hidden rom like a missing one on file routes; tighten route sweeps
Addresses Greptile's review on #5584.
The rom file delete and reading-progress routes answered "File not found"
for a hidden rom but "Rom with id N not found" for a missing one, so a
caller could tell them apart. They now raise the same not-found.
The route sweeps now reach the checks they claim to test: a protected
route with no scopes counts as public (its guard admits anyone), write
requests carry a body and upload name so validation can't answer first,
RomFile-keyed routes get a real file id, error bodies are compared with
the id normalized, and the rom routes are swept with the rom hidden
directly, through its platform, and by the unrated filter.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(coherence): tighten route guard sweeps and isolate oracle test databases (code-review)
- Count a route as protected only when its endpoint is the scope-checking
wrapper with non-empty scopes, not just when it declares the bearer scopes.
- Treat 401 and 403 like 422 as never reaching the visibility check, and
sweep /api/streaming/states/{rom_id}.
- Run pytest oracles with a per-run ROMM_TEST_DB_TAG unless one is set.
- Use the shared setup-frontend action and ubuntu-24.04 in the workflow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(tests): simplify route guard sweeps and path tests (simplify)
- Mark scope-guard wrappers with required_scopes so the auth sweep reads a
public attribute instead of the private closure.
- Derive the entity regex from one segment list, ask each missing id once,
and run the three hide scenarios through one sweep helper.
- Fold the new validate_path inputs into the existing valid, traversal and
absolute path tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(coherence): trim workflow comments (review-polish)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(filesystem): restore the validate_path property test the paths invariant cites
Filesystem.spec.md names test_validate_path_never_escapes_its_base as the
invariant's evidence, and Coherence selects it by name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(coherence): run hooks from the local binary instead of npx
Each hook calls frontend/node_modules/.bin/coherence directly and exits 0
when it isn't installed, so sessions without frontend deps (fresh
worktrees, backend-only setups, cloud setup still installing) don't report
a hook error on every tool call, and no hook pays npx's startup.
Also commits the journal and run records left by earlier sessions, which
.coherence/.gitignore keeps as durable records.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(tests): share the bearer, user token and hide helpers
Tests built the same Authorization headers and HiddenEntity rows in about
40 local copies, and two modules imported private helpers from other test
files. They now use bearer, user_headers and hide from tests/auth_helpers.py.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(endpoints): one 404 for a missing or hidden rom, platform or firmware
Each route wrote the missing-row 404 and the hidden-row 404 separately and
had to keep them identical by hand. visible_rom_or_404,
visible_platform_or_404 and visible_firmware_or_404 take the lookup result
and raise one answer for both, either the standard not-found or a bespoke
detail. Re-reads after a write keep a plain not-found check, so an edit that
hides the row doesn't turn into a 404 after it succeeded.
The RomFile-keyed routes (/roms/{file_id}/files, .../files/content/{name},
/roms/{file_id}/patch) name their path parameter file_id instead of id, so
the route sweep reads which id a route takes from its path and drops its
hand-kept list. URLs are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(setup): develop inside WSL on Windows
@posthog/coherence installs only on Linux and macOS, so npm install in
frontend/ fails on native Windows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(coherence): record the whole-repo chokepoint run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(types): regenerate API types for the file_id patch route
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(saves): add save channels and snapshots
* feat(saves): close spec gaps in save channels and hash with sigil
* feat(saves): play snapshots in the v2 player, which pushes snapshots
* fix(saves): code review: authorization, retention losses, held-save sync, batched responses
* refactor(saves): simplify pass
* refactor(saves): review-polish pass
* docs(saves): humanizer pass
* feat(saves): run every EmulatorJS page on the v2 player
* feat(saves): per-user snapshot pins
* feat(sigil): store the identity a save restore needs and pin sigil 0f05f25
* fix(saves): meet type-aware lint in the v2 player
* feat(sigil): store N64 header and playlist title ids, pin sigil 0847fda
* feat(saves): convert saves for a core on download and list save layouts
* feat(saves): prune unreachable archival snapshots and empty detached channels on delete
* feat(saves): device sync from the token, held snapshots and shared-card pushes
* feat(saves): arc restores past abandoned snapshots and color channels by age
* fix(saves): code-review and security-audit fixes
* refactor(saves): simplify pass
* chore(saves): review-polish pass
* docs(saves): humanizer pass
* fix(sync): file RetroArch autosave versions as their channel's next snapshot
* fix(saves): address review findings and trim docstrings
* fix(saves): share-lock planned rows by id so PostgreSQL accepts the lock
* test(saves): stub the detached-channels fetch in SaveDataTab stories
* feat(saves): carry the full current snapshot in a 409, pin sigil 2071dff
* chore(sigil): pin 5d4ddb4, which reads .cue and .gdi sheets
* docs(saves): drop v2 wording now that one UI remains
* chore(sigil): pin 0190443, which reads PS2 raw BIN images and cue sheets
* fix(sigil): treat a file too short for its format as routine during scans
* chore(migrations): renumber save channel migrations after upstream's 0154
* fix(snapshots): a hardcore switch on unchanged content makes a new current
* fix(sync): decide a channel's slot from its history and the device's snapshot
* chore(docker): pin sigil at 794d99f for PSP Store release save prefixes
* refactor(db): squash the save channel migrations into 0161
Fold the slot linking (0162) and the rom_files sigil identity columns (0163)
into 0161_save_channels, so the feature ships as one revision.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(saves): close visibility and input gaps found in review (pr-ready step 2)
code-review --fix:
- negotiate_sync drops channel slots on ROMs hidden from the caller
- channel PATCH/attach/DELETE answer 404 when the channel's ROM is hidden
- a push copying a save from a hidden ROM answers 404
- _own_device applies require_token_device to bound client tokens
- adopting a legacy save syncs its sharing with the channel it joins
security-audit follow-ups:
- another user's detached public save or state is no longer downloadable
- profile and option values must be a single path segment
- companions are de-duplicated and capped at 8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(saves): share channel and asset lookups, drop duplicates (pr-ready step 3)
simplify:
- readable_channel_or_404 and channels_on_files replace four copies of the
channel 404 check and two copies of the file-fed channel listing
- readable_rom_asset_or_404 serves both public save and state downloads
- _own_device resolves through require_device; _clone_origin takes the source
- reuse _unprocessable, DESCRIPTOR_EXTENSIONS, SAVE_SLOT_MAX_LENGTH, uniqueBy
and uuidv7; neutral forms default their required pattern to the allowed one
- RetroArch delete checks held rows in one query, a guarded upload lists the
slot only without a channel head, and uploads are read off the event loop
- snapshotSession builds push requests once; player comment cleanups
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(saves): trim two docstrings to two lines (pr-ready step 4)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(saves): answer held RetroArch paths with 423, mirror slot labels
- RetroArch Cloud Sync answers 423 Locked for a PUT over a held unslotted save
and for a DELETE where only held rows sit at the path, instead of 409 and 404
- channelLabelForSlot returns null for blank and state_ slots, as the backend's
channel_label does, so the player files them under no channel either
- document that sharing a channel lets every user read and push into it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(docker): pin sigil at 85f88a8 for Switch .nup containers
* fix(snapshots): a save pushed in another shape or format makes a new current
* refactor(saves): drop the always-true SAVE_SYNC.SNAPSHOTS heartbeat flag
Nothing reads it, and the SAVE_SYNC block's presence already tells a
client the server speaks the snapshot API. Also trim the rom detail
channel field comments to one line each.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(frontend): use uuidv7 for every client-generated id
Drop the randomToken wrapper and the notification inbox's Math.random tab
id, so uuidv7 is the one helper that works outside a secure context.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(saves): trim redundant snapshot API surface, dead code and duplicate logic
API:
- Drop PUT /snapshots/{id}/devices/{device_id}; GET /snapshots/{id}?hold=true holds.
- GET /snapshots is history only (channel_id required); GET /channels serves currents.
- A snapshot carries channel_id instead of an embedded channel.
- POST /saves/{id}/content takes the same query parameters as the GET, plus container_path.
Backend:
- Remove the archival write path, clone.py, DBStatesHandler.get_state, the sigil
identity-hash path, unused relationships and composite snapshot indexes.
- One held/frozen lookup, one bulk-delete guard, SQLAlchemy dialect upserts, and
the shared reserve_version_name in the writer.
- The writer takes a visibility filter and checks the channel and parent itself.
- The restore handler picks per-game or merge; fewer wrapper types and tables.
Frontend:
- Channel delete uses the shared typed confirm; DeleteChannelDialog is gone.
- Held offline pushes go through a per-channel SnapshotSession.
- Remove the slot-based pending upload path.
- The timeline shares the fan's badge logic.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* refactor(saves): release archival backups through module functions
The saves and states handlers each built a private DBSnapshotsHandler to
call release_backup and refresh_backup_digests, since they can't import
the shared instance. Both only ever ran inside the caller's session, so
they are now module functions taking it, like channel_for_slot.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* refactor(saves): share one deleted-assets handler instance
The saves handler built its own DBDeletedAssetsHandler because it can't
import the package's instance. The instance is now built in
deleted_assets_handler.py and re-exported by the package, so both use it.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(frontend): keep bottom-nav taps live by switching tabs without a view transition
Every route change ran a root view transition (about 380ms). While one
runs, the browser hit-tests every tap to <html>, so a second tab tap
made soon after the first was dropped.
A bottom-nav tap now marks its target path, and the router's crossfade
and the back-morph guard skip that navigation, so the view swaps
instantly as native tab bars do. The tap handler moves to the capture
phase: once a view is loaded, RouterLink's own click handler runs the
whole navigation before a bubbling listener fires, which made the mark
(and the pending-tab highlight) arrive too late.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4gd8SxSVBzdffah1Vz
* fix(frontend): give bottom-nav labels room inside the active capsule
On narrow phones the active tab's label ran into the capsule edge (2-3px
at 320-360px wide). Each tab now keeps a 6px inline inset, the bar takes
a 10px gutter on xs and a 4px inner padding, the label drops its letter
spacing, and it shrinks toward 10px on the narrowest phones so English
labels still fit there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4gd8SxSVBzdffah1Vz
* fix(frontend): soften the bottom-nav drop shadow
The bar stacked --r-elev-2 (24px blur, 45% black) on --r-elev-1. The
elevation tokens don't vary by theme, so on light the halo read as a
dark smudge. It now keeps only --r-elev-1, close to the top nav pill,
which has no drop shadow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4gd8SxSVBzdffah1Vz
* fix(frontend): give the bottom nav a wide, faint, theme-aware shadow
The bar's --r-elev-1 shadow was tight and dark enough to read as a grey
rim on the light theme. It now uses a 24px blur offset 6px with a new
themed --r-color-bar-shadow token: 8% black on light, 35% on dark, where
a faint shadow would vanish.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4gd8SxSVBzdffah1Vz
* Revert "fix(frontend): give the bottom nav a wide, faint, theme-aware shadow"
This reverts commit 37b85d2. The single --r-elev-1 shadow reads better
than the wider, fainter themed one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4gd8SxSVBzdffah1Vz
* fix(frontend): drop a tab tap's transition skip when its navigation is redirected
afterEach only sees the final path, so a tab tap redirected to /login
left the skip set and a later visit to that tab lost its transition. A
navigation toward any other path, a redirect included, now drops it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4gd8SxSVBzdffah1Vz
* fix(frontend): keep a repeat tab tap's transition skip; make its test isolate
Clearing the skip in afterEach let a cancelled navigation to the same tab
clear the mark a newer tap had just set, so that tap ran a transition.
The beforeEach drop already clears the mark before any other navigation
reads it, so afterEach/onError no longer touch it.
The BottomNav capture-phase test inherited a mark from earlier tests and
passed with a bubbling handler too. It now clears the mark first, and
fails if the handler is moved back to the bubble phase.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4gd8SxSVBzdffah1Vz
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(player): boot the base game, not a patch or translation
Files in a game's translations/ or hacks/ folder were mixed in with the
base game: a .ups or .bps there counted as a bootable translation, a
tagged variant sorting first became the default, and "All discs" zipped
every file so EmulatorJS booted a translation's playlist.
Patch files are now recognised by extension wherever they sit, the
default and the selector's order favour the top-level (base) files, and
"All discs" requests only the base set through file_ids. The content
endpoint generates its playlist when the served files carry none, rather
than when the rom has one anywhere.
Fixes#5462
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(player): apply code-review fixes
Share the m3u check through has_playlist, memoise the boot file ids, and
correct the playerDisc comments.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(player): simplify the base-set helpers
One allDiscFiles helper backs offersAllDiscs, defaultDisc and bootFileIds,
and isPatchFile alone owns the patch rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(player): keep variants and media out of playlists; classify patches on the backend
The backend's disc rule now leaves out patches, media and cheats, and a
playlist covers only the base game's discs, so whole-rom downloads, the
native shell and the streaming disc swap stop listing translations, hacks
or a selected manual. A selection with no disc gets no generated .m3u.
The scanner files any patch format as a patch, and the file schema does
the same for rows scanned before, so the frontend trusts the category.
The heartbeat now carries the supported patch extensions, which replaces
the frontend copy, and one fileExtension helper replaces three.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(sync): resolve RetroArch save names to the core's platform
A RetroArch Cloud Sync path names a game by file name only, so a name
shared across platforms (a PS1 and a Saturn "Road Rash (USA)") always
resolved to the lowest-id ROM. Uploads landed on the wrong ROM and the
manifest hid the other platform's saves.
Map each RetroArch core folder to the platforms it runs and prefer a ROM
on one of them, including one that only owns a file of that name. An
unknown core, or none, keeps the previous id order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(sync): build the RetroArch arcade core platforms from the arcade sets
Addresses Greptile review on #5533: MAME and FBNeo left out the mame,
mame-advmame, fbneo and fba platforms, so a same-named Neo Geo ROM could
take over a MAME ROM's saves.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(sync): apply code-review fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(sync): apply simplify cleanups
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(sync): cover a manifest with one name under two cores (review-polish)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(sync): one core map, per-disc state slots, PSP serials on PSP
- Move the EmulatorJS platform-to-cores map to the backend and serve it on
the heartbeat; RetroArch core platforms invert it plus a top-up for
RetroArch-only cores.
- Map fbneo to "FinalBurn Neo" and dosbox_pure to "DOSBox-pure", the
library names the cores report to RetroArch.
- Resolve states by file name like saves, with a slot per disc-named state,
so a disc folder game's state follows its save.
- Resolve PSP serial-map titles with PPSSPP's platforms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(player): boot another device's save over a state from the same quit
States record no device, so the start screen could not tell a state written
by another client's core (Argosy) from one this browser wrote. When the newest
save names a device other than this browser and the newest state was written
within a few seconds of it, default to the save. This browser's own Save and
Quit still resumes from its state.
Fixes#5199
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(player): keep the newer-save warning beside a same-quit state
Addresses Greptile review on #5531: skipping a state from the picked
save's quit returned no warning even when a newer save existed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(states): record the device that wrote a state
States now carry origin_device_id like saves. POST /states and
PUT /states/{id} take an optional device_id, and new content takes the
writer's device (or none when the client names none). The web player
sends this browser's device id with every state, including held ones.
The start screen no longer defaults to a state tagged with another
device. The same-quit timing rule stays only for untagged states, which
covers states stored before this change and clients that send no device.
device resolution moves from endpoints/saves.py to utils/auth.py so
both asset endpoints share it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(player): drop the same-quit timing rule for untagged states
The start screen and the newer-progress warning now go by the state's
recorded device alone: an untagged state counts as this browser's, and
a state tagged with another device is neither the default nor a reason
to warn.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(player): cover untagged states beside another device's save (code-review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(player): simplify the resume fallback and repair a mis-collated state column (simplify)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(states): trim the origin device column comment (review-polish)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(retroachievements): ride out rate limits during the progress sync
The progress sync asks RetroAchievements for each changed game's
achievements, one request per game. A single 429 that outlasted the one
2s retry became a 503 that aborted the whole sync and discarded every
game already read, so a large first sync never completed.
- send_with_retries honours Retry-After (capped at 60s) and doubles its
backoff on each 429; rate limits can get their own attempt budget so
timeouts are not retried more often.
- RetroAchievements gets five attempts against a 429.
- get_user_progression stops asking for game details once RA refuses
one, keeps the stored entry for the remaining changed games, and
returns what it read so it is saved and the next sync resumes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(retroachievements): keep stored progress on full refreshes and read pages first
Addresses Greptile review on #5532:
- a full refresh now passes the stored progression with refresh_all, so
a refusal keeps the games it could not read instead of dropping them
- every completion page is read before any detail request, so a
throttled later page fails before details are fetched and discarded
- docstrings trimmed to the comment rules
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(retroachievements): apply code-review fixes
pr-ready step 2 (code-review xhigh --fix): drop the synced progression
when the RA username changes, keep the award kind current on refused
games, read HTTP-date Retry-After values, and honour an explicit zero
rate_limit_attempts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(retroachievements): apply simplify cleanups
pr-ready step 3 (simplify): reuse to_utc for HTTP-date Retry-After,
fold the None checks into _retry_after_seconds, drop the result=None
seed and the award-kind compare in get_user_progression, and share the
refusal setup and call() asserts across the new tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(retroachievements): review-polish comment trim
pr-ready step 4 (review-polish): drop a comment that restated the code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(retroachievements): run the sync as a job and tell rejects from outages
- A non-429 error status or unreadable reply for one game keeps that
game's stored progress and the sync moves on; only a throttle or an
outage defers the remaining games.
- The five-attempt 429 budget applies to the progress sync's two
requests, not every RetroAchievements call.
- A 429 holds the shared RA rate limiter through its wait and halves its
pace, which steps back up as requests go through.
- Timeouts and 429s each count against their own attempt budget, and
the 429 backoff doubles per 429.
- /ra/refresh queues the sync as a background job and answers 202; the
job reports its outcome over the ra:synced socket event, which the
settings section uses to reload the user or show the failure.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(frontend): bring the bottom nav closer to Slack's tab bar
Larger labels (font-size-sm) and 28px icons, and a denser frost: a 62%
tint with plain blur instead of the saturated glass. The bar keeps its
64px height.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4efgBE7D99cgYSiVX2
* feat(frontend): use filled icons on every bottom nav tab
Apple's tab bar guidance prefers filled symbols for consistency with the
platform, so the bar no longer swaps outline for filled on selection; the
capsule and tint mark the active tab. NAV_ACTIVE_ICONS becomes
NAV_FILLED_ICONS.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4efgBE7D99cgYSiVX2
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(setup): resolve folder aliases when identifying platforms in the setup wizard
The setup library endpoint returned raw folder names, so folders such as
gamecube or a config-bound nintendo-snes showed as Unidentified and their
platform stayed in the supported list. Report the resolved platform slug
next to each folder and match on it in the wizard.
Fixes#5465
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(setup): match supported platforms on resolved slug, one detected row per folder
pr-ready step 2 (code-review xhigh --fix): compare supported platforms by
slug so a DB row with an alias fs_slug still matches, keep each folder's own
name and rom count, read config once per request, black-format the new test,
and add a SetupStepPlatforms unit test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(setup): fold detected-row branches, drop redundant selection guards
pr-ready step 3 (simplify): build identified and unidentified rows from one
object, drop the detected checks in togglePlatform and newSlugsInGroup (every
caller already lists only supportedAvailable), and merge the duplicated chip.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(setup): assert the resolved slug in every setup/library entry
pr-ready step 4 (review-polish): compare whole existing_platforms entries in
the older setup/library tests so they cover slug too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(setup): tighten detected-row comment
pr-ready step 5 (humanizer).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(settings): resolve built-in folder aliases in folder mappings
Folder Mappings matched folders to platforms on the client by exact slug,
so alias folders like gamecube or megadrive showed as unmapped even though
the scan resolves them. The heartbeat now returns FS_PLATFORM_SLUGS, each
folder's slug from its name or built-in alias, and the table reads it for
auto-detected rows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore: drop response schema field comments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Fetch original launch years and current platform logos during scans, retain curated platform icons, and show launch year and type on responsive discovery cards. Preserve animated AVIF frames during thumbnail and WebP conversion.
Closesrommapp/romm#5432
Authored with Codex assistance, including implementation and tests.
* fix(switch): explain why encrypted dumps get no title id
RomM doesn't read prod.keys, so encrypted retail NSP/XCI dumps resolve no
title id, and nothing said so. A scan now logs one info line counting the
encrypted Switch files it skipped, a Switch game without a title id says
why on its metadata tab, and key files in the Firmware tab are marked as
not used by RomM.
Fixes#5330
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(switch): keep each scan's encrypted file count separate
Addresses Greptile's review on #5428: scans overlapping in one process
(DEV_MODE) shared the module-level set, so a second scan's begin_scan
cleared the first's count. The set now lives in a context var that each
scan's rom tasks inherit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ra): count earned achievements that share a badge separately
Earned achievements were stored and matched by badge name, which several
achievements in one set can share. Those collapsed into one entry, so the
game header undercounted (71/75 on a mastered set) and earning one of them
marked them all as earned.
Each earned entry now also carries the achievement's own ra_id, and the
game details view matches on it. Progressions stored before this are read
again on the next sync, and until then entries without an ra_id still
match by badge.
Fixes#5385
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4iit2hMN1bb49UMpcT
* test(ra): give the legacy-entry loop its own variable for mypy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4iit2hMN1bb49UMpcT
* feat(ra): mark the badge-name id of earned achievements deprecated
Several achievements can share a badge, so ra_id is the field to match
on. The OpenAPI schema now flags id as deprecated and points to ra_id.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4iit2hMN1bb49UMpcT
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ui): hide the anniversaries widget on days without anniversaries
The card showed "No anniversaries today" on empty days. It now renders
nothing then, and comes back when the rollover finds a day with games.
A failed load still shows the card with its error copy. The unused
widget-anniversaries-empty string is removed from every locale.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ui): collapse the widget rail when no card is visible
Addresses Greptile's review on #5414: with Anniversaries as the only
enabled widget on an empty day, the rail kept its padding as a blank
strip. The rail now hides itself when it holds no cards, staying in
the DOM so the widget keeps its midnight check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ui): keep line breaks in the game summary
Normalize CRLF and bare CR to LF and render the summary with
white-space: pre-line so multi-line summaries keep their structure.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(metadata): turn HTML in provider summaries into plain text
Add utils.html_text.html_to_text, a parser-based helper that drops known
HTML tags, maps paragraphs, line breaks and list items to newlines, and
unescapes entities. Unknown tags such as "<Start>" stay as literal text.
Moby, ScreenScraper, Steam, Flashpoint and LaunchBox summaries go through it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(metadata): separate table cells and keep bullets on their text
Addresses Greptile review on #5413: adjacent td/th cells now get a space
between them, and a list item wrapping its text in a paragraph keeps the
bullet on the same line.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(api): include the parsed version tag in ROM responses
The filename parser stores a version tag such as `(v2.00)` or
`(version CN-07)` in `Rom.version` and keeps it out of `tags`, but the ROM
response schemas never exposed it, so a client had no way to read it.
Add `version` next to `revision` and regenerate the frontend types.
Closes#5243
* fix(frontend): give hand-built ROM objects the new version field
romFixture(), the list row fixture and RelatedGameCard build SimpleRom
objects by hand, so vue-tsc rejected them once version became a required
schema field.
* test(roms): fix mock parameter order in version tag test (code-review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(api): return null for a missing revision or version and clear version on unmatch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(frontend): show the parsed ROM version on the game overview
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(ui/ux): make age rating and player count badges clickable
Issue #4805 (item 1): on the game page's default tab the age rating and
player count were rendered as static badges, even though both are already
supported gallery search filters.
Each badge now pivots into the global search scoped to that value, the
same pattern InfoGrid already uses for genres/developers/publishers, so
the pivot is a real `a[href]` and middle-click/open-in-new-tab keep
working.
- AgeRatingBadges carries the stored `metadatum.age_ratings` entry on
the badge so the link matches the JSON_ARRAY filter, not the
reconstructed "CATEGORY: RATING" display label.
- PlayerCountBadge pivots on the provider's free-form player-count
string, which is what the SCALAR_IN `player_counts` filter matches.
* fix(age-ratings): focusable tooltips, typed fixtures, real provider coverage
* fix(age-ratings): pr-ready code-review fixes
Give each repeated rating its own category badge with a unique key, pass
the untrimmed player count so the pivot matches the stored value, drop the
custom focus rings in favour of the global one, and test both links
against the real searchLocation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(age-ratings): pr-ready simplify pass
Build each badge label once, group provider ratings without copying the
queue on every insert, and share the mount helper across the tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(player-count): pr-ready review-polish comment trim
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(age-ratings): pr-ready humanizer pass
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(metadata): trim ScreenScraper and gamelist player counts
The player_counts filter is an exact match, so a padded value listed as its
own option and missed the player-count badge's search link.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(game-details): match badge hover to the info grid chips
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Yi-111-a <847203299+qQ1AJb@gmail.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(player): build the EmulatorJS globals in one pure function
EmulatorJSPlayer.vue configured EmulatorJS through about 90 lines of
`window.EJS_*` assignments mixed into its setup, reading props, the
config store, i18n and the DOM along the way, and declared the 60-line
global type block it relied on. None of it could be tested without
mounting the player.
buildEjsConfig() in views/Player/emulatorJSConfig.ts now takes those
inputs and returns every value, and applyEjsGlobals() writes them onto
window in one place. The Window declarations move with them. The
component builds the input from its props and stores and keeps
everything else (save sync, the default-options trap, the netplay audio
tap, the reload on unmount) as it was.
The values are unchanged, including two existing quirks kept on purpose:
the controls are still looked up by the requested core and the core
options by the resolved one, and the controls and cache limit are only
set when configured.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(player): build firmware fixtures from a typed factory
Addresses Greptile's review: firmwareFixture returns a complete
FirmwareSchema instead of a cast partial, used by the EmulatorJS config
and launch intent tests, and two config comments are trimmed to the
comment rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat: add RomM and IGDB similar games source toggle
* Use native RSelect for similar games recommendation source
* Use RomM native sliding segmented control for recommendation source
* test(frontend): drive the similar games source picker through its component
The picker moved to RSliderBtnGroup, which shallowMount stubs, so the
tests could no longer find its buttons. They now emit update:modelValue
on the stubbed group and read its modelValue. Also groups the
similarGamesSource setting with the other game page settings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4h1gm17cCYTX1t7BQX
* docs(frontend): describe both similar games sources in GameDetails
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4h1gm17cCYTX1t7BQX
* refactor(frontend): use RSegmentedControl for the similar games source picker
RSliderBtnGroup was renamed to RSegmentedControl in #5383.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4h1gm17cCYTX1t7BQX
* fix(frontend): make the x-small size shrink the tab variant of RSegmentedControl
size="x-small" only had rules for the segmented variant, so the similar
games source picker kept the full 34px tab height beside a 14px heading.
Tab x-small is now a 24px text pill; the explicit height overrides
RBtn's compact density, as the segmented x-small rule already does.
Adds a TabXSmall story.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4h1gm17cCYTX1t7BQX
* chore: add #5382 screenshots for the PR description
Removed again in the next commit; the PR body links them by this
commit's hash.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4h1gm17cCYTX1t7BQX
* chore: remove #5382 screenshots from the tree
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4h1gm17cCYTX1t7BQX
* refactor(frontend): drop !important from the x-small tab rule
#5386 removed !important from RSegmentedControl; the x-small tab rule
already out-specifies the base tab rule and RBtn's, so it needs none.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4h1gm17cCYTX1t7BQX
* docs(frontend): shorten the RSegmentedControl size prop comment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4h1gm17cCYTX1t7BQX
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Spells the primitive out like every other one in src/lib (RIcon,
RTextField, RSegmentedControl). Renames the component, its folder,
story, story stylesheet, and the r-img CSS classes. No behaviour change.
Claude-Session: https://claude.ai/code/session_01NH5s4h1gm17cCYTX1t7BQX
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(player): 🐛 preserve arcade BIOS archive bytes
* fix(player): write every 4.2.3 externalFiles download as bytes
code-review pass. EmulatorJS 4.2.3 hands each EJS_externalFiles download to
Emscripten FS.writeFile as an ArrayBuffer, which it rejects after creating an
empty file. That drops PUAE Kickstarts as well as the arcade BIOS, so the
conversion moves out of keepArcadeBiosWhole into writeExternalFilesAsBytes,
installed from the EJS_emulator trap for every listed URL. The trap test now
covers the BIOS bytes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(player): coerce 4.2.3 GameManager writes instead of downloads
simplify pass. The broken contract is GameManager.writeFile handing an ArrayBuffer to Emscripten's FS.writeFile, so patch that method once on the 4.2.3 global class rather than wrapping downloadFile and matching externalFiles URLs. This drops the URL filter, the response-shape guard and the extra emulator interface, and the nightly build (which never sets window.EJS_GameManager) is gated out without sniffing downloadGameFile. playerFirmware.ts goes back to master.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(v2): stop game videos from holding connections they no longer need
* fix(v2): keep hover previews from stopping a playing clip (pr-ready: code-review)
Hover previews get their own release slot so a cover hover no longer
stops a trailer the user started, the play() promise no longer marks a
released preview as playing, and MiniPlayer reuses releaseMedia.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(v2): share the cover release path, dedupe a test stub (pr-ready: simplify)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(v2): skip the hover clip release when it never played
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(notifications): drop stale fields from an earlier pasted URL
A URL read half-typed (ntfy://romm) sets mode=cloud. The full URL then
omits mode as the default, so the stale cloud mode stayed and Apprise
ignored the host. Remember what the last read filled in and drop it on
the next read unless it was changed by hand.
* refactor(notifications): apply code-review fixes to stale URL field handling
Reset the last-read memory with the form values instead of a clearPaste
flag, compare with lodash isEqual, and fix the test import order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(notifications): simplify the stale URL field tests
Fold the three drop cases into it.each, bind the paste label once, and
drive the URL debounce with fake timers instead of real sleeps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(notifications): let a pasted URL replace every option it decides
The parse response now lists every key the URL decides, defaults included,
so the dialog drops a stale value (ntfy's mode: cloud) whether it came from
an earlier read or from the channel being edited. This replaces the
frontend's memory of the last read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(notifications): keep typed values only beside a service's own URL
An Apprise URL carries every option, so a pasted one starts from defaults
and a stale ntfy mode: cloud (from an earlier read or the channel being
edited) is dropped. Only an https URL, a service's own, keeps what was
typed beside it. This replaces the parse endpoint's decided list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(frontend): add an Open in Steam action for Steam-matched games
Games with a Steam app ID now get an "Open in Steam" button and menu item
that hand steam://run/<appid> to the local Steam client, the same way the
Flashpoint action hands off flashpoint:// links. The anchor-click handoff
is shared between the two.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGA3D2oZ1hq3QUdnubMNXh
* test(frontend): drop the em dash from the Open in Steam test title
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGA3D2oZ1hq3QUdnubMNXh
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(auth): require the current password to change your own password
PUT /api/users/{id} set a new password or email for the caller with
nothing more than a me.write credential, so a leaked client token or a
hijacked session could take the account over for good.
A self-edit that changes the password or the email now needs
current_password, checked with bcrypt off the event loop (400 when
missing, 403 when wrong). Admins editing another user and the
forgot/reset-password flow are unchanged. Accounts with no local
password (OIDC-provisioned placeholders) can set a first one only from a
sign-in session, not from a bearer or client token.
UserSchema gains has_password so the UI asks for the current password
only when the backend will: the change-password dialog, the profile
email field, and the edit-user dialog when editing yourself.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* docs(user): shorten _verify_account_holder docstring
Addresses Greptile review on #5351.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(user): treat a case-only email edit as no change (code-review)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(user): simplify current-password checks and tests (simplify)
Hash the new password off the event loop, reuse errorMessage and the
viewer token fixture, and table-drive the needsCurrentPassword tests.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(user): require the current password to change your own username
Login is by username and a rename revokes every session, so a stolen
me.write token could lock the owner out without touching the password.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(user): lock the email of OIDC accounts to the identity provider
The provider overwrites a linked account's email at every sign-in, and
finds an unlinked password-less account by it, so a self-edit is either
lost or breaks SSO sign-in. Admins can still change it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(RTextField): give read-only fields a muted style
Dashed chrome, no fill and muted text, with no hover or pointer-focus
halo, so a locked value no longer looks editable. Keyboard and gamepad
focus keep their outline.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(auth): bound new client tokens by the caller's scopes and stop delegates removing admins
- Creating a client token, approving a device, and regenerating or pairing
an existing token now check against the scopes of the credential making
the request rather than the whole account's. A narrow client token can no
longer mint, or recover the secret of, a broader one. Session and basic
auth carry the account's scopes, so they behave as before.
- Deleting an admin requires the caller to be an admin, mirroring the
existing rule for creating one, since users.write can be delegated.
- Editing another user requires the users.write scope on top of the admin
role, so an admin's me.write-only token can't change other accounts.
- own_only is rejected (422) on grants and overrides for entities with no
owner (platforms, roms, firmware, users, tasks, logs), where it silently
meant "all". The catalog exposes the ownable entities and the permission
matrices only offer "own" on those.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(permissions): keep owner-less own_only grants' access on save
Addresses Greptile review on #5346:
- An own_only delete grant on an entity with no owner allows nothing
today (delete has no coarse scope and the fine check runs with
owned=False), so it is now dropped from group grants, or turned into
a revoke for overrides, instead of being saved as full delete access.
The matrices show it the same way.
- The group dialog no longer saves when the permission catalog failed
to load, which would have stripped every own_only grant.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(auth): require users.write in the credential to act on another user (pr-ready: code-review)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(auth): share client token effective scopes and canOwn (pr-ready: simplify)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* docs(permissions): tighten grantEffect docstring and matrix comment (pr-ready: review-polish)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(auth): make user, token and streaming admin rules consistent
- Acting on another user (edit, delete, RA refresh) needs users.write in
the credential, and only admins may target an admin or grant the admin
role. One assert_admin_for_admin helper now backs add_user, invite
links, update, delete and admin token revocation.
- Re-issuing a client token's secret (regenerate, pair) needs every scope
it stores; deleting one needs every scope it currently grants, so a
narrow token can't remove a broader sibling.
- Streaming admin overrides need users.read or users.write in the
credential, not just the admin role.
- Migration 0154 rewrites stored own_only grants and overrides on
owner-less entities to the access they already gave, so the frontend
normalisation and the catalog save gate are gone.
- own_only is no longer rejected on revoke overrides.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>