Commit Graph

10400 Commits

Author SHA1 Message Date
Georges-Antoine Assi
281f79c8e0 Merge branch 'master' into fix/collection-bulk-download 2026-07-04 12:42:31 -04:00
Georges-Antoine Assi
c46a864edf Merge pull request #3672 from rommapp/dependabot/uv/joserfc-1.6.8
chore(deps): bump joserfc from 1.6.7 to 1.6.8
2026-07-04 12:31:29 -04:00
Georges-Antoine Assi
10f04900ff Merge pull request #3670 from rommapp/posthog-code/squash-legacy-migrations
Posthog code/squash legacy migrations
2026-07-04 12:26:11 -04:00
dependabot[bot]
6f834ae29b chore(deps): bump joserfc from 1.6.7 to 1.6.8
Bumps [joserfc](https://github.com/authlib/joserfc) from 1.6.7 to 1.6.8.
- [Release notes](https://github.com/authlib/joserfc/releases)
- [Changelog](https://github.com/authlib/joserfc/blob/main/docs/changelog.rst)
- [Commits](https://github.com/authlib/joserfc/compare/1.6.7...1.6.8)

---
updated-dependencies:
- dependency-name: joserfc
  dependency-version: 1.6.8
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-04 16:19:40 +00:00
Georges-Antoine Assi
c49e144311 Merge pull request #3640 from tmgast/feature/soundtrack-metadata-columns
Add a music query API for soundtracks
2026-07-04 12:18:32 -04:00
Georges-Antoine Assi
5e0317df71 Merge pull request #3664 from rommapp/feat/v2-responsive-mobile
feat(v2): responsive/mobile pass over the v2 UI
2026-07-04 12:17:42 -04:00
Georges-Antoine Assi
b22792f029 Merge pull request #3657 from Spinnich/fix/rvz-retroachievements-hashing
fix(retroachievements): hash GameCube and Wii RVZ/WIA images natively
2026-07-04 12:17:20 -04:00
Georges-Antoine Assi
0f12b78c7f fix doxstring 2026-07-04 12:16:25 -04:00
Spinnich
2159404727 refactor(retroachievements): bound RVZ group cache by bytes
The decoded-group cache is now capped by a byte budget instead of an
entry count, so a crafted chunk_size can't pin gigabytes of decoded
groups in memory. The budget still fits the chunks covering one Wii
hash group, keeping the data and exception passes cached.

Also use the existing _MAX_EXCEPTIONS_PER_LIST and
_WII_SECTORS_PER_HASH_GROUP constants in the exception-list parser and
drop a redundant slice in the bad-magic error message.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 12:34:43 +00:00
Georges-Antoine Assi
bb796f5afe rename migration file 2026-07-04 08:32:19 -04:00
Georges-Antoine Assi
f24e140e53 Squash pre-2024 migrations into single file 2026-07-04 08:31:04 -04:00
Georges-Antoine Assi
591c88c389 Merge pull request #3669 from mvanhorn/fix/3496-fresh-install-migration-loop
fix: make 1.8 migration re-entrant so fresh installs stop crash-looping on MariaDB
2026-07-04 08:10:45 -04:00
Georges-Antoine Assi
e33584420b run check 2026-07-04 07:59:34 -04:00
Georges-Antoine Assi
24730b8b52 run fmt 2026-07-04 07:51:48 -04:00
Spinnich
a64e83feb3 fix(retroachievements): fix indentation in native-hash dispatch
The review suggestion collapsing the dispatch into a conditional
expression landed with a mis-indented line, which broke module parsing.
Keep the conditional-expression form, formatted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 11:45:40 +00:00
Matt Van Horn
22d24fa1ed fix: make 1.8_ migration re-entrant so fresh installs don't loop 2026-07-03 23:21:06 -07:00
zurdi
23a6088833 fix(v2): horizontal scroll for the gallery list view on narrow viewports
The list columns are far wider than a phone, so they were clipped with no
way to reach them. Make the list scroll sideways when it's wider than the
viewport:

- RVirtualScroller: add `minContentWidth` — sets the inner's `min-width`
  and switches the container to `overflow-x: auto`.
- listColumns: give the title a `minmax(200px, 1.6fr)` floor and derive the
  row's natural width (tracks + gaps + padding) via `getListMinWidth`, fed
  to the scroller as `minContentWidth` in list mode.
- GalleryShell: only the table scrolls sideways — the view header, divider
  and toolbar are pinned (`position: sticky; left: 0`) so they stay in
  place; the in-flow sticky column header keeps its width and tracks the
  horizontal scroll in step with the rows.

Note: the list column header now shows the rows through it when stuck (the
old section-level overlay twin can't track horizontal scroll, so it was
dropped). Frosting it cleanly is a known follow-up — cover thumbnails ride
their own GPU layer, so `backdrop-filter` can't blur them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 21:13:13 +00:00
Georges-Antoine Assi
14f8b024e4 Merge pull request #3658 from rommapp/copilot/bug-fix-non-version-filename-tags
Refine filename version-tag parsing to avoid swallowing generic `v*` tags
2026-07-03 08:44:18 -04:00
zurdi
96e405883d fix(v2): reveal patcher "supported formats" via a tap-capable tooltip
Revert the previous RMenu approach: the info affordance stays a tooltip,
but RTooltip gains an opt-in `openOnTap` so it reveals on hover (mouse)
AND on tap (touch). A finger tap toggles it; a mouse click OPENS it (so
clicking a pill you're hovering doesn't close it and strand you unable to
re-reveal it); an outside tap / pointer-leave / blur closes it. Default
behaviour is unchanged (regular tooltips still never appear on touch).
Covered by a new `open-on-tap` play() story.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 12:22:45 +00:00
Spinnich
03817dce94 Update backend/adapters/services/rahasher.py
Co-authored-by: Georges-Antoine Assi <3247106+gantoine@users.noreply.github.com>
2026-07-03 08:13:38 -04:00
zurdi
1019954487 fix(v2): patcher tab — tappable formats popover + grouped file boxes
- The "supported formats" affordance was a hover tooltip, so it never
  opened on touch. Swap it for a click/tap popover (RMenu, sheet on
  mobile) that works with mouse, keyboard and touch alike.
- Wrap the ROM + patch panels in a muted, translucent frame so they
  read as one combined operation, and reduce the "+" connector to a
  plain muted glyph (no surface/border) so it no longer looks like an
  action button between them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 12:10:19 +00:00
Georges-Antoine Assi
5d4316cf52 stirp version tags 2026-07-03 08:04:08 -04:00
zurdi
7b272bc756 fix(v2): dock the gallery toolbar overflow menu as a bottom sheet on mobile
The mobile-only sort / layout / filter menu opened as a floating dropdown
while every other mobile menu is a bottom sheet. Add `sheet-on-mobile`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:59:52 +00:00
zurdi
6b4d38a8d5 fix(v2): single-scroll Logs / fill-settings + bottom-nav clearance on mobile
- Logs: wrap the overflowing control row into two on phones (level +
  module selectors on one row; search + action buttons on the next).
- SettingsLayout `fill`: the base `min-height: calc(100vh - nav)` was
  inflating the section past the viewport (forcing a document scroll);
  pin it to `min-height: 0` + a `dvh` height that reserves the bottom
  tab bar, and trim the fill content's bottom gutter so the panel stops
  just above the bar (no double scroll, no content behind the bar).
- Platform/Collection settings tabs: same `dvh` + negative-margin +
  bottom spacer pattern so the danger zone clears the bottom nav.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:57:02 +00:00
zurdi
45f55bf633 fix(v2): gallery header/nav mobile polish + dimension tokens
- RTabNav: the horizontal tab strip no longer swallows vertical swipes
  (`overflow-y: hidden` so it's not a vertical scroll container; drop
  `touch-action: pan-x`, which froze the page) — the view scrolls even
  when the swipe starts on the tabs.
- AppNav: remove the "back to v1" escape-hatch button (and its now-dead
  code / imports / styles); the v1 UI keeps its own switch.
- GalleryShell/AlphaStrip: the stuck toolbar overlay now insets by the
  strip's real footprint via shared tokens, so it lines up exactly with
  the in-flow toolbar; wider, more tappable strip on phones, raised to
  centre in the visible band (above the bottom bar).
- CollectionHead / PlatformHead: bigger collection cover on phones
  (matches the index); the platform icon is a per-breakpoint square in a
  box that grows to it, so it reflows instead of overflowing/clipping.
- Add `--r-coll-cover-*` and `--r-alpha-strip-w*` dimension tokens.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:56:42 +00:00
Georges-Antoine Assi
d929b94fe2 run fmt 2026-07-03 07:56:23 -04:00
zurdi
4dfa13dc05 fix(v2): mobile fixes for Match/Edit ROM and API-token dialogs
- RDialog: add `fullHeightOnMobile` so a tall sheet fills below the top
  navbar and scrolls internally; use it for Match/Edit ROM.
- Match ROM: put the search field (2/3) and name/id selector (1/3) on
  one row on phones; move the results count to the footer so the
  toolbar no longer reflows on search; pin the selector width
  (min-width:0 on the grid children); let the list-mode artwork panel
  flow with the dialog scroll instead of a tiny fixed window; cap wide
  covers in grid mode so they don't overflow.
- Create API token: add `scroll-content` (body scrolled, no footer
  overlap) and stack the scope grid into one column on xs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:54:58 +00:00
zurdi
8ba55609e8 fix(v2): address self-review findings + add primitive test coverage
- Setup: restore an inline error state (with retry) when the library
  probe fails, instead of silently showing an empty platform step.
- Remove the unused `.r-v2-two-pane` utility (never adopted by a view).
- useBreakpoint / useInputModality: own the singleton scope/listeners
  and drop them on HMR (import.meta.hot.dispose) instead of leaking.
- RSelect: extract the search-autofocus decision to a pure helper and
  cover it with a Vitest spec (the Android-keyboard-skip logic).
- RTooltip: add a play() story exercising the touch-gating (touch =
  no reveal, mouse = reveal, click = dismiss).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:53:50 +00:00
zurdi
9b771f853a removed unnecessary comments 2026-07-03 08:05:17 +00:00
zurdi
adfd691607 Merge remote-tracking branch 'origin/master' into feat/v2-responsive-mobile 2026-07-03 07:56:10 +00:00
Georges-Antoine Assi
2395caa615 Merge pull request #3660 from rommapp/copilot/fix-alpha2-ui-save-state-screenshots
Fix v2 save-state screenshot rendering for filenames with special characters
2026-07-02 16:25:59 -04:00
zurdi
b5a6b77355 feat(v2): responsive GameDetails on mobile + app-shell tweaks
- GameDetails: on mobile the whole view scrolls as one document instead
  of the desktop "fixed cover + inner panel scroll" (Files tab now
  scrolls too). Title/meta centred, cover a touch larger.
- Action ribbon: shrink to the default (40px) size on phones and split
  the completion/rating/difficulty metrics onto their own row with a
  hairline; the metric pills match the button height.
- More & Status pickers dock as mobile bottom sheets.
- AppNav: pin the logo link to its content (`justify-self: start`) so
  the empty bar space next to it stops acting as a hidden "go home"
  target.
- ScanningIndicator: swap the "Scanning" label for the radar glyph on xs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 17:51:24 +00:00
zurdi
b5ecc160e5 fix(v2): single mobile scroll for galleries/indexes + toolbar flicker
- Sections use `dvh` and, on sm-and-down, cancel the layout's bottom-nav
  padding with a matching negative margin so content scrolls behind the
  tab bar with one scroll (no document-level scroll on top of it), and
  the last row clears the bar.
- Fix the sticky gallery toolbar flip-flopping while scrolling: the
  stuck threshold read a `position: sticky` element's `offsetTop`, which
  reports the stuck position once pinned. Measure a non-sticky sentinel
  instead, and bind the toolbar ref with a stable function (not an inline
  arrow that Vue re-invokes every render).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 17:49:50 +00:00
zurdi
3421715359 fix(v2): touch/mobile fixes for overlay & form primitives
- RSelect: cap the dropdown panel at the viewport (no horizontal
  overflow on phones); autofocus the search only on precise-pointer
  devices so a tap doesn't pop the Android keyboard.
- RTooltip: reveal on mouse/pen hover and keyboard focus only (skip
  touch), and dismiss on click — so tapping a button that opens a
  menu/dialog doesn't leave the tooltip stuck open.
- RCarousel: constrain the fullscreen grid column so the image,
  thumbnails and counter clamp to the viewport; the thumb strip scrolls
  sideways when it overflows.
- RDialog: cap the mobile bottom-sheet below the top navbar so a tall
  sheet (Match / Edit ROM) never rides up over it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 17:49:46 +00:00
zurdi
a4a44577c4 fix(v2): make Settings tables usable on mobile
- RTable: a fixed `rowHeight` no longer crushes the xs card-stack.
- Users / Permission Groups: card-stack Name caption aligns with the
  other rows; group description wraps multi-line at a smaller size.
- Folder Mappings: card-stack alignment + selectors group with their
  chevron and truncate long platform names instead of overflowing.
- Excluded: the Add dialog scrolls (footer no longer overlaps the cards).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 17:49:05 +00:00
zurdi
16ab6e7ed9 fix(v2): skip view transition on query-only nav; slow reachability poll
- router: a `?tab=` change (same path) no longer runs a view transition,
  which was snapshotting the GameDetails cover's `view-transition-name`
  into the top layer over the fixed navbar.
- useServerConnection: raise the online `/heartbeat` poll from 10s to
  5min so a network blip stops aggressively flagging the backend offline;
  passive interceptor events still flip offline instantly, and the offline
  poll stays fast for quick recovery.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 17:49:02 +00:00
zurdi
ccb3f22320 fix(roms): eager-load sibling platform_id to fix DetachedInstanceError
The `with_details` loader fetched sibling roms with a `load_only` that
omitted `platform_id`, so `_visible_siblings`' per-sibling visibility
check read a deferred attribute on a session-detached instance and 500'd
on `/roms/{id}/simple` (intermittently, per identity-map state). Add
`platform_id` to the sibling `load_only` so it's present when the schema
serializes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 17:48:12 +00:00
copilot-swe-agent[bot]
79aebd6d5e Fix v2 state screenshot CSS URLs
Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-07-02 17:27:41 +00:00
copilot-swe-agent[bot]
4230fe1f8e Initial plan 2026-07-02 17:20:43 +00:00
Spinnich
9f58919612 fix(collections): download whole collections as one zip (#3641, #3659)
- Extend GET /api/roms/download to accept collection_id,
  virtual_collection_id or smart_collection_id as an alternative to
  rom_ids, with owner/public access checks and the zip named after
  the collection
- v2 SelectionBar: bundle multi-selections into a single server-side
  zip instead of one anchor download per ROM (#3641)
- v2 collection head: add a download-collection action that downloads
  by collection id, independent of gallery pagination (#3659)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 16:50:27 +00:00
copilot-swe-agent[bot]
2621a62bee fix: tighten version tag detection for v-prefixed tags
Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-07-02 11:10:02 +00:00
Georges-Antoine Assi
649b0b8402 Merge pull request #3656 from sildur/master
Fix typo in core mapping from 'zsx' to 'zxs'
2026-07-02 07:08:59 -04:00
copilot-swe-agent[bot]
66892e6d87 Initial plan 2026-07-02 11:06:14 +00:00
Spinnich
567f6fb84f chore(retroachievements): trim comments and redundant RVZ tests
Condense the rvz_hasher module docstring and hardening comments, and
drop three tests whose coverage was already provided elsewhere (the
container-compression transitivity check and the Wii duplicates of the
container-level magic/missing-file failure tests).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 10:27:17 +00:00
Roberto Romero
abdc446ff2 Fix typo in core mapping from 'zsx' to 'zxs'
The EJS core mapping in frontend/src/utils/index.ts keyed the ZX
Spectrum entry as zsx instead of the canonical platform slug zxs (as defined by UniversalPlatformSlug.ZXS in backend/handler/metadata/base_handler.py).

Renaming the key to zxs restores in-browser play for ZX Spectrum.
2026-07-02 10:18:27 +00:00
Spinnich
e5b196b8c3 fix(retroachievements): harden RVZ hashing against malformed containers
- Catch zstandard.ZstdError so a corrupt zstd group returns no hash and
  falls back to RAHasher instead of aborting the scan.
- Cap chunk_size at 64 MiB and tighten the group-count bound so crafted
  headers can't force multi-GB allocations.
- Bound decompression output per group (bz2/lzma max_length, chunked
  zstd stream reads) to defuse decompression bombs.
- Reject main.dol segments extending past the disc end; a corrupt size
  field would otherwise stall the scan hashing zero-fill.
- Key the group cache on all decode parameters and size it to keep one
  Wii hash group's chunks cached across the data and exception passes
  (avoids double decompression with sub-128 KiB chunks).

Real-ROM hashes are unchanged (both still match RA's database).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 10:10:58 +00:00
nendo
40fc9c2ff9 Address review: PG years facet, LIKE escaping, lazy track_meta, migration idioms
- Cast year to text in the /api/music years facet search so Postgres does
  not error on lower(integer) (MariaDB/SQLite auto-cast, hiding it in CI)
- Escape LIKE wildcards in music search via new utils.database.escape_like
- Drop lazy="selectin" on RomFile.track_meta; eager-load only where the
  metadata is serialized (get_rom already did; add the three soundtrack reads)
- Migration backfill uses a single query + fetchmany (repo idiom, see 0084)
  instead of manual keyset paging, in both directions
- Guard the extensionless folder-conversion collision (stale row over a
  directory the user already created on disk)
- Renumber migration 0093 -> 0094 after 0093_states_rom_user_index landed
2026-07-02 11:24:12 +09:00
nendo
1f45c8123c Address review: guard FS moves in the conversion rollback, fix ROM casing
- Wrap the filesystem moves (not just the DB write) in the conversion's
  rollback so any failure restores the original layout instead of stranding
  the file under .romm_tmp_; covered by a new test.
- Use "ROM" rather than "rom" in the convert-to-folder confirm copy.
2026-07-02 11:16:07 +09:00
nendo
8a94854b81 Add a music query API for soundtracks
RomM stores soundtracks but exposes no way to consume them as a music library: a
client has to enumerate ROMs and pull each one's tracks individually, and the
per-track metadata lives in the `rom_files.audio_meta` JSON blob, which is
unindexable on MariaDB, so any library-wide filter or sort degrades to a full
scan.

This adds a queryable, music-first API for soundtracks, backed by a typed and
indexed `track_meta` table migrated from that JSON.

It also lets users upload soundtracks, manuals, and screenshots to any ROM, not
only folder-based ones. When the target is a single-file ROM, the client warns
that the upload will migrate it to a multi-file (folder) structure, then performs
that migration in place automatically.
2026-07-02 11:16:07 +09:00
Georges-Antoine Assi
f90ba3b2a5 Merge pull request #3652 from Spinnich/fix/supergrafx-retroachievements-platform-id
fix(retroachievements): match SuperGrafx against RetroAchievements
2026-07-01 21:41:55 -04:00