Commit Graph

10608 Commits

Author SHA1 Message Date
Georges-Antoine Assi
6a9236aada fix(v2): link IGDB provider to game page by slug
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
2026-07-16 18:40:44 -04:00
Georges-Antoine Assi
cb7a67a1e6 Merge pull request #3766 from rommapp/posthog-code/v2-reduced-effects
feat(v2): add reduced-effects mode for low-power devices
2026-07-16 13:13:10 -04:00
Georges-Antoine Assi
66b2e40be0 fix(v2): clean nav + backdrop in reduced-motion mode
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
2026-07-16 11:39:55 -04:00
Georges-Antoine Assi
d248df8623 refactor(v2): merge reduced-effects into useReducedMotion
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
2026-07-16 11:25:27 -04:00
Georges-Antoine Assi
f109f42512 refactor(v2): single useReducedMotion hook
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
2026-07-16 11:14:17 -04:00
Georges-Antoine Assi
3f25a5cac9 Apply suggestion from @greptile-apps[bot]
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-07-16 11:05:26 -04:00
Georges-Antoine Assi
80a985f36a Merge pull request #3767 from rommapp/posthog-code/fix-migration-idempotency
fix(migrations): make DDL idempotent on partial-failure reruns
2026-07-16 11:02:46 -04:00
Georges-Antoine Assi
44851166a2 fix(migrations): revert 0014 idempotency guard
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
2026-07-16 09:53:27 -04:00
Georges-Antoine Assi
21303d696c feat(v2): reduced-effects also reduces motion
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
2026-07-16 09:48:23 -04:00
Georges-Antoine Assi
8ce8449081 fix(migrations): make DDL idempotent on partial-failure reruns
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
2026-07-16 09:43:48 -04:00
Georges-Antoine Assi
b7bf0dda05 feat(v2): default reduced-effects to system reduce-motion
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
2026-07-16 09:19:28 -04:00
Georges-Antoine Assi
ce59e5d9ed feat(v2): add reduced-effects mode for low-power devices
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
2026-07-16 08:50:38 -04:00
Georges-Antoine Assi
030952b921 Merge pull request #3763 from rommapp/posthog-code/fix-safari-match-rom-sliver
fix(v2): render match-rom covers at full width in Safari
2026-07-16 08:09:47 -04:00
Georges-Antoine Assi
44ef5cf515 fix(v2): render match-rom covers at full width in Safari
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
2026-07-16 07:58:17 -04:00
Georges-Antoine Assi
c87b6b7088 flex grow dropzone 2026-07-16 07:57:32 -04:00
Georges-Antoine Assi
92e4074ea4 Merge pull request #3759 from kthistlewood/fix/virtual-collections-collation-mariadb-11.6
fix(db): pin explicit collation in virtual_collections view for MariaDB 11.6+
2026-07-16 07:49:39 -04:00
Georges-Antoine Assi
5f6bda9b1e Merge pull request #3757 from rommapp/posthog-code/i18n-sorted-linter
chore(i18n): add linter enforcing alphabetically sorted locale files
2026-07-16 07:41:09 -04:00
Georges-Antoine Assi
373a03aef2 Merge branch 'master' into posthog-code/i18n-sorted-linter 2026-07-16 07:30:54 -04:00
Kyle Thistlewood
6011334478 fix(db): pin explicit collation in virtual_collections view for MariaDB 11.6+
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>
2026-07-16 05:19:14 +00:00
Georges-Antoine Assi
27692ae212 chore(i18n): add linter enforcing alphabetically sorted locale files
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
2026-07-15 22:07:35 -04:00
Georges-Antoine Assi
96abd8b87c Merge pull request #3756 from DevYukine/fix/playmatch-heartbeat
fix(playmatch): handle empty heartbeat query
2026-07-15 21:44:15 -04:00
Georges-Antoine Assi
9c46bfde9c Merge pull request #3731 from rommapp/posthog-code/optimize-cleanup-frequency-and-logging
Reduce RQ worker registry sweep verbosity and frequency
2026-07-15 21:00:16 -04:00
Georges-Antoine Assi
23d724f447 fix(backend): keep default RQ maintenance interval for prompt scan recovery
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
2026-07-15 20:02:49 -04:00
Yukine
e418dd4ba9 fix(playmatch): handle empty heartbeat query 2026-07-16 01:36:39 +02:00
Georges-Antoine Assi
5608eb8679 Merge pull request #3753 from rommapp/copilot/bug-fix-cannot-delete-file
feat: add file deletion to the Files tab on the game details page
2026-07-15 19:26:48 -04:00
Georges-Antoine Assi
9aac4c7193 Update backend/endpoints/roms/files.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-07-15 19:21:59 -04:00
Georges-Antoine Assi
b3d8d6f43c fix typo 2026-07-15 19:20:05 -04:00
Georges-Antoine Assi
18f46a44f9 run fmt 2026-07-15 19:10:57 -04:00
Georges-Antoine Assi
b4bc84ff0a Merge pull request #3754 from TowyTowy/fix/reg-prefix-region-shortcode
fix(scan): resolve "Reg-" prefixed region shortcodes to full names
2026-07-15 19:04:34 -04:00
Georges-Antoine Assi
1c7d633254 Merge pull request #3755 from rommapp/posthog-code/add-agent-repository-guide
docs: add agent repository instructions
2026-07-15 16:31:48 -04:00
Georges-Antoine Assi
43a0017926 fix: make agent guide portable across checkouts
Generated-By: PostHog Code
Task-Id: bcf86d4d-de3a-43ff-800c-c3e922acdc14
2026-07-15 16:15:23 -04:00
Georges-Antoine Assi
e8d6ec46f7 docs: add agent repository guide alias
Generated-By: PostHog Code
Task-Id: bcf86d4d-de3a-43ff-800c-c3e922acdc14
2026-07-15 16:05:21 -04:00
TowyTowy
8c54a884a9 fix(scan): resolve "Reg-" prefixed region shortcodes to full names
PR #3035 made region/language shortcode lookups case-sensitive by keying
REGIONS_BY_SHORTCODE on the uppercase codes, and updated the plain tag
lookups to match against the raw (unlowered) tag. The "Reg-" prefix branch
was missed: it still lowercased the captured shortcode before looking it up,
so it could never hit the now-uppercase-keyed dict. As a result a tag like
"[Reg-J]" was stored as the raw "J" instead of resolving to "Japan".

Match the shortcode with its original case, like the other lookups, so
"[Reg-J]" resolves to "Japan" and "[Reg-U]" to "USA". Non-shortcode values
(e.g. "[Reg-PAL]") are still kept verbatim via the fallback.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-15 20:22:16 +02:00
copilot-swe-agent[bot]
caf8e1318d fix: fix prettier formatting in FilesTab.vue (break long router.push line)
Co-authored-by: zurdi15 <34356590+zurdi15@users.noreply.github.com>
2026-07-15 14:44:48 +00:00
copilot-swe-agent[bot]
0f8a9b67b4 feat: add file deletion to FilesTab with backend endpoint and permission guard
- Add DELETE /roms/{rom_id}/files/{file_id} endpoint to files.py
- Add deleteRomFile API function to frontend ROM service
- Add delete button (guarded by rom.delete permission) to FilesTab selection toolbar
- Show confirmation dialog before deleting; redirect to gallery when all files are removed
- Add i18n keys for delete confirmation and feedback to all 18 locale files
- Add backend tests for the new delete endpoint (success, wrong-rom 404, unknown-file 404, missing-disk-file tolerance, viewer 403)

Closes #3752

Co-authored-by: zurdi15 <34356590+zurdi15@users.noreply.github.com>
2026-07-15 13:31:44 +00:00
copilot-swe-agent[bot]
553b38b21d Initial plan 2026-07-15 13:19:42 +00:00
Georges-Antoine Assi
b85ecc5aee Merge pull request #3751 from TowyTowy/fix/version-tag-dot-separator
fix(scan): strip leading dot from dot-separated version tags
5.0.0
2026-07-15 08:24:00 -04:00
TowyTowy
aba4d0cda1 fix(scan): strip leading dot from dot-separated version tags
VERSION_TAG_REGEX only treated whitespace, underscore, and hyphen as
separators after the version prefix, so a dot-separated tag like
"(v.1.0)" or "(Ver. 1.00)" fell through to the no-separator branch and
captured the dot into the version (".1.0", ". 1.00"). This wrong value
was then persisted to Rom.version on scan and on rename.

Add "." to the separator character class so the dot is consumed like the
other separators. Digit-prefixed tags such as "(v1.0)" are unaffected
(they still match the no-separator branch), and non-version "v*" tags are
still ignored.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-15 11:31:52 +02:00
Georges-Antoine Assi
759ebb04d8 Merge pull request #3748 from rommapp/gantoine-patch-1
Remove RommBrowser from README
2026-07-14 20:32:46 -04:00
Georges-Antoine Assi
7d952a3291 Merge pull request #3747 from rommapp/posthog-code/fix-upload-platform-selection
fix: resolve upload platform selection collisions
2026-07-14 18:55:33 -04:00
Georges-Antoine Assi
5d741766a1 Remove RommBrowser from README
Removed RommBrowser entry from the Desktop section of the README.
2026-07-14 18:52:45 -04:00
Georges-Antoine Assi
4c5915d4de fix: use unique platform keys for uploads
Generated-By: PostHog Code
Task-Id: fcbd5fb2-f07c-4741-8cce-e53650f808d0
2026-07-14 17:07:18 -04:00
Georges-Antoine Assi
76bb94878f Merge pull request #3745 from rommapp/posthog-code/live-scan-platform-games
fix: remove deleted games from gallery store
5.0.0-beta.5
2026-07-14 10:15:11 -04:00
Georges-Antoine Assi
c43cd261c9 fix: refresh gallery metadata after deletions
Generated-By: PostHog Code
Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f
2026-07-14 10:04:01 -04:00
Georges-Antoine Assi
e20f842a1a fix: refresh gallery after scanned ROMs
Generated-By: PostHog Code
Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f
2026-07-14 09:49:14 -04:00
Georges-Antoine Assi
ea6f3fba8f perf: avoid array allocation in live ROM lookup
Generated-By: PostHog Code
Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f
2026-07-14 09:43:07 -04:00
Georges-Antoine Assi
807ae86bcf fix: skip live gallery inserts for filtered views
Generated-By: PostHog Code
Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f
2026-07-14 09:41:19 -04:00
Georges-Antoine Assi
d0e5efc85b revert: stop updating gallery store in legacy dialog
Generated-By: PostHog Code
Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f
2026-07-14 09:39:39 -04:00
Georges-Antoine Assi
4f12eeb7d4 fix: remove deleted games from gallery store
Generated-By: PostHog Code
Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f
2026-07-14 09:36:19 -04:00
zurdi
7f94fdbfb6 Add official apps section to README 2026-07-14 07:19:12 +00:00