The worker received its connection string through `rq worker --url`, which
put the password in argv for the life of the process, readable via
/proc/<pid>/cmdline, ps, and any monitoring or diagnostic tooling that
collects command lines (CWE-214).
RQ's `--url` option already reads from RQ_REDIS_URL, so passing it through
the environment instead is behavior-preserving. This matches how the RQ
scheduler alongside it already takes its credentials.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The Batocera example bound the tic80 folder to "tic", which is not a
platform slug RomM knows. A binding to an unknown slug still applies, so
the platform is created with that slug, matches no metadata provider, and
is named from the string itself rather than being identified.
The real slug is tic-80.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The files list and the firmware list both read SHA-1, CHD SHA-1, MD5, CRC,
RA. The metadata tab led with CRC instead, so the same hashes appeared in a
different order depending on which tab the user was on.
Covers the ordering with a unit test, including the CHD SHA-1 position: the
mock library holds no CHD, so that branch cannot be reached in a browser.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
MetadataTab was the only place labelling the row SHA1, while FileRow,
FilesSummary and the firmware list all use SHA-1. It was also inconsistent
within its own list, sitting directly beside a CHD SHA-1 row.
The label is hardcoded rather than translated, so no locale changes.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Clipboard API only exists in a secure context, so over plain HTTP the
copy button on a hash chip always failed. Because the displayed value is
abbreviated in JavaScript, the rest of the hash was never in the DOM
either, leaving the full value unreachable on any HTTP install.
Clicking a chip now reveals the full value as selectable text whenever a
copy cannot land, so Ctrl+C works as a fallback. On HTTP the click no
longer attempts the doomed copy, so the misleading error toast is gone.
Behaviour over HTTPS is unchanged apart from revealing when a copy throws.
The firmware tab only ever showed the MD5, as an unselectable chip with no
copy affordance, while the stored CRC and SHA-1 were never displayed. All
three now render as copyable chips, matching the ROM files tab.
Fixes#4082
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Server Stats rendered "1 games" for a single-game platform, and the row
meta line leaned on the faint foreground tier: the middot separator, the
size percentage and the region expand toggle all sat at the edge of
readability.
- Pass the count as vue-i18n's plural choice and give every locale the
plural forms its `collection.games-count` sibling already uses.
- Draw the separator as a 4px dot in the muted tier instead of a thin
middot glyph, and move the size percentage off the faint tier.
- Outline the region expand/collapse control so it reads as a button,
and label it for screen readers.
- Spell out the coverage tooltip as "IGDB matches: 159 / 227".
Fixes#4057
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`hasheous_metadata` gains keys as RomM maps more of Hasheous' signature
sources, so rows written before `mame_redump_match` existed don't carry it.
On PostgreSQL `hasheous_metadata->>'mame_redump_match'` is then NULL, the OR
chain over the match flags evaluates to NULL instead of false, and `NOT (...)`
stays NULL: the unverified filter returned nothing for those rows until they
were rescanned.
Each extraction is now coalesced to false. The JSON path is untouched, since
SQLAlchemy compiles `as_boolean()` to a CASE whose ELSE branch already folds a
missing key into false.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Opting out of the rom id index made the endpoint fall back to a COUNT
over the whole filtered set, so every scroll batch re-derived a total
the page already had from its bootstrap.
Add a with_total flag that skips that count, and have the v2 gallery's
window fetch pass it alongside the sidecar opt-outs it already sends.
total comes back null there, which the store's existing guard leaves
alone rather than applying over the size it knows.
Fixes#4053
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The match flags on `hasheous_metadata` are keyed off Hasheous'
`SignatureSourceType` names, and two never lined up with what its API
actually returns:
* `MAMERedump`, the source holding Redump's disc images in CHD form, was
mapped to nothing at all. A CHD identified by its disc-data SHA1 matched,
got its metadata, and still read as unverified because no flag was set.
* `puredos_match` looked for `PureDOS`; the source is named `PureDOSDAT`, so
the flag was pinned to False for every ROM.
CHD matches now set `mame_redump_match`, which the verified filter counts and
which the Metadata tab folds into the existing Redump chip (same database,
different distribution format). Existing rows pick the flag up on their next
rescan.
Hasheous also exposes Pleasuredome, TotalDOSCollection, eXo, ScreenScraper and
Generic sources that RomM still maps to nothing; those are left alone since
folding them in widens what "verified" means.
Fixes#4030
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two independent faults left the Media tab's Manual panel as an empty frame
on phones:
* vue3-pdf-app wires its toolbar controls by `id` on mount and abandons the
whole viewer when one is missing, so hiding the prev/next page buttons with
`v-if` at the xs breakpoint stopped any page from ever being laid out. The
buttons now always render and are hidden with CSS instead.
* RDropzone declares `inheritAttrs: false` without ever binding `$attrs`, so
the sizing class its consumers pass was dropped. On desktop the fixed-height
chain hid that; on mobile, where the details view scrolls as one document,
nothing gave the viewer a height and it collapsed to the toolbar.
The dropzone now forwards attrs, the manual viewer takes an explicit viewport
slice on mobile, and the soundtrack panel opts out of the zero-basis fill
there so it keeps sizing to its content.
Fixes#4046
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The widget nulled its pick on any error, so a transient failure on
reroll swapped a good pick for the "No games loaded yet" copy. Failures
now keep the current pick and surface an error snackbar, the card's
fallback text distinguishes a failure from an empty library, and a page
that comes back empty (the cached id index drifting from the database)
is retried once before it counts as one.
Both calls also opt out of the char index, filter values and rom id
index, which the endpoint returns by default and which span the whole
library: a reroll drops from ~463KB to ~15KB on a 75k-rom library.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Drop the "Open" button: the cover and title now link to the rom. The
freed space shows the platform and the release year / region so the
pick is identifiable when a library holds several variations of the
same title. Reroll moves to the card's top-right action slot and
shows a readable die face that changes on every roll.
Closes#4048
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The scan:scanning_platform payload carried the platform's total
firmware_count, so the scan view showed a firmware chip and expanded the
panel on every re-scan of an unchanged library. The panel body only lists
ROMs, leaving an empty card.
Emit the firmware count scoped to the running scan instead, and key the
auto-expand off the ROM list alone.
Fixes#4049
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The bug 0107 fixes was silent: the window grew two columns the index never
followed, and nothing failed. Pin the shape the migrations build, and assert the
window reads only columns that index covers, so the next metadata provider added
to the COALESCE chain fails here instead of quietly restoring the full scan.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`idx_roms_sibling_cover` (0090) was built for the sibling_roms self-join, but
the group_by_meta_id dedup window in `filter_roms` reads the same shape plus
two columns the index does not carry: `flashpoint_id`, the tail of the
partition's COALESCE chain, and `fs_name_no_ext`, the tiebreaker each partition
sorts by. A covering index has to carry every referenced column, so those two
omissions dropped the window to a full scan of the wide roms row -- JSON
metadata blobs included -- and the gallery runs that window up to four times
per page load (page, count, char_index, rom_id_index).
Grouping is on by default, so this is the default path for every large library.
Measured on a 92.8k-rom MariaDB copy (963 MB roms table, 256 MB buffer pool)
with the queries the endpoint actually generates:
page of 72 5.43s -> 0.80s
count 5.55s -> 1.01s
rom_id_index 5.48s -> 1.10s
char_index 5.46s -> 1.06s
combined 21.93s -> 3.97s
EXPLAIN moves from `type=ALL, key=NULL` to `type=index, Using index`. Real
`fs_name_no_ext` values are far shorter than the column's varchar(450), so the
index grows 4 MB -> 7 MB and rebuilds in ~5s at that row count.
The wider index costs the sibling_roms join ~170ms -> ~209ms per 72-rom page.
Keeping the narrow index alongside a second dedup-only one recovers that, but
the two would share their first eight columns and the per-page totals came out
level (2.13s vs 2.12s), so a single index wins on write amplification and stops
the two consumers drifting apart again.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The hash search tests reached membership through
`get_smart_collection_roms`, which no longer exists now that a smart
collection is served as a composed query. Ask for the collection the way
the gallery does instead, so the criterion is still exercised end to end.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
v2 exposed the "Show regions" and "Show languages" settings but nothing
consumed them, so covers lost the region and language emblems that 4.x
showed. Add a CardFlags overlay to GameCard: up to three emoji per chip
with the full list in the hover title, fading out under the hover overlay
so it never collides with the action row.
Fixes#4027
The folder-mapping table lists FS_PLATFORMS from the heartbeat snapshot
taken at app init, so a folder created after that only showed up after a
full page reload. Refetch the heartbeat when the section mounts.
Fixes#4035
Hashed asset names change on every deploy, so a tab left open across an
upgrade 404s on its next lazy import and goes blank until the user
reloads by hand. Listen for `vite:preloadError` and for router
dynamic-import failures, and reload once. A session-scoped timestamp
guards against a reload loop when an asset is genuinely missing.
Fixes#4034
The match dialog covers the gallery card it was opened from, hiding the
file name, which is the one piece of ground truth when re-matching a
mismatched game. Show it next to the dialog title, truncated to a single
line with the full name in the hover title.
Fixes#4038
Provider chips without a link (HowLongToBeat, Libretro, Flashpoint) were
styled with `pointer-events: none`, which also suppressed the native
`title` tooltip, leaving those icons unlabelled. Drop only the pointer
affordance and keep the chip hoverable.
Fixes#4040
Protected routes answered 403 both when there was no session and when the
authenticated user lacked the required scope. The frontend read every 403
as session expiry, cleared the session cookie and redirected to /login, so
a permission denial (for instance saving a state without the save scope)
tore down whatever the user was doing, including a running emulator.
`protected_route` now uses its own scope guard that raises 401 with a
`WWW-Authenticate` header when the caller is unauthenticated, and 403 when
the caller is authenticated but under-scoped. The axios interceptor only
redirects on 401 and lets 403s surface inline to the caller, refreshing the
CSRF cookie when the backend rejected the CSRF token.
Endpoint assertions for unauthenticated requests move from 403 to 401;
authenticated under-scoped cases stay 403.
Fixes#4045
Synology NAS shares carry a `#recycle` folder at the root of every share,
which RomM picked up as a platform directory. Add it to
DEFAULT_EXCLUDED_DIRS, and make the exclusion list match glob patterns so
the long-standing `.Trash-*` entry actually excludes anything.
Exclusions are now applied before the directories are stat'ed, and a
directory that raises OSError during Structure B detection is skipped with
a warning instead of propagating. An unreadable folder used to bubble a
500 out of `/api/heartbeat`, which the frontend retried in a loop during
first-time setup.
Fixes#4043