Commit Graph

10062 Commits

Author SHA1 Message Date
zurdi
1b05ffc6c2 fix: update pluralization in Spanish translations and improve file upload handling in RDropzone 2026-06-19 11:06:30 +02:00
zurdi
54b403a38e Merge remote-tracking branch 'origin/master' into feat/add-user-avatar-to-notes 2026-06-19 07:48:36 +00:00
Zurdi
aa044b7ef7 Merge pull request #3549 from rommapp/feat/screenshot-CRUD-endpoints
feat: User screenshots support + dropzone refactor
2026-06-19 09:47:02 +02:00
zurdi
e974e3b451 fix: correct down_revision reference in migration script 2026-06-19 07:39:00 +00:00
zurdi
d5c985f634 Merge remote-tracking branch 'origin/master' into feat/screenshot-CRUD-endpoints 2026-06-19 07:35:07 +00:00
zurdi
5714ba3cec refactor: move screenshot file validation logic to utils and clean up endpoints 2026-06-19 07:30:07 +00:00
Georges-Antoine Assi
2203faa665 Merge pull request #3403 from rommapp/claude/exciting-heisenberg-61PF9
Integrate Hypothesis property-based testing for the backend
2026-06-18 21:28:56 -04:00
Georges-Antoine Assi
e657948bba fix trunk 2026-06-18 21:17:47 -04:00
Georges-Antoine Assi
13007b36df cleanup tests 2026-06-18 21:12:13 -04:00
Georges-Antoine Assi
1e78a2ed59 Merge branch 'master' into claude/exciting-heisenberg-61PF9 2026-06-18 19:59:00 -04:00
Georges-Antoine Assi
1e974839be Merge pull request #3460 from rommapp/copilot/support-sortname-tag-es-de
Add ES-DE `<sortname>` import and edit support for ROM ordering
2026-06-18 14:00:00 -04:00
Georges-Antoine Assi
8922c2dd12 changes forom bot review 2026-06-18 13:27:41 -04:00
Georges-Antoine Assi
892f870d0d fix migration 2026-06-18 11:51:11 -04:00
Georges-Antoine Assi
c98fd39adb Merge branch 'master' into copilot/support-sortname-tag-es-de 2026-06-18 11:49:43 -04:00
Georges-Antoine Assi
8bf7d18afe cleanup 2026-06-18 11:48:51 -04:00
Georges-Antoine Assi
d3390b9d47 Add rom.sort-key translation to all locales
Backfill the `sort-key` key (added to en_US/en_GB) across the remaining 15
locale rom.json files with translations, so check_i18n_locales passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 11:42:59 -04:00
Georges-Antoine Assi
a38ebe29b5 Preserve custom name_sort_key; gate derivation on "still derived"
Drop the name_sort_key_custom flag/migration in favour of a flagless rule: a
key is "custom" when it no longer equals compute(name). Apply that consistently
across all three write paths so a manual sort key survives renames while a
derived key keeps following the name:

- @validates re-derives on name assignment only when the stored key still
  matches the derived value; direct name_sort_key assignment stores a
  normalized custom key (or reverts to derived when cleared). Handles both
  kwarg orders at construction.
- update_rom mirrors the same check for the bulk update() path it bypasses.
- The edit endpoint only writes the key when the user actually changed the
  field, delegating the untouched case to update_rom.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 11:30:40 -04:00
Georges-Antoine Assi
cd19d723fa Merge sort_name into name_sort_key with custom-override flag
Collapse the separate `sort_name` column into `name_sort_key`, which is now
the single user-settable sort field: always normalized and indexed for fast
ordering, derived from `name` by default, and overridable. A new
`name_sort_key_custom` boolean marks user/metadata overrides so they survive
renames and rescans.

- Drop the `roms.sort_name` column; repurpose migration 0085 to add
  `name_sort_key_custom`.
- Derive the key via `@validates("name")` unless pinned custom; the edit
  dialog, unmatch flow, and ES-DE gamelist <sortname> set custom keys.
- update_rom / scan_rom keep the columns in sync explicitly (bulk update and
  construction bypass / reorder the validator).
- Frontend: edit field drives name_sort_key (empty when auto), api sends the
  override only when custom, regenerated types updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 10:34:21 -04:00
zurdi
d4a6d97acb feat: add user avatar and updated timestamp to community screenshots 2026-06-18 14:20:54 +00:00
zurdi
c0b44cd2ef Merge branch 'feat/screenshot-CRUD-endpoints' into feat/add-user-avatar-to-notes 2026-06-18 14:17:32 +00:00
zurdi
7ef3cba02a fix(migrations): shorten 0084 revision id to fit alembic_version column
The revision id '0084_add_roms_search_and_sort_indexes' (37 chars)
exceeded alembic_version.version_num VARCHAR(32), so every migration
run and test setup failed with 'Data too long for column version_num'
when stamping the revision. Rename it to '0084_roms_search_sort_indexes'
(29 chars) and update the 0085 down_revision link to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 14:06:32 +00:00
zurdi
6b63a677ec feat: add screenshot category enum and visibility flags 2026-06-18 13:51:07 +00:00
zurdi
b309938a78 Merge branch 'master' into feat/screenshot-CRUD-endpoints 2026-06-18 13:47:18 +00:00
zurdi
c84e91d185 hotfix: 0084 version alias 2026-06-18 13:47:00 +00:00
Georges-Antoine Assi
e7d46ee8c4 fix types 2026-06-18 09:32:38 -04:00
Georges-Antoine Assi
ee7a581067 fix migration names 2026-06-18 09:28:56 -04:00
Georges-Antoine Assi
222f767b2a run fmt 2026-06-18 09:05:55 -04:00
Georges-Antoine Assi
0d8a0a2ab2 Merge branch 'master' into copilot/support-sortname-tag-es-de 2026-06-18 09:04:17 -04:00
zurdi
2772ecb239 Merge remote-tracking branch 'origin/master' into feat/screenshot-CRUD-endpoints 2026-06-18 12:58:31 +00:00
Georges-Antoine Assi
aef2a1f579 Merge pull request #3540 from bonofiglio/fix/search-performance-improvements
fix(search): full-text indexes+caching
2026-06-18 08:17:30 -04:00
Georges-Antoine Assi
4feb71a697 fix type errors 2026-06-18 08:07:07 -04:00
Georges-Antoine Assi
aea09911ad cleanup 2026-06-18 07:57:09 -04:00
zurdi
a8d2fcb605 feat: implement RDropzone component for file uploads with drag-and-drop support
- Added RDropzone component for handling file uploads with a customizable interface.
- Integrated RDropzone into Patcher and Upload views, replacing previous drop zone implementations.
- Enhanced ScreenshotsTab with additional functionality for community screenshots, including visibility toggles and owner display.
- Updated styles for improved user experience and responsiveness.
- Created Storybook stories for RDropzone to demonstrate its usage and interaction.
2026-06-18 11:05:52 +00:00
Georges-Antoine Assi
cef5ed0699 set cache_key 2026-06-18 06:56:38 -04:00
zurdi
cc9691196c feat: add screenshot upload functionality and UI enhancements
- Implemented screenshot upload feature in the ROM management section.
- Added new API methods for uploading and removing screenshots.
- Enhanced UI to support drag-and-drop for screenshots and display uploaded images.
- Updated localization files for Russian, Simplified Chinese, and Traditional Chinese to include new screenshot-related strings.
- Improved the FilesTab and MediaTab components to manage screenshots effectively.
- Added delete functionality for user-uploaded screenshots with confirmation prompts.
- Updated styling for screenshot elements to improve user experience.
2026-06-18 07:45:16 +00:00
zurdi
6bdb8556b8 Merge remote-tracking branch 'origin/master' 2026-06-18 07:44:28 +00:00
Georges-Antoine Assi
fc688f5c16 fix(search): address Copilot review on relevance ordering & char-index cache
- Include order_by / order_dir / group_by_meta_id in the char-index cache
  key. The computed AlphaStrip positions depend on ordering and grouping,
  so keying only by user reused a stale index when those changed.
- Gate the relevance-ranking test assertions to MySQL/MariaDB. Relevance
  ordering uses MATCH ... AGAINST; PostgreSQL (also in the CI matrix) falls
  back to name ordering, where those assertions don't hold.
- Clarify the order_by API docstring: relevance ordering applies on
  MySQL/MariaDB; other databases fall back to name.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 21:21:53 -04:00
Georges-Antoine Assi
987e351113 refactor: derive file-name columns via @validates
Centralize the *_no_tags / *_no_ext / *_extension columns (derived from a
file name) behind @validates hooks instead of computing them by hand at
every write site:

- Add pure helpers (compute_file_name_parts and friends) to models.base;
  the filesystem base handler now delegates to them.
- Add @validates on Rom (fs_name), BaseAsset (file_name, inherited by all
  asset subclasses), and Firmware (file_name).
- update_rom keeps the fs_name-derived columns in sync on bulk update(),
  which also fixes the rename path never updating fs_extension.
- Drop the now-redundant computations at the scan/rename call sites.

Also fix the migration backfill loop and a pre-existing list[str | None]
type mismatch surfaced in scan_handler. Add tests for the helpers, the
validators, and the update_rom bulk-sync path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 21:14:16 -04:00
Georges-Antoine Assi
1d63c9c89d refactor: derive name_sort_key via @validates instead of ORM event
Replace the before_insert/before_update event listener with a
@validates("name") method on Rom. The sort key is now recomputed exactly
when name is assigned (ORM construction or mutation) rather than on every
flush of any field. Bulk update() still sets it explicitly in update_rom.

Also linearize the merged 0084 migration onto 0083_rom_category_soundtrack
so there is a single alembic head.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 20:06:45 -04:00
Georges-Antoine Assi
3ccae1d560 chore: merge roms search/sort migrations into single 0084
Combine 0083_add_roms_search_indexes, 0084_add_roms_name_index, and
0085_add_roms_name_sort_key into one migration (revision 0084) off
0082_save_origin_device.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 18:01:49 -04:00
Georges-Antoine Assi
fd4964909f fix lint issues 2026-06-17 17:44:43 -04:00
Georges-Antoine Assi
4bacdc5f09 Merge branch 'master' into fix/search-performance-improvements 2026-06-17 17:39:47 -04:00
Georges-Antoine Assi
fa97fd76de set atari st to gen4 2026-06-17 15:51:44 -04:00
zurdi
cdf561aed7 fix: removed bcrypt duplicated dependency 2026-06-17 16:29:24 +02:00
Zurdi
8d036e8226 Merge pull request #3436 from rommapp/chore/frontend-v2
Frontend migration to the new visual language
2026-06-17 16:14:01 +02:00
Zurdi
b52c5f1ae7 Merge branch 'master' into chore/frontend-v2 2026-06-17 15:43:08 +02:00
Zurdi
3e629ba699 Merge pull request #3544 from rommapp/fix/crash-on-startup-no-library
fix: Crash on startup when no library
4.9.2
2026-06-17 15:41:20 +02:00
zurdi
a0f54849ab fix(deps): bump vcrpy to 8.2.1 for aiohttp 3.14 compatibility
The pytest CI was failing on every vcr-marked test with:
  AttributeError: module 'aiohttp.streams' has no attribute
  'AsyncStreamReaderMixin'

aiohttp 3.14 (bumped in #3530) removed AsyncStreamReaderMixin, which
vcrpy's aiohttp stub referenced until 8.2.0. The lockfile still pinned
vcrpy 7.0.0 because the aiohttp bump only re-resolved aiohttp, and the
fixed vcrpy 8.2.x releases fall inside the global `exclude-newer = "7 days"`
window. Add a per-package exclude-newer override (mirroring starlette) so
the fixed release is allowed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 15:33:39 +02:00
zurdi
34e2ead5f7 fix: update starlette version to prevent compatibility issues 2026-06-17 14:27:13 +02:00
zurdi
2a53669459 fix: prevent crash on startup by bootstrapping library structure A when none is detected 2026-06-17 14:20:58 +02:00