Commit Graph

14029 Commits

Author SHA1 Message Date
Georges-Antoine Assi
012ae2fa1e refactor(user): confirm an email inside the single user update
pr-ready step 3 (simplify). The confirmation now rides the one
apply_user_update transaction, guarded by expected_email, so a later 400
or 403 rolls it back and the edit audit sees it without a post-write
patch. update_user resets trust whenever it writes an email the caller
doesn't vouch for, replacing trust_email. Tests share the dialog's apply,
save and emailField helpers, and drop two redundant local imports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:30:48 -05:00
Georges-Antoine Assi
cf46b01ff5 fix(user): confirm a user's email only through an explicit admin action
pr-ready step 2 follow-up. The frontend resends the email on every save,
so trusting it on any admin save let enabling an invitee vouch for an
address nobody checked. An admin now sends confirm_email (the address they
saw) from a switch in the edit dialog; a changed address answers 409.
UserSchema exposes email_trusted and the edit audit records it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:25:11 -05:00
Georges-Antoine Assi
b69ca0e2a2 fix(auth): apply code-review fixes to email trust
pr-ready step 2 (code-review xhigh --fix): set email_trusted inside the
existing email block, trust a provider-confirmed email on an
identity-matched sign-in, reword the migration comment, and add tests for
delegated-manager creation and trust_email.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:18:54 -05:00
Georges-Antoine Assi
ceedecea5b fix(user): trust an admin-saved email only while the user still holds it
Saving an unchanged email as an admin wrote email_trusted=True by id alone,
so a user who changed their email between the admin's read and that write
had the new address trusted. The trust now goes through a conditional
UPDATE matching the address the admin submitted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 21:13:33 -05:00
Georges-Antoine Assi
2d6a937d4a fix(auth): link an OIDC sign-in by email only when an admin or the provider set it
A first OIDC sign-in linked any account holding the same email and applied
the provider's role claim to it. Users choose their own email (profile edit,
invite registration), so one could take an address belonging to someone at
the provider and receive that identity and its role on their first sign-in.

Users gain an email_trusted flag: set when an admin creates the account or
saves its email, or when the provider writes it, and cleared when the user
or a delegated non-admin manager sets it. Email matching refuses an account
whose email is untrusted with a 403. Existing accounts are migrated as
trusted so pending first sign-ins keep working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 20:37:54 -05:00
Sam Dornan
cc64045c8a fix(gallery): align the gallery shell's right gutter with the top bar (#5623) 2026-11-16 17:19:33 -06:00
renovate[bot]
f22d9c8421 chore(deps): update backend dependencies (#5607) 2026-11-16 07:07:50 -06:00
Sam Dornan
07b193c3ff fix(frontend): follow bottom-nav taps made while a view transition runs (#5605) 2026-11-15 17:26:10 -06:00
Stu Anderson
d505be3f02 fix(ui): remove background when gaming (#5602) 5.5.0-alpha.2 2026-11-15 10:43:37 -05:00
Georges-Antoine Assi
c9bafb8df9 chore(deps): update js-dos to 8.5.4 and track it with Renovate (#5598)
* chore(deps): update js-dos to 8.5.4 and track it with Renovate

Bump the bundled js-dos release and the jsDelivr fallback from 8.4.1 to
8.5.4, which ships a newer DOSBox-X and audio and player cleanup fixes.
8.5.x adds an opt-in DOSBox-X debugger build (wdosbox-x-dbg), stripped
from the image with the other unused files.

Renovate now tracks caiiiycuk/js-dos across both Dockerfiles and the
CDN URL. It can't hash the release zip, so its PRs carry a note to
update JSDOS_SHA256 by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: assert the js-dos pins match across images and the CDN fallback

CI builds only docker/Dockerfile, so a JSDOS_SHA256 left stale in the
root Dockerfile, or a CDN version left behind, would pass unnoticed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: condense the js-dos strip comment to two lines

Addresses Greptile's comment-length finding on both Dockerfiles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: assert every shared Dockerfile pin matches across both images

Merge the uv and js-dos pin tests into test_dockerfile_pins.py. It now
compares every ARG with a default in both Dockerfiles, so a new shared
pin is covered without a test edit, and keeps the uv range and js-dos
CDN checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 10:38:13 -05:00
alexcastgonz
a19957e33c fix(auth): redirect to login when OIDC discovery fails (#5594)
authorize_redirect fetches the provider's discovery document, so a wrong
OIDC_SERVER_APPLICATION_URL raised an HTTP error out of /login/openid and
returned a 500. Catch it, log the cause and land on the login page with
bypass_autologin, as the callback already does for rejected tokens.
2026-11-14 15:42:07 -05:00
alexcastgonz
631a1a3763 fix(roms): parse TOSEC compound region and language tags (#5582)
* fix(roms): parse TOSEC compound region and language tags

* test(roms): use unrecognized compound tag components

* fix(roms): limit TOSEC compounds to two-letter codes (pr-ready: code-review)

Single-letter GoodTools codes made (SW-R) read as Sweden and Russia,
and old-style [T-Br] translation tags read as Taiwan and Brazil.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(roms): drop prefix test the compound branch never reaches (pr-ready: simplify)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(roms): clarify _resolve_every docstring (pr-ready: humanizer)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(roms): give exact-case codes precedence in compound tags

Addresses Greptile: "Nl-No" read as Netherlands and Norway instead of
Dutch and Norwegian.

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>
2026-11-14 15:33:31 -05:00
Georges-Antoine Assi
e813e4d666 chore(coherence): adopt Coherence with specs, invariants and a PR report (#5584)
* 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>
2026-11-14 10:53:46 -05:00
alexcastgonz
c56d27be7b fix(roms): read full country names in filenames as regions (#5578)
* fix(roms): read full country names in filenames as regions

No-Intro writes full country names, e.g. (Poland) or (Czech Republic).
parse_tags only resolved the names listed in REGIONS, so the regions added
from the provider vocabulary were stored as other tags. Add those names to
the filename region aliases, skipping any that a language vocabulary claims.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* chore(roms): shorten region alias comment per Greptile review

Addresses Greptile's comment-length finding on #5578.

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>
2026-11-14 10:29:59 -05:00
renovate[bot]
9c810c6daa chore(deps): update dependency dnspython to v2.9.2 [security] (#5597) 2026-11-14 07:13:19 -06:00
Henrique Reis Neves
17d184f4b6 fix(config): warn about platform bindings to unknown slugs (#5580)
* feat(config): warn about platform bindings to unknown slugs

A config.yml binding whose value is neither a platform slug nor a
folder alias (a typo such as `snes-test: snse`) silently made a custom
platform with no metadata. Nothing pointed at the binding: the scan only
logged "Platform snse not identified", like any unknown folder.

Startup and the platform scan now log a warning that names the
system.platforms or system.versions key, the bound value and the
closest known slugs. Unbound folders are not checked, so custom
platforms stay quiet.

Closes #5464

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(config): treat IGDB version slugs as known bindings (pr-ready: code-review)

Bindings to IGDB platform-version slugs such as amiga-a-1200 are
identified by the scan, so they no longer warn. Startup reuses the
config that migrate_retired_filesystem_keys just loaded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(config): share the binding lookup with resolve_platform_slug (pr-ready: simplify)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(config): tighten binding warning docstrings and test typing (pr-ready: review-polish)

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>
2026-11-14 07:57:35 -05:00
Terri
8a1e6280b1 feat(saves): add save channels and snapshots (#5198)
* 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>
2026-11-13 21:59:19 -05:00
Henrique Reis Neves
f549a5d132 chore(platforms): add slugs for Luxor ABC 800 and PlayStation Mobile (#5571)
* feat(platforms): add slugs for Luxor ABC 800 and PlayStation Mobile

No-Intro has DATs for both, but RomM had no slug for either, so a library
folder holding them was never identified.

Add UniversalPlatformSlug.ABC_800 and PLAYSTATION_MOBILE and map them where a
provider lists them: Hasheous (Luxor ABC 800 id 278114, Sony PlayStation
Mobile id 314213) and HowLongToBeat (PlayStation Mobile). ScreenScraper,
LaunchBox, RetroAchievements, TheGamesDB and libretro list neither, MobyGames
documents the ABC 800 under its ABC 80 platform and has no PlayStation
Mobile, and IGDB could not be checked directly, so those stay unmapped.

Closes #5540

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(platforms): drop the ABC 800/ABC 80 inequality mypy rejects

mypy's strict equality flags `UPS.ABC_800 != UPS.ABC_80` as a comparison
between two enum literals that can never be equal. The check above it,
`UPS.ABC_800.value == "abc-800"`, already shows ABC_800 is its own member
and not an alias of ABC_80, whose value is "abc-80".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 21:34:38 -05:00
22mah22
eb10d95813 Issue #5585 Bumped python-socketio to 5.18.1 to fix delay when starting a stream. (#5588) 2026-11-13 10:10:47 -06:00
Georges-Antoine Assi
8aa975af99 docs(architecture): keep design in the architecture docs, point to code for listings (#5586)
* docs(architecture): keep design in the architecture docs, point to code for listings

BACKEND_ARCHITECTURE.md had grown to 2,223 lines, most of it listings
copied from the code: every route, every model column, the migration
list, the env var tables, the cache keys and a file-by-file tree. Those
change with most pull requests and had drifted (151 documented routes
against 287 registered, a viewer/editor/admin role model that is now two
roles plus permission groups, the middleware order reversed).

Keep what changes slowly and the code doesn't explain: layers, request
flow, the auth, permission and visibility model, scanning, RetroArch
sync, sockets, device installs, tasks and notification channels. Replace
each listing with a pointer to where the fact lives (OpenAPI, models/,
env.template, examples/config.example.yml, tasks/registry.py). Fix the
roles, middleware order and visibility rules while there.

FRONTEND_ARCHITECTURE.md loses its route, store, namespace and script
lists the same way. AGENTS.md and the backend-development skill no
longer promise "every endpoint".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(architecture): address Greptile review on access-control wording

- Permission groups also carry hidden entities and age settings; users
  add their own hidden entities and override the group's age settings.
- owned_rom_asset_or_404 is owner-only; public downloads check
  owner-or-public themselves, then assert_rom_visible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011waFLHyn7XpSvd4B2brCdf

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 10:11:14 -05:00
Georges-Antoine Assi
e41362f3bd docs(readme): update selfh.st badge for 9th place in the 2026 survey (#5583)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 07:43:48 -05:00
Tyler Vigario
3c5bab7a7f fix(hltb): send the search's platform in the form HowLongToBeat filters by (#5569)
* fix(hltb): send the search's platform in the form HowLongToBeat filters by

HowLongToBeat's search ignores a platform sent as a bare name, so every
search covered every platform: "gran turismo" for the PSP came back with
the PlayStation game first, and the retry on a subtitle alone could match
a game on any console. Its site sends the platform as
{"mode": "include", "values": [...]}, which the search does filter by, and
the payload now sends it that way. With no platform name the list is
empty, which searches every platform.

A name outside HowLongToBeat's platform list filters out every game. It
lists PlayStation VR games under PlayStation 4, so that is what a
PlayStation VR ROM searches, and it has no PlayStation Now, so that
platform no longer maps to HowLongToBeat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TsLtVzsT8WBDnc6ZSRyp2u

* fix(hltb): key HowLongToBeat's VIC-20 on the VIC-20, not the Plus/4

The VIC-20 entry was keyed on the Plus/4, which made no difference while
HowLongToBeat ignored the platform. Now that the search filters by it, a
Plus/4 ROM would be searched among VIC-20 games. HowLongToBeat has no
Plus/4, so that platform no longer maps to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TsLtVzsT8WBDnc6ZSRyp2u

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 12:07:29 -06:00
Sam Dornan
3caad86165 fix(frontend): make the bottom nav respond to every tap, give its labels room, and soften its shadow (#5575)
* 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>
2026-11-12 12:06:46 -06:00
Sam Dornan
104e34d700 perf(streaming): start the streaming worker only when streaming is enabled (#5570) 2026-11-12 07:38:48 -06:00
Georges-Antoine Assi
fb338ea19f chore(skills): put collapsed technical changes in every release note (#5567)
* chore(skills): put collapsed technical changes in every release note

The draft-release-notes skill now writes env var and API changes as a
"Technical changes" section of two collapsed <details> blocks, placed
after the warning callouts, in every release, stable or prerelease. API
rows are grouped by area. This replaces the alpha's NOTE callout, the
beta's bottom API table, and the stable release dropping both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(skills): keep technical changes in patch notes and ref env rows

Addresses Greptile review on #5567.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 21:05:54 -05:00
Sam Dornan
636308984e fix(frontend): stop scrolled content showing above the top bar on iOS Safari; one header band for every page (#5566) 2026-11-11 16:43:14 -06:00
Sam Dornan
576a8b0f99 fix(frontend): split collections and platforms empty messages into title and hint (#5563)
* fix(collections): render empty-state detail as regular-weight hint

The long empty-collections sentence was passed as the bold title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4eTi6dcmTfSWZcXLtE

* fix(collections): add title to empty state and trim redundant hint sentence

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4eTi6dcmTfSWZcXLtE

* fix(platforms): split empty-platform messages into title and hint

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4eTi6dcmTfSWZcXLtE

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
5.5.0-alpha.1
2026-11-11 13:27:23 -06:00
Sam Dornan
4730ad61d6 perf(frontend): drop lodash for small native helpers (#5561) 2026-11-11 09:20:57 -06:00
Stu Anderson
1bb3ee7c51 perf(frontend): poll the gamepad only while one is connected (#5547)
* perf(frontend): poll the gamepad only while one is connected

useGamepad and useRightStickScroll ran requestAnimationFrame loops on every
page, with or without a pad. They now start on gamepadconnected and pause
when the last pad leaves.

Written primarily by Claude Code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(frontend): reset held pad state before polling pauses

When the last pad disconnected mid-hold, polling paused with the exit
chord's timer still running, so a reconnect could fire it early. One last
tick with no pad resets it through the loop's own path.

Written primarily by Claude Code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(frontend): apply code-review fixes to pad-gated polling

Guard hasUsablePad against a blocked gamepad API, drop the now-dead
in-loop pad detection, and cover pausing on the last disconnect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(frontend): apply simplify pass to pad-gated polling

Move usePadRafFn into its own composable as a pure connect/disconnect
gate, and let useGamepad release its exit chord in its own disconnect
listener instead of the helper running a final frame for every caller.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(frontend): probe for a pad once a second while polling is idle

Some webviews expose a pad through getGamepads() without firing
gamepadconnected, which would leave the controller dead until a reload.

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>
2026-11-11 08:33:37 -05:00
Henrique Reis Neves
34117694ac fix(scan): read revision tags written without a separator (#5559)
GoodTools sets name a revision with no space or dash after "Rev", as in
"Sonic The Hedgehog (W) (REV01) [!].gen". REVISION_TAG_REGEX required a
separator, so "(REV01)" and "(Rev1)" left the revision empty and landed
in the free-form tags instead.

The regex now also takes "Rev" followed directly by a digit. A letter
right after "Rev" still does not count, so tags such as "(Revenge)" and
"(RevB)" stay plain tags.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 08:25:52 -05:00
danielcopper
bae61eb92b fix(firmware): add the three missing PS2 v2.00 BIOS dumps of 2004-06-14 (#5551)
known_bios_files.json lists the v2.00 dumps of 2004-06-14 for regions
ED and H, but not those for A, E and J, so a dump with one of their
hashes shows as unverified under any name and folder. The values are
those of libretro-database dat/System.dat at c4e17d41, lines 572-574,
and the entries sit in that file's order, as the other ps2 keys do.

Closes #5539
2026-11-11 07:48:34 -05:00
Stu Anderson
cd75551857 chore(storybook): add the pseudo-states addon (#5549)
Adds a toolbar to force :hover, :focus-visible, :active and other states
on any story, so interaction styles can be reviewed in both themes without
a mouse. Dev dependency only.

The lockfile's dropped "dev" flags are npm 11.21.1, the pinned
packageManager, normalizing it: re-locking untouched master produces the
same 87 lines. Nothing installs with --omit=dev, so builds are unaffected.

Written primarily by Claude Code.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 07:48:12 -05:00
Tyler Vigario
d96ec82e05 fix(scan): name a game by metadata priority, whatever order the scans ran in (#5546)
* fix(scan): name a game by metadata priority, whatever order the scans ran in

An unmatched scan asks only the sources a ROM has no match from yet, and
merges just their answers. A stored name that looks like a placeholder was
replaced by whatever name that subset gave, and a provider's name often looks
like one: LaunchBox calls Super C (USA).nes "Super C". So an unmatched
HowLongToBeat scan renamed it "Super Lucky's Tale", though LaunchBox ranks
above HowLongToBeat in scan.priority.metadata, and once a name no longer
looked like a placeholder no refresh could correct it.

Every source now keeps the title it gave in its own blob, as hash sources
keep their dump tags. On an unmatched, update or hashes scan the name goes to
the highest-ranked source among this scan's answers and the stored titles of
the sources the ROM is still matched to. A source matched before titles were
kept outranks the rest unknown, so the stored name stays. A stored name equal
to some source's title counts as derived, so a better-ranked source can
replace it; any other name is the user's and stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TsLtVzsT8WBDnc6ZSRyp2u

* fix(scan): count only a string as a source's kept title

The raw metadata editor stores any JSON, so a blob's name can be a list or an
object, which broke a refresh with an unhashable set element. kept_title now
reads a stored title for both settle_name and keep_base_fields, and anything
but a string counts as no title. settle_name's docstring is one sentence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TsLtVzsT8WBDnc6ZSRyp2u

* fix(scan): settle names across Hasheous-filled IGDB columns and pre-existing rows

code-review (xhigh) pass: stamp every blob a source fills, treat only ids the
row already held as stored matches, count this scan's titles as derived, and
drop non-string kept titles from responses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(scan): share one priority ordering for the name settle

simplify pass: order_merge_sources returns the full ordering so settle_name
skips its own config read, kept_title moves next to NAME_CLAIM_KEY and backs
the response filter, keep_base_fields' comments fold into one, and the name
priority tests share constants and parametrize their near-duplicates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(scan): reword settle_name's unknown-title comment

review-polish pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(scan): settle slug and artwork by priority too, under a scan_claims key

Each source's blob now keeps the name, slug, cover and screenshots it gave
under one namespaced scan_claims key (a ScanClaims TypedDict) instead of a
bare name key that shared the providers' own key space. settle_claims ranks
every claimed field by its own priority list, so a partial scan no longer
writes a lower-ranked source's cover over a better-ranked one. A matched
source with no claims on record holds the stored value only when that value
is set. The artwork orderings are computed once and shared with
apply_artwork_priority, so no config read is added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(scan): hide scan_claims from the API

The claims stay in each source's blob, but the provider metadata types no
longer declare them, so they're out of the OpenAPI schema and the generated
frontend types. Responses strip the key, and a raw metadata edit keeps the
stored claims while the source's match stands instead of taking the client's.

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>
2026-11-11 07:30:20 -05:00
Sam Dornan
4649b0bf3f fix(frontend): highlight tapped bottom-nav tab immediately (#5558) 2026-11-10 21:18:11 -06:00
Georges-Antoine Assi
03636ec156 fix(player): boot the base game, not a patch or translation (#5538)
* 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>
2026-11-10 21:56:17 -05:00
renovate[bot]
1a4bd2ccc5 chore(deps): update dependency croniter to v7 (#5536)
* chore(deps): update dependency croniter to v7

* chore(deps): lock croniter 7.0.0 past the release cooldown

Addresses Greptile's stale-lockfile finding. croniter 7.0.0 is a day old,
so exempt it from exclude-newer to let uv lock resolve it. None of the
7.0 breaking changes apply: RomM only calls is_valid, rq uses the default
mode, and no default schedule starts a step at a field maximum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 17:21:24 -05:00
Georges-Antoine Assi
903ed64d94 fix(scan): hash compressed ROMs by their content in every format (#5537)
* fix(scan): hash compressed ROMs by their content in every format

Files inside a game folder and standalone single-stream files picked a
reader from a hand-written extension/MIME chain that treated plain .gz as
tar, missed .tgz/.txz/.xz and the application/gzip MIME spelling, and
called max() on empty archives. One suffix-then-MIME lookup in
utils/archives now picks the reader, plain gzip/bz2/xz streams are
decompressed (or read as a tarball when they hold one), and an empty or
unreadable archive falls back to hashing its raw bytes.

Fixes #5328

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(scan): don't read a zero-prefixed compressed stream as an empty tar

Addresses Greptile review on #5537: tarfile.is_tarfile accepts a
zero-filled opening, so a plain .iso.bz2 or .iso.gz starting with zeros
fell back to its compressed bytes. A tarball now needs a first member.
Also moves hash_largest_member's failure contract into Returns:.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(scan): fall back to raw bytes on more unreadable archives (code-review)

Catch ValueError from corrupt Deflate64 members and undecodable zip
names, treat an archive with empty content as unreadable, route zips
with methods zipfile can't decode through 7zz, and drop the zlib.error
handlers no reader raises any more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(scan): route 7z and undecodable zips through one largest-member reader (simplify)

Replace hash_largest_7z_member with a read_7z_file iterator built on the
shared 7zz listing and streaming helpers, probe zips with
_undecodable_zip_method instead of inspecting the exception cause, share
one decompression error tuple, snapshot only the ROM-level accumulators,
and reuse the archive-writing test helpers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(scan): bound, single-pass and RAR-aware largest-member hashing

- Every Python-side archive read (zip, tar, gzip, bz2, xz, and the
  composite zip/tar readers) now shares the SEVEN_ZIP_TIMEOUT budget the
  7zz and bsdtar paths already had, so a decompression bomb falls back to
  the raw bytes instead of tying up a scan thread.
- Compressed tarballs are read in one streaming pass: each member larger
  than every one before it is hashed into a copy of the hashers as it
  passes, instead of listing the whole archive and then decompressing it
  again to reach the largest member.
- gzip is decompressed member by member and ignores trailing bytes the
  way gunzip does, instead of discarding the content when padding follows
  the last member.
- RAR members inside game folders hash by their largest member through
  bsdtar.
- ARCHIVE_FORMAT_BY_SUFFIX moves to utils.filesystem and is the single
  suffix list: COMPRESSED_FILE_EXTENSIONS, RAR_FILE_EXTENSIONS and the
  handler's ARCHIVE_READERS are built from it.
- _calculate_rom_hashes detects the MIME type once per file and reads the
  embedded CHD hash in the same thread, so libmagic no longer runs twice
  per file or on the event loop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 16:58:59 -05:00
Georges-Antoine Assi
0a643a3e8e fix(sync): resolve RetroArch save names to the core's platform (#5533)
* 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>
2026-11-10 16:57:39 -05:00
Sam Dornan
8f074cd5d8 feat(frontend): show compact mobile page titles after scrolling (#5553) 2026-11-10 11:57:43 -06:00
Georges-Antoine Assi
c0a67d674d fix(player): record the device that wrote a state and skip other devices' states at start (#5531)
* 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>
2026-11-10 07:58:51 -05:00
Georges-Antoine Assi
0183cae8ad fix(retroachievements): ride out rate limits during the progress sync (#5532)
* 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>
2026-11-10 07:56:45 -05:00
Stu Anderson
928106673e perf(frontend): stop promoting every virtual scroller item to a layer (#5550) 2026-11-09 17:39:33 -06:00
Sam Dornan
b633df361d test(frontend): disable MdPreview image zoom in mdeditor test (#5542) 2026-11-09 16:17:46 -06:00
Georges-Antoine Assi
fa3654dd79 fix(platforms): stop filing sgb folders as Game Boy Color (#5530)
* fix(platforms): stop filing sgb folders as Game Boy Color

ES-DE and Batocera name their Super Game Boy system sgb (Game Boy games
on the SNES adapter). Mapping sgb and sgb-msu1 to gbc gave those folders
Game Boy Color provider ids and limited IGDB searches to the wrong
platform. RomM has no Super Game Boy slug and IGDB, TheGamesDB,
RetroAchievements and LaunchBox list none, so leave the folders
unidentified; a config binding can still map them.

Fixes #5506

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(scan): keep a missing platform folder unless its alias exists

Addresses Greptile review on #5530: with the sgb aliases gone,
gbc2players became the reverse folder for gbc, and a rescan with the gbc
folder missing saved that nonexistent folder on the platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 13:10:44 -05:00
Georges-Antoine Assi
b0de3f224c fix(search): reword the physical filter's file option (#5529)
"Show ROMs with a file only" read as "file-only ROMs", as if games that
are also owned physically were excluded. A physical game in RomM is a
file-less row, so the option already shows every ROM with a file;
"Show only ROMs with a file" says that. Other locales already phrase it
this way.

Fixes #5481

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 13:09:59 -05:00
Sam Dornan
4e74f4619a feat(frontend): bring the bottom nav closer to Slack's tab bar (#5541)
* 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>
2026-11-09 10:38:46 -06:00
renovate[bot]
6732bc3655 chore(deps): update peter-evans/create-pull-request action to v8.1.2 (#5535) 2026-11-09 08:22:07 -06:00
renovate[bot]
37ec1a84dd chore(deps): update docker base images (#5534) 2026-11-09 08:21:23 -06:00
renovate[bot]
7bcd14de39 chore(deps): update backend dependencies (#5520) 2026-11-09 08:20:12 -06:00
renovate[bot]
41b064c19a chore(deps): update frontend dependencies (#5521) 2026-11-09 08:19:46 -06:00