Once the bootstrap or window 0 has populated the filter panel, alpha
strip, and id index, later window fetches only need their paged items.
Send with_char_index=false and with_filter_values=false so the backend
doesn't recompute those aggregations for every window.
Generated-By: PostHog Code
Task-Id: daf23950-b84a-4537-971c-3f85425c172c
Add a URL builder for the Hasheous provider so its card in the
GameDetails provider grid links out to the corresponding game page
instead of rendering unlinked.
Generated-By: PostHog Code
Task-Id: 522c9198-de9b-4973-9057-ce4c0a33dcc9
The IGDB provider link built a text-search URL from the numeric ID,
which returns no results. Point it at the canonical /games/<slug> page
when the slug is present, falling back to the ID search otherwise. The
URL builder now receives the DetailedRom so it can reach fields beyond
the provider ID.
Generated-By: PostHog Code
Task-Id: 6843b623-ed80-454f-8373-8192f3c629b4
ScreenScraper occasionally returns malformed JSON with raw, unescaped
backslashes in text fields (e.g. synopses), which the strict parser
rejects with "Invalid \escape". The whole response was then discarded as
{}, so ScreenScraper found no match even for trivially-matchable titles
while other providers matched fine.
Parse leniently: on a decode error, double any backslash that isn't a
valid JSON escape and retry, instead of dropping the entire response.
Fixes#3764
Generated-By: PostHog Code
Task-Id: bbb1e2a8-bcb0-45a3-840e-86ce39f906a9
The home rails ("recently added" / "continue playing") request 15 cards
but the endpoint always computed rom_id_index, the complete ordered list
of every matching rom id that backs gallery virtual scroll. On large
libraries this ran a full-table scan and shipped hundreds of KB of ids
to render 15 cards.
Add a with_rom_id_index query param (defaults to true, mirroring the
existing with_char_index / with_filter_values flags). When false, skip
building the index and serve the page directly via offset/limit off the
sort index, with a lightweight count for total. The home rail fetches
pass false.
Fixes#3770
Generated-By: PostHog Code
Task-Id: 45dbad45-bd7c-4cf3-8e8f-105f174f4386
The v2 gallery per-card endpoint reused get_rom, which runs the full
detail eager-load (saves, states, screenshots, collections) that
SimpleRomSchema never serializes, making cards slow to hydrate.
Add get_rom_simple backed by a with_simple_details decorator that loads
only what SimpleRomSchema needs: platform, metadatum, rom_users, files,
sibling_roms (+ their rom_users), notes, and the deferred file-count
columns.
Fixes#3771
Generated-By: PostHog Code
Task-Id: 9233f519-079f-4990-8b48-9d12c81440b4
GET /api/platforms and GET /api/stats both sum roms.fs_size_bytes but the
column was not in any index, forcing full reads of the wide, JSON-heavy roms
table (5-11s on large libraries). A composite index on
(platform_id, fs_size_bytes) turns both sums into index-only scans.
Fixes#3769
Generated-By: PostHog Code
Task-Id: e24ff248-6329-4b70-a826-9a9fee21411e
Reduced-motion drops the 28px backdrop blur, which exposed two rough
edges the blur had been hiding:
- The fallback backdrop art (auth_background.svg) is authored to be seen
only through the blur; unblurred it shows a hard seam ("weird bar") and
a bright diagonal wedge. Drop the whole fixed art + overlay stack in
this mode and let the solid page background show through — cheaper on
weak GPUs and no seam.
- The top nav bar's only surface is a backdrop-filter glass. Against the
now-solid background that reads as murky, and the blur is expensive on
weak GPUs. Swap it for a flat opaque surface so the fixed bar stays a
clean solid strip as content scrolls under it.
Generated-By: PostHog Code
Task-Id: 6690877a-9c32-4c91-a78b-3d6fd3851fb7
Two hooks modelled overlapping concerns and useReducedEffects imported
useReducedMotion for its default, coupling them. Collapse to a single
useReducedMotion that owns the whole "reduce motion / effects" axis:
enabled = override ?? OS prefers-reduced-motion (+ toggle())
It drives the one r-v2-reduced-motion root class (background blur, cover
blur-up, the global animation/transition neutralize) and the JS motion
gates (cover CD-spin, view-transition morphs, RExpandTransition, RBox3D).
One hook, one Settings toggle, one source of truth.
- Delete useReducedEffects; move its override tests onto useReducedMotion.
- Rename the class r-v2-reduced-effects -> r-v2-reduced-motion and the
localStorage key to settings.v2.reducedMotion.
- Rename the i18n keys reduced-effects(-desc) -> reduced-motion(-desc)
across all locales; title is now "Reduced motion" (the description
already covered both blur and animation).
Generated-By: PostHog Code
Task-Id: 6690877a-9c32-4c91-a78b-3d6fd3851fb7
Four files hand-rolled their own window.matchMedia("(prefers-reduced-
motion: reduce)") check (useCoverAnimation, useViewTransition,
RExpandTransition, RBox3D) and useReducedEffects held a fifth via
useMediaQuery. Consolidate into one useReducedMotion composable, a
module-level singleton returning a reactive Ref<boolean> (same pattern as
useBreakpoint; wraps what vueuse's usePreferredReducedMotion exposes but
as the plain boolean every call site wants).
Side benefit: the two composable call sites that read the old function
inside a computed are now reactive, so cover motion and the 3D-box idle
drift stop/resume live when the OS setting changes, no remount. It stays
generic (no store/service/domain), so the two primitives may use it
within the tier boundary.
Generated-By: PostHog Code
Task-Id: 6690877a-9c32-4c91-a78b-3d6fd3851fb7
The guard was both unreachable and unsafe. For platforms.id to exist on
a rerun, the first attempt must have already run the atomic ADD COLUMN
id ... PRIMARY KEY, which means it passed the unguarded
drop_constraint("fk_platform_roms") at the top of upgrade(). That FK
drop has no IF EXISTS, so any rerun fails there before reaching the
guard. And if it were reachable, the preceding primary-key drop would
leave id unkeyed once the ADD COLUMN was skipped.
Keep the genuinely correct fixes (0084, 0033); leave 0014 as-is.
Generated-By: PostHog Code
Task-Id: 87d70ab6-f915-48c0-afa7-55064c97d1a5
reduced-effects only dropped blur, leaving every animation running. The
OS prefers-reduced-motion query is honored per-component, but a CSS class
can't trigger those media blocks and the toggle must work even when the
OS setting is off, so a user enabling low-power mode on a TV box kept the
CRT flicker, disc spins, skeleton shimmer, spinners and scan pulses that
tax a weak GPU.
Make reduced-effects a superset of reduced motion:
- global.css neutralizes animation/transition under html.r-v2-reduced-effects
(near-zero durations so transitionend/animationend still fire; !important
overrides inline JS-set transitions such as RExpandTransition).
- Wire the JS-driven motion gates that CSS can't reach to the mode:
useCoverAnimation (the per-card CD-spin rAF loop) and useViewTransition
(shared-element morphs). Both keep the independent OS prefers-reduced-
motion check so an explicit "off" never re-enables motion for a user
whose system asks to reduce it.
Lib primitives (RExpandTransition, RBox3D) are covered by the global CSS
rule rather than importing app state, per the primitive tier boundary;
RBox3D's JS auto-spin stays OS-gated. Description updated across locales.
Generated-By: PostHog Code
Task-Id: 6690877a-9c32-4c91-a78b-3d6fd3851fb7
Migration 0084 could fail on startup with "Duplicate key name
'idx_roms_name_fs_name_fulltext'" when a prior run created the FULLTEXT
index but failed at a later step before Alembic recorded the revision.
On rerun, CREATE FULLTEXT INDEX (which has no portable IF NOT EXISTS on
MySQL/MariaDB) crashed re-creating the existing index.
Guard the raw DDL so re-running a partially-applied migration is safe:
- 0084: check existing indexes before creating/dropping the FULLTEXT index
- 0014: check existing columns before the raw ALTER TABLE ADD COLUMN id
- 0033: use checkfirst=True on the Postgres enum create/drop
Generated-By: PostHog Code
Task-Id: 87d70ab6-f915-48c0-afa7-55064c97d1a5
Reduced-effects mode now defaults to the OS `prefers-reduced-motion`
setting instead of always starting off: someone who asks their system to
reduce motion generally wants fewer heavy effects too, so the mode turns
on for them with no per-app opt-in. The Settings toggle still records an
explicit choice that overrides the system default from then on.
The stored value becomes tri-state: null (no explicit choice, follow the
system) or true/false (user override), with an explicit serializer since
vueuse's null-default path would otherwise read booleans back as strings.
Add unit tests covering the system default, override precedence, and
persistence.
Generated-By: PostHog Code
Task-Id: 6690877a-9c32-4c91-a78b-3d6fd3851fb7
Switching from per-card to per-window fetching dropped the departure
cancellation the per-card path had: scrolling through a large library
started a request per 72-item window encountered and left every departed
window downloading and applying in the background, the wasted network /
backend / render work this change set out to avoid on low-power devices.
Add store.syncVisibleWindows(positions): it starts the windows covering
the visible positions (deduped in fetchWindowAt) and aborts any in-flight
or retry-pending window that no longer covers one. The shell's debounced
viewport sync now delegates to it. Also abort in-flight windows when the
gallery unmounts (onBeforeRouteLeave doesn't reset the store), keeping
the loaded cache so returning is still instant. Drops the shell's dead
visiblePositions bookkeeping.
Generated-By: PostHog Code
Task-Id: 6690877a-9c32-4c91-a78b-3d6fd3851fb7
syncFetches only runs on viewport changes, so a window whose fetch
failed once would leave up to WINDOW_SIZE (72) visible cards stranded as
skeletons on a static viewport until the user scrolled or the gallery
context changed. Since only visible windows are ever fetched, a failed
window was always visible when it failed.
fetchWindowAt now schedules a bounded, backing-off refetch (up to 3
attempts, 2s/4s/6s) on failure so a transient blip self-heals. Retry
timers and attempt counts are cleared on success and aborted alongside
in-flight requests on any gallery-context switch, so we never retry
against a stale context.
Generated-By: PostHog Code
Task-Id: 6690877a-9c32-4c91-a78b-3d6fd3851fb7
The v2 UI leans on two GPU-heavy decorative effects that are cheap on a
desktop GPU but punishing on weak hardware (TV boxes, older phones):
- a full-viewport filter: blur(28px) background-art layer (always on),
which the code's own Firefox note already flags as pegging weak
rendering backends; and
- a per-cover filter: blur(16px) blur-up reveal, run on ~100 covers at
once when a full grid paints.
Add a per-device "Reduced effects" toggle (Settings > User interface,
under Theme) backed by a localStorage flag, mirroring useCrtMode. When
on, AppLayout sets `r-v2-reduced-effects` on <html> and the global /
GameCover CSS drops the blur filters (keeping tone and the opacity
fade), so low-power devices composite sharp, unblurred visuals.
Per-device rather than backend-synced on purpose: whether effects are
too heavy depends on the machine RomM is viewed on, not the account.
Generated-By: PostHog Code
Task-Id: 6690877a-9c32-4c91-a78b-3d6fd3851fb7
The v2 gallery hydrated each visible card with its own
GET /roms/{id}/simple request (one HTTP round trip and one DB lookup
per card). On a full grid that meant ~100 simultaneous requests, which
the browser's per-host connection cap serialized into slow waves,
taking 1-2 minutes to fill the grid on low-power devices. v1 loaded the
same library in 1-2 paginated requests.
Route both grid (GalleryShell viewport sync) and list (GameListRow
mount) hydration through the store's existing fetchWindowAt, which
aligns each visible position to its shared 72-item window and dedupes
against pending/loaded windows. A full viewport now resolves in a
handful of paginated requests instead of one per card. Drops the
now-unused per-card fetchRomAt/cancelFetchAt store actions.
Generated-By: PostHog Code
Task-Id: 6690877a-9c32-4c91-a78b-3d6fd3851fb7
The manual "Match ROM" dialog wrapped each GameCard in a block-level
cell, so the card's aspect-ratio-derived width resolved against a
shrink-to-fit containing block. WebKit collapses that circular case to a
near-zero width, rendering covers as thin slivers (Chromium is fine).
Lay the cell out as a flex container so the card sizes via flex intrinsic
sizing, the same path the gallery row already uses.
Fixes#3761
Generated-By: PostHog Code
Task-Id: 85199a96-11de-4403-a30e-e533cf9a8e48
On MariaDB 11.6+ the default character_set_collations maps utf8mb4
expressions to uca1400_ai_ci, which clashes with the view's general_ci
string literals and JSON_TABLE columns: every /api/collections/virtual
request fails with 'Illegal mix of collations ... for operation ='.
Recreate the view (new migration, 0095 pattern) with an explicit
COLLATE utf8mb4_general_ci on each string output column so comparisons
resolve deterministically regardless of server collation defaults.
PostgreSQL is unaffected (no-op).
Fixes#3758
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add check_i18n_sorted.py, which fails when any locale JSON file's keys
are not sorted alphabetically (recursively, so nested objects are
covered). Supports --fix to sort in place. Wire it into the i18n CI
workflow alongside the existing parity check, and sort all existing
locale files.
Generated-By: PostHog Code
Task-Id: 7cbf74de-6bf1-45c0-9c8e-c45f94119edc
The registry-cleanup log noise is already suppressed by the RomMWorker log
filter, so the hourly maintenance interval was unnecessary and delayed pruning
of orphaned STARTED jobs and stale workers. The watcher's Worker.all() scan
dedupe relies on that pruning, so restore the default (~10 min) cadence.
Generated-By: PostHog Code
Task-Id: 78c8b2f8-2b03-443f-aa4c-8867c1259f2a