* Let the platforms filter exclude as well as include
The search filter drawer gains an Any/None toggle next to the platforms
select. `GET /api/roms` takes a new `platforms_logic` parameter ("any" or
"none"); "all" is rejected because a rom has one platform.
An exclusion keeps the grouped single-platform cache from answering, is
carried into the filter-values scope, round-trips through the URL, and
is stored on smart collections as `platforms_logic: "none"`. A platform
route always includes its own platform.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4icN79J4F1bZ15pmZG
* Rename the filter drawer's "Tags" heading to "Attributes"
The section holds genre, franchise, company, region, status and more,
with "Tag" as just one of its rows, so the heading read as if every row
were a tag. The platforms select joins it as the first row, and the rows
share one column grid so the selects line up even though the platforms
toggle has no "all" button.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4icN79J4F1bZ15pmZG
* Fix three gaps in platform exclusion found in review
- A URL with platforms but no platformsLogic now includes them, so
following an inclusion link after an exclusion no longer keeps
excluding. Without platforms the logic is left alone, since it is
never written to the URL then.
- Smart collection criteria give the route's platform priority, as the
gallery request does, so a collection saved on a platform page never
excludes the games on screen.
- The drawer's Reset button resets the platforms toggle to Any.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4icN79J4F1bZ15pmZG
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(emulatorjs): expose download cache enable setting
* pr-ready: code-review
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: review-polish
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(config): move cache_limit under emulatorjs.cache and read config.yml strictly
emulatorjs.cache.limit replaces emulatorjs.cache_limit, which is still read
with a deprecation warning and is rewritten to the new key on the next save.
Every config.yml read now goes through one reader that exits with code 3 when
a parent block is not a dictionary (e.g. `netplay: true`), where get_nested
silently fell back to the default.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(emulatorjs): clear every EmulatorJS cache and keep nightly's cache size
The clear-cache dialog now also deletes EmulatorJS-bios (4.2.3) and
EmulatorJS-Cache (nightly), which kept serving downloaded files.
Nightly turns EJS_CacheLimit, a per-file byte cap in 4.2.3, into its total
cache size in MB, so a limit under 1 MiB gave a 0 MB cache. Passing
cacheMaxSizeMB explicitly keeps nightly at its own 4096 MB default.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(utils): drop get_nested
The config loader reads config.yml through its own strict reader now, so
get_nested has no callers left.
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(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(demozoo): send an API key with every Demozoo request
Demozoo's API has required an API key since 2026-11-01. Add
DEMOZOO_API_KEY, sent as an Authorization: Api-Key header, and enable
Demozoo when it is set, like the other key-based providers. It replaces
DEMOZOO_API_ENABLED, since requests without a key are refused.
Fixes#5698
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: code-review
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(i18n): add Ukrainian locale
* fix(i18n): address Greptile Ukrainian locale review
* fix(i18n): proofread the Ukrainian locale
Fix the machine-translation errors left in the uk_UA catalog: glosses
glued onto words ("ХешісCity in Germany"), Russian lines, mangled RomM
and brand names, and wrong word senses (save states as "штати", saves
as "заощадження", walkthroughs as "прогулянка", unpin as "Приєднати").
Give every count message three plural forms and use one term per
concept: завантажити for download, вивантажити for upload, прошивка,
трансляція, акаунт, токен, добірка, папка and знімок екрана.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ci(i18n): reject words that mix Latin and Cyrillic letters
Machine translation can leave an English gloss glued onto a translated
word ("Сканування зупиненоName"). check_i18n_locales.py now fails on
any word in a locale file that runs Latin and Cyrillic letters together,
ignoring placeholders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: tarasromil <16254098+tarasromil@users.noreply.github.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(streaming): offer disc sheets, not their tracks, as stream discs
The start-disc picker and disc-swap dialog only treated .cue as a disc
sheet, so .gdi, .ccd and .mds sets listed their raw tracks, which the
backend rejects. Pick discs the way utils/m3u.disc_files does.
Fixes#5709
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(streaming): keep patches and variants out of the disc lists
The start-disc list now drops patch files by extension, as disc_files
does, and the swap dialog lists only the base game's discs, as
playlist_files does, so neither offers a file the backend rejects.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: code-review
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: simplify
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: review-polish
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* pr-ready: prose
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(streaming): order stream discs by disc number
The backend's disc_files sorts by the disc tag, so a set of ten or more
discs listed Disc 10 before Disc 2 in the start and swap pickers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(streaming): offer no disc pick before the first heartbeat
Patches are recognised by the heartbeat's supported extensions, which are
empty until a heartbeat lands, so a root-level patch showed up as a disc.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(streaming): decide the disc swap from the disc sent with the claim
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>
FirmwareTab and DeleteFirmwareDialog looked up three keys that no
locale defined, so their tooltips and bulk checkbox always rendered the
inline English fallback. Define them in en_US and translate them in
every locale.
Fixes#5711
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(jukebox): fall back to the file name when a track's embedded title is empty
panelTracksFromRom used ?? for the title, so an empty tag stayed an empty
title, while the catalog path (panelTracksFromCatalog) already falls back
to the file name with ||.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* test(jukebox): type the empty-title fixture instead of casting it
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 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>
* fix(states): send each state's content hash in the state list
RomM stores a content hash for every state, and the save list already
sends each save's. StateSchema never had the field, so GET /api/states,
GET /api/states/{id} and a ROM's user_states left it out. A client that
keeps its own copies of states can now tell it already has one without
downloading it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(pr-ready): code-review fixes
Document what a state's content_hash covers in the schema and cover the
ROM detail user_states/all_user_states in the endpoint test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(pr-ready): simplify
Declare content_hash once on ManagedAsset, the schema side of the
ChannelContent model that owns the column, so saves and states share one
documented field. Build the hash test on the state fixture with a single
hash value.
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 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>
* docs(api): describe the core endpoints and add a docs test
Give the parameters, operations and response fields of the core routers a
description in the OpenAPI document: roms, platforms, collections, users,
saves, states, screenshots, channels, snapshots, streaming, devices, client
tokens, play sessions, search, auth, music, memory cards, firmware, sync,
config, feeds, notifications and permissions.
Response models read attribute docstrings (`use_attribute_docstrings` on the
shared response `BaseModel`), so a string after a field is its description.
The update-rom form reads its descriptions from `RomUpdateForm`, so they
have one home. The paging parameters gain examples, such as 72 per page.
`tests/endpoints/test_openapi_docs.py` reads `app.openapi()` and fails when a
parameter or operation of a listed router has no description, or when a
schema with some described fields leaves others bare. Add a router to
`DOCUMENTED_ROUTERS` once its parameters and operations are described.
Descriptions only: no parameter, constraint or default changes. The frontend
types need regenerating (`npm run generate`).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* docs(api): describe the remaining routers and the roms list parameters
Cover the last routers (tasks, activity, heartbeat, audit events, stats, logs
and netplay) and add the routers to the docs test's allow-list, so every
router is now held to a description on each parameter and operation.
Describe the schemas that test found partly documented: the task status
responses and `TaskInfo` (as `Annotated[..., Field(...)]`, since a TypedDict
takes no attribute docstrings) and the audit page's `max_id`.
Rewrite the `GET /api/roms` parameters that did not say what they do:
`with_char_index`, `with_filter_values`, `with_rom_id_index`, `with_total`,
`with_provider_metadata`, `order_by`, `with_files`, `group_by_meta_id` and
`search_term`, each with an example or the values it accepts.
Replace a franchise name in an existing docstring example with a neutral one.
Descriptions only: no parameter, constraint or default changes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* chore(api): regenerate the frontend types
Run `npm run generate` against the backend so the generated models carry the
descriptions added to the OpenAPI document. Only comments change: no type,
field or signature differs.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* docs(api): fix alternative_names and shorten docstrings per review
Address the review feedback:
- Describe `alternative_names` as the hand-set titles when there are any,
otherwise the titles from IGDB, MobyGames and ScreenScraper, as
`resolve_alternative_names` returns them. It said every matched provider.
- Check HEAD routes in the docs test. Both existing HEAD routes already pass.
- Keep docstrings to one paragraph, as the repository asks. The test module
docstring is one sentence and its two rules are short comments. Nineteen
operation docstrings added in this change drop their second paragraph.
Descriptions and a test only: no parameter, constraint or default changes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* chore(api): regenerate the frontend types
Pick up the corrected `alternative_names` description. Only comments change.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* docs(api): correct descriptions that disagree with the code (pr-ready: code-review)
Fix 12 OpenAPI descriptions that contradicted handler behavior (empty
provider metadata, virtual collection types, streaming container lookup,
save device sync, user collections, search terms, file order, firmware
file name, audit max_id, play session offset, save target layouts).
Share the music filter descriptions through Annotated aliases and drop
comments that restated the new docstrings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(api): share parameter aliases and check every router (pr-ready: simplify)
Move the rom id and sort direction aliases to utils/router.py and reuse
them, add per-router id path aliases in place of repeated inline params,
let LimitOffsetPage inherit the shared BaseModel config, and drop Args
blocks that restated parameter descriptions. The docs test now covers
every /api path instead of an allowlist. The OpenAPI spec is unchanged
apart from description strings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(api): form model for rom updates, shared schema config and rom id alias
- Take RomUpdateForm as a FastAPI form model instead of 33 Form params
and a duplicate field dict; only sent keys still count as provided.
- Document TypedDict responses with attribute docstrings through
@with_config(API_SCHEMA_CONFIG) instead of per-field Annotated wrappers.
- Move request payload models onto the shared BaseModel and use
attribute docstrings for their descriptions.
- Replace the 32 inline rom id path params with RomIdPath, which now
carries ge=1 (adds minimum: 1 to the activity and streaming rom ids).
The update rom request body now references a RomUpdateForm schema; the
multipart fields are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(api): keep only the descriptions that explain something
Drop the field and parameter descriptions that restate the name, the
type, or what the schema already shows (enum and literal values,
defaults, bounds, nullability), along with the wrappers and aliases
that only carried them. Reword four that did not say what the field
is. The docs test now checks operations only, since requiring a
description on every parameter and field is what produced the filler.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(api): plainer wording for three sync and rom descriptions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(api): rewrite clipped descriptions as full sentences
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(api): document error statuses in responses instead of docstrings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(api): document pairing code exchange errors
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(api): move error statuses from route docstrings into responses
Covers the routes whose docstrings stated an error in prose or in a
Raises: block, new in this PR or older.
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>
* feat(roms): load roms by an array of ids
GET /api/roms accepts up to 256 rom_ids and returns those roms in the
order given. Ids the caller can't see, or that don't exist, are left out.
Closes#5659
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(roms): code-review pass on rom_ids window
Reuse RomIdScope (dedupe, shared 500 cap), skip sidecar and grouped page
cache reads for a window by id, report offset 0 and the id count as limit,
and rename the shadowed rom_ids local in _transform.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(roms): simplify pass on rom_ids window
Return early for rom_ids before building the filtered query, the sidecars
or any cache key, through a shared _hydrate helper, so the paged path is
back to its prior shape. Tests use the headers fixture.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(roms): review-polish pass, cover a hidden platform in the rom_ids window
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(collections): refuse malformed virtual collection ids, require page-row visibility
A malformed virtual_collection_id raised an uncaught decode error (500) on
the gallery, random and bulk download routes. It is now a 422 at the query
boundary, and GET /collections/virtual/{id} answers 404.
get_page_rows_query takes visibility as a required argument, since it is
the access check on caller-supplied rom ids.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(gallery): load scroll windows by rom id
Once the bootstrap holds the whole ordered id index, a window fetch sends
that slice as rom_ids, so the backend skips the filtered, offset-paged
query. Items are placed by id, since ids that went missing or hidden are
dropped from the response.
On a 100k-rom MariaDB library, a filtered grouped window went from
0.8-2.0 s to ~50 ms, and a deep ungrouped window from 106 to 50 ms.
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>
* 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>
* chore(trunk): clear the osv-scanner findings from the scheduled check-all run
The weekly Trunk Check (all files) run fails on nine osv-scanner
findings in frontend/package-lock.json.
- Lockfile-only bumps, all inside the existing semver ranges:
follow-redirects 1.16.1 -> 1.16.3 (via axios),
fast-uri 3.1.8 -> 3.1.9 (via workbox-build > ajv),
serialize-javascript 7.0.5 -> 7.1.4 (via workbox-build > @rollup/plugin-terser).
- GHSA-gcqx-w48m-w2h4 (deepmerge) has no fixed release, and
@rollup/plugin-node-resolve only merges its own frozen defaults with it.
- GHSA-3g3m-2fjr-6pw4 (glob) is fixed only in glob 14, outside the
^11 (workbox-build) and ^13 (js-beautify) ranges, and neither caller
passes an AbortSignal.
Both are ignored in frontend/osv-scanner.toml with an expiry, like the
existing braces entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(trunk): code-review fixes for the osv-scanner ignores
Bump js-beautify's nested glob to 13.0.7, which carries the AbortSignal
fix. Drop the deepmerge and braces ignores, whose advisories were
withdrawn, and move the glob ignore to effectiveUntil.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(trunk): simplify the glob ignore comment
The reason field already says which versions lack a fix.
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>
* 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>
* perf(frontend): subset the mdi icon font to the icons the app uses
#5118 trimmed the icon CSS, but the font file still held every glyph
(403 KB) and the build still copied the eot, ttf and woff formats.
The build plugin now also cuts the woff2 down to the code points of the
rules it keeps, and the stylesheet's only font source is that file.
Build only: dev keeps the full font, so a newly used icon renders
without a restart. Font in the build: 403,216 B -> 25,504 B, and the
three unused formats are no longer emitted.
Adds subset-font and @types/subset-font as dev dependencies.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* chore(frontend): lint against building mdi icon names at runtime
The build keeps only the icon glyphs whose names appear in full in
src/, so `mdi-${name}` or "mdi-" + name would render an empty square
in production. romm/no-dynamic-mdi-name reports both forms in scripts
and Vue templates.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* chore(frontend): drop the mdi font subsetting, keep the lint rule
The browser caches the full icon font after the first load, so
subsetting it only saves about 360 KB on a cold cache. That doesn't
justify two new dev dependencies and a build step that writes into
node_modules. The rule that rejects runtime-built icon names still
protects the existing CSS trim.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(frontend): flag mdi icon names split across string literals
Addresses Greptile's review: "mdi-" + "home" passed the rule, but the
build only finds icon names written in full, so that icon lost its CSS.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(frontend): type isStringLiteral as a type guard
vue-tsc rejected reading .value off the narrowed BinaryExpression side.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(frontend): catch mdi names split across + chains and templates
pr-ready step 2 (code-review xhigh). The rule now reads the static text
at each end of a join, so `base + " mdi-" + name` and `mdi-` + name are
reported, while "mdi-home" + " " + tone stays valid. The word boundary
no longer treats `_` as a separator, and the test reuses a shared
sfcTemplate helper.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(frontend): share the SFC test wrapper, inline isStringLiteral
pr-ready step 3 (simplify). sfc and sfcTemplate now build their case
through one vueCase helper, isStringLiteral is inlined into its only
caller, and the rule points at the build's ICON_NAME so the two
character classes stay in step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(frontend): fail the build on mdi names @mdi/font does not define
The icon trim keeps only names written in full in src/, so a name built
at runtime, or one @mdi/font never had, renders blank in production.
The build now lists each mdi-* token outside tests that names no class
in the stylesheet, with its file and line, and stops. That covers what
the lint rule cannot see: names joined through a variable, .concat, or
+=, and plain typos.
The check found mdi-playstation in the RSelect story, which @mdi/font 7
does not have; it is now mdi-sony-playstation.
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>
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(deps): update frontend dependencies
* fix(deps): keep rolldown in Vite's range and dedupe Playwright
Addresses Greptile's review on #5608 and the failing CI jobs.
- Pin the rolldown override to 1.2.18, inside vite 8.3.7's ~1.2.18 range.
rolldown 1.3.1 emitted 12 syntactically invalid chunks, which broke the
e2e app boot ("missing ) after argument list").
- Dedupe the lockfile so playwright and playwright-core resolve to a single
1.65.0. The stale hoisted 1.64.1 broke e2e typechecking (two Page types)
and the vitest browser run (missing headless shell for the wrong build).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(deps): keep js-beautify's nested glob at 13.0.6
The dedupe bumped it to 13.0.7, which osv-scanner reports as a new
GHSA-3g3m-2fjr-6pw4 finding. Every glob 13.x is affected and js-beautify
pins ^13, so the bump fixed nothing and only moved the baseline.
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>
* 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>
* 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>
* 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>
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>
* 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>
"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>
* 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>
* feat(scan): recognize Brazilian Portuguese as a language
Add "Pt-BR" (Brazilian Portuguese) to the filename language table, so
"(Pt-BR)" and "(T-Pt-BR)" no longer fall back to an unrecognized tag or
to European Portuguese, and show the Brazilian flag for it in the UI.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(scan): read the regional variant ahead of a translation's version
"[T+Pt-BR1.1_Grp]" kept the version in the lookup and fell back to
Portuguese. Match only the two-letter variant that opens the patch, and
cover the Brazilian flag in the frontend tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* style(scan): apply black formatting
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
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>