Commit Graph

10227 Commits

Author SHA1 Message Date
Georges-Antoine Assi
ee978c62ca Merge pull request #3593 from y1lm-z/master
Turkish language support tr_TR
2026-06-24 21:06:08 -04:00
y1lm0z
6c79336c53 Turkish language support 2026-06-25 03:19:01 +03:00
Georges-Antoine Assi
167e355f3a Merge pull request #3592 from rommapp/claude/elegant-lovelace-nl78it
fix(deps): bump dependencies to patch reported vulnerabilities
2026-06-24 20:01:43 -04:00
Georges-Antoine Assi
81fc94c446 update lock 2026-06-24 19:55:12 -04:00
Claude
23dbffd17a fix(deps): bump dependencies to patch reported vulnerabilities
Address vulnerabilities flagged by the security scanner:

Backend (pyproject.toml / uv.lock):
- cryptography 46.0.5 -> 49.0.0 (CVE-2026-39892, memory buffer)
- mako 1.3.10 -> 1.3.12 (CVE-2026-41205/44307, path traversal)
- gunicorn 23.0.0 -> 26.0.0 (HTTP request smuggling hardening)
- yarl 1.20.1 -> 1.24.2 (SSRF via host parsing)

Frontend (package.json / package-lock.json):
- axios ^1.16.0 -> ^1.18.1 (sensitive data exposure)
- form-data pinned to ^4.0.6 via override (CVE-2026-12143, CRLF injection)

starlette is already on 1.0.1, which is the patched release for the
BadHost advisory (CVE-2026-48710), so no change is needed there.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W5nnYmsCNdUjNpuwRxqUiR
2026-06-24 17:45:22 +00:00
Georges-Antoine Assi
d0d2800fbc Merge pull request #3225 from rommapp/claude/server-side-rom-patching-EaQck
Add server-side ROM patching endpoint
2026-06-24 13:24:52 -04:00
Georges-Antoine Assi
40d949bcf0 Merge pull request #3588 from ametis70/github-actions-test-build-updates
Test Build GitHub Action improvements
2026-06-24 12:52:02 -04:00
Georges-Antoine Assi
93922faf91 Key Docker Hub namespace off push credential
Derive the Docker Hub namespace from DOCKER_NAMESPACE, falling back to
DOCKER_USERNAME and then github.repository_owner, so forks whose GitHub
owner name differs from their writable Docker Hub namespace can push.
GHCR is unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 11:43:03 -04:00
Georges-Antoine Assi
da7658a4aa Clarify GHCR-only preview build PR comment
Rename the comment step to reflect that PR builds only push to GHCR,
add a note explaining the hardcoded registry, and inline the image
string into the updateComment call.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 10:26:30 -04:00
Georges-Antoine Assi
462822cf81 Merge pull request #3587 from ametis70/pegasus-metafiles-export-fixes
Permission fix for exported game lists and Pegasus platform slugs mapping
2026-06-23 22:43:44 -04:00
Georges-Antoine Assi
b324ea5e37 fix typo 2026-06-23 22:38:43 -04:00
Georges-Antoine Assi
e6c3446c09 cleanup 2026-06-23 22:33:19 -04:00
Georges-Antoine Assi
55eb8b6252 Key SLUG_TO_PEGASUS by UniversalPlatformSlug
Use UPS members for the platform-slug keys instead of bare strings.
zxspectrum and windows now use their real UPS slugs (UPS.ZXS, UPS.WIN);
naomi, chip-8 and steam stay as raw strings since they have no UPS member
(platform.slug falls back to the folder name for those). Lookups by raw
slug string still resolve, since UPS is a StrEnum.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 22:28:57 -04:00
Georges-Antoine Assi
d96463846a Merge pull request #3585 from rommapp/add-test-data-generator
Add test data generator script
2026-06-23 22:16:06 -04:00
Georges-Antoine Assi
c87d880042 Standardize backend/tools file headers
Give all three tools the same header shape: shebang, summary docstring, a
short detail paragraph, and a "Run from the backend directory:" command
block. Adds docstrings to generate_supported_platforms.py and
xml_diagnostics.py, which previously had none.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 22:05:52 -04:00
Georges-Antoine Assi
183894c180 Document backend/tools in repo-wide rules
Move the backend/tools note into the repo-wide rules section so it reads
as a standing convention rather than a backend command.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 22:03:28 -04:00
Georges-Antoine Assi
a25ca20721 Move Python dev tools into backend/tools
Relocate generate_test_data.py (from backend/scripts) and
generate_supported_platforms.py (from backend/utils) into backend/tools,
alongside the existing xml_diagnostics.py. Update their run-command
references and document backend/tools in CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 21:57:34 -04:00
Georges-Antoine Assi
f5633f8dbe Don't echo seeded password in test data generator
CodeQL flags the value as clear-text logging of sensitive info. Print the
username and reference the --password flag instead of its value.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 21:47:02 -04:00
Georges-Antoine Assi
18527c65a5 Silence bandit false positives in test data generator
- B311: random is used for deterministic fake data, not security
- B608: DELETE table names come from a hardcoded list, not user input

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 21:41:42 -04:00
Georges-Antoine Assi
40ad93c8b4 Merge branch 'master' into add-test-data-generator 2026-06-23 21:37:08 -04:00
Georges-Antoine Assi
0ae68ab560 Merge branch 'master' into claude/server-side-rom-patching-EaQck 2026-06-23 21:25:07 -04:00
Georges-Antoine Assi
c8055ac973 Address self-review on patcher PR
- patcher.js resolves rom-patcher-js from both the relocated sibling
  layout (docker/Dockerfile) and the plain node_modules layout (root
  Dockerfile), so both build flows work without a manual copy
- apply_patch wraps the node subprocess in asyncio.wait_for with a
  timeout and kills it on expiry; a semaphore bounds concurrency, and the
  endpoint rejects oversized ROM/patch files to avoid OOM
- report the patch source-checksum validation result via an
  X-Patch-Validated header; the patcher UI warns on a mismatch
- return a generic "Patching failed" detail to clients and log the real
  error server-side, so node/RomPatcher.js paths don't leak

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 21:07:27 -04:00
Georges-Antoine Assi
fb266cf881 Merge pull request #3586 from rommapp/fix-vite-watch-resources-oom
Exclude served resources from Vite dev watcher
2026-06-23 21:05:39 -04:00
Georges-Antoine Assi
4fa46617a4 Exclude served resources from Vite dev watcher
frontend/assets/romm/resources is a symlink into the user's library
(covers, screenshots). Vite's root is frontend/, so chokidar follows the
symlink and tries to watch every file under it. With a large library
(hundreds of thousands of asset files) this exhausts the Node heap and
the dev server crashes with "JavaScript heap out of memory".

Ignore that tree in server.watch; it holds served assets that never need
HMR.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 20:58:56 -04:00
Georges-Antoine Assi
311d638e7d Generate mosaic PNG covers and screenshots
Add --images (default on) to write unique per-rom cover art and
screenshots into the resources tree, matching RomM's
roms/{platform_id}/{rom_id} layout, and point the path columns at them.

Each image is a small random block grid upscaled with NEAREST, which is
the fastest believable artwork (~0.3-0.6 ms/image) and compresses to
~1.3 KB. Pixels come from a separate RNG stream so rom rows stay
identical with or without --images. --no-images keeps the fast,
DB-only path; --resources-path overrides the output dir.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 20:58:39 -04:00
Georges-Antoine Assi
2ab0039d9c Fix circular import broken by isort reordering
isort sorted the adapters import ahead of the metadata package, which
defeated the import-cycle workaround. Guard the order with isort: off/on.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 19:30:19 -04:00
Georges-Antoine Assi
6253b63fca Add test data generator script
Adds backend/scripts/generate_test_data.py, a tool that builds a large,
prod-like RomM library (platforms, users, devices, firmware, roms with
per-provider fake metadata, saves, states, screenshots, collections, sync
data, play sessions) and bulk-inserts it for load and UI testing.

Cover/manual/screenshot path and URL columns are left empty so no asset
files are referenced.

AI assistance: written with Claude Code.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 19:20:22 -04:00
Georges-Antoine Assi
80a968183d Move ROM patcher into a GameDetails tab, drop /patch route
Convert the standalone v2 Patcher view into a PatcherTab feature composite
rendered inside GameDetails (gated on the ROM carrying nested files), and
remove the dedicated rom/:rom/patch route along with every navigation
entry that led to it.

v2: remove the FilesTab button, the GameActions menu item, and
useGameActions.patch/canPatch; drop the route binding and named view.
v1 (frozen, removed per request): delete views/Patcher.vue, the AdminMenu
patcher item, and navigation store goPatcher.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 18:11:02 -04:00
Georges-Antoine Assi
ca7bd4c564 Add missing patcher i18n keys, ignore vendored patcher.js
Fill the 9 missing patcher.json keys across all non-English locales
(translated for fr/es/de/it/pt_BR, English placeholders elsewhere) and
exclude the vendored patcherjs library from trunk linting.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 13:36:16 -04:00
Georges-Antoine Assi
3308a0a6a2 hold packed ratios 2026-06-23 11:36:25 -04:00
Georges-Antoine Assi
a3176494c9 Patcher backend refinements, dep cleanup, regenerated types
- Move default_category_for_non_nested validator onto RomFileSchema so
  top-level files default to category "game" (the v2 patcher's base-file
  filter relies on this).
- Use Annotated Body() in the patch endpoint; check patcher output via
  anyio async Path.
- Drop the now-unused client-side rom-patcher and vite-plugin-static-copy
  (patching is server-side); simplify the Storybook plugin filter.
- Regenerate frontend OpenAPI types.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 09:17:52 -04:00
Georges-Antoine Assi
ececc2ec91 Port v2 patcher to server-side per-ROM flow
Mirror the v1 change that moved patching from a browser web worker to the
server-side /roms/{id}/patch endpoint operating on files already in the
library.

- Rewrite v2 Patcher view to read base/patch files from currentRom and
  POST to the patch endpoint, dropping the worker, rom-patcher imports,
  window globals, and dropzones.
- Add canPatch + patch() to useGameActions and surface a Patcher entry in
  the per-ROM more-menu (gated on nested files).
- Add a Patch button to the GameDetails FilesTab header.
- Remove the now-broken standalone Patcher links (route is per-ROM) from
  UserMenu and SettingsSidebar; refresh stale nav doc comments.
- Add patcher.missing-from-fs i18n key.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 09:16:50 -04:00
Georges-Antoine Assi
52163633e5 Merge branch 'master' into claude/server-side-rom-patching-EaQck 2026-06-23 07:01:07 -04:00
Georges-Antoine Assi
ed7604d288 Merge pull request #3581 from rommapp/claude/sweet-gates-z5rlgn
docs: split v2 constitution into focused agent skills, make CLAUDE.md holistic
5.0.0-alpha.1
2026-06-22 22:47:58 -04:00
Georges-Antoine Assi
0cf0647685 run fmt 2026-06-22 22:46:39 -04:00
Georges-Antoine Assi
995a01981b tweaks 2026-06-22 22:46:18 -04:00
Georges-Antoine Assi
dfdf44f74c cleanup 2026-06-22 22:10:48 -04:00
Claude
5a9eda9eeb docs: split v2 constitution into skills, make CLAUDE.md holistic
Reorient the repo for agentic development by outside contributors.

- Rewrite CLAUDE.md from a frontend-v2-only constitution into a lean,
  holistic guide covering both stacks, the v1/v2 split, repo-wide rules
  (English, AI disclosure, branch/PR flow, Trunk, verification), a skills
  index, and a quick command reference.
- Extract the v2 constitution and add backend guidance as seven focused
  skills under .claude/skills/:
  - frontend-v2-components (tiers, file/SFC conventions, anti-patterns)
  - frontend-v2-theming (tokens, dual theme, zero-hex-literal policy)
  - frontend-v2-input (universal input + responsive viewport)
  - frontend-v2-patterns (errors, loading, sockets, persistence, forms,
    permissions, confirmations)
  - frontend-i18n (locale parity rule + check script)
  - backend-development (FastAPI/SQLAlchemy layering, scopes, migrations,
    OpenAPI -> frontend type pipeline, uv/pytest/trunk workflow)
  - pre-pr-verification (per-stack pre-PR gate mirroring CI)
- Track shared skills in git while keeping personal/local Claude config
  ignored.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012EigwEL43km8mskHjT6sjr
2026-06-23 01:49:08 +00:00
Georges-Antoine Assi
e7dd013cfb Merge pull request #3580 from rommapp/claude/youthful-wozniak-ocjhc0
feat(v2): interactive 3D box art on the game detail hero
2026-06-22 21:37:02 -04:00
Georges-Antoine Assi
111fc969be run fmt 2026-06-22 19:40:56 -04:00
Claude
d7c5ab7e06 feat(v2): RBox3D faces right, self-spins, and coasts on flick
- Default orientation now faces right (initialYaw flipped).
- Idle auto-spin actually resumes: the time-based check moved into the RAF
  loop, since a computed reading performance.now() cached and never restarted
  after the first interaction. Quiet window is 2s.
- Flick momentum without a JS decay loop: the release velocity is handed to
  the box as one extra rotation and a CSS ease-out curve coasts it to a stop.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019itLXRfJXGGbhPY3JyqnuN
2026-06-22 23:23:37 +00:00
Claude
1b02bf6a3e fix(v2): RBox3D adopts box-2D dimensions even when cached
Read the front (box-2D) and spine image natural ratios on mount, not only on
the load event — a cached cover decodes before the listener binds, which left
the box stuck at the default ratio instead of the real box-2D proportions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019itLXRfJXGGbhPY3JyqnuN
2026-06-22 22:17:22 +00:00
Claude
ab2b61783b fix(v2): RBox3D rotates on drag instead of selecting faces
Add user-select: none to the box and pointer-events: none to the faces so a
drag always lands on the root (which owns the rotation listeners) and never
starts a text / image selection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019itLXRfJXGGbhPY3JyqnuN
2026-06-22 22:12:48 +00:00
Georges-Antoine Assi
2631f0e45d Merge pull request #3577 from Spinnich/feature/oidc-allow-registration
feat(auth): add OIDC_ALLOW_REGISTRATION toggle to gate OIDC auto-registration
2026-06-22 18:06:13 -04:00
Georges-Antoine Assi
d38be187f3 Merge branch 'master' into claude/youthful-wozniak-ocjhc0 2026-06-22 18:04:37 -04:00
Georges-Antoine Assi
01b9226265 Merge pull request #3579 from rommapp/v2-ui-tweaks-gg
V2 UI tweaks gg
2026-06-22 18:04:26 -04:00
Georges-Antoine Assi
c4bfbac872 Merge branch 'master' into v2-ui-tweaks-gg 2026-06-22 17:45:59 -04:00
Claude
77980a79ec feat(v2): interactive 3D box art on game detail hero
Adds an RBox3D primitive that builds a rotatable, fake-3D game box from
three flat ScreenScraper scans (front, back, spine) using CSS 3D
transforms. Box proportions derive from the images themselves; it rotates
via pointer drag, arrow keys / gamepad D-pad, and the right analog stick,
drifts gently when idle, and honours prefers-reduced-motion.

The game detail hero (CoverColumn) upgrades to the spinning box when the
"3D box" boxart style is selected and the rom has the full set of faces,
falling back to the flat cover otherwise.

Backend: persist the box-2D-side (spine) scan locally, mirroring the
existing box-2D-back handling — new BOX2D_SIDE media type + box2d_side_path
on ss_metadata, opt-in via scan.media.

- RBox3D primitive + Storybook story (controls + keyboard-rotation play())
- useBoxFaces composable resolving the three faces + a `complete` gate
- box3d-alt i18n key across all locales
- backend BOX2D_SIDE persistence + tests

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019itLXRfJXGGbhPY3JyqnuN
2026-06-22 21:45:39 +00:00
Georges-Antoine Assi
af4b057894 feat(v2): screenshot-forward covers + cover-art PIP for continue-playing & activity
Show a "where you left off" screenshot on the Home continue-playing rail and
the live-activity board, with a small cover-art thumbnail (PIP) in the corner
so the game stays identifiable. Both render at the image's natural aspect.

Backend:
- New shared util `continue_playing_screenshot(rom, latest_save)` resolving the
  image in priority order: latest save's screenshot, then title screen, then
  first gameplay screenshot (None → frontend falls back to cover art).
- `SimpleRomSchema.screenshot_path` populated only on the `last_played` query;
  `get_latest_saves_for_roms` batch handler (+ tests).
- ActivityEntry / ActivityEntrySchema gain `screenshot_path`, computed from the
  session player's latest save in both the socket and REST heartbeat paths.

Frontend:
- New shared `CoverArtPip.vue` (bottom-right 2D cover thumbnail), reused by
  GameCard and ActivityCard.
- Home continue-playing rail uses `screenshot_path` + PIP, natural aspect (no
  forced hero/style).
- Activity board: screenshot-forward cover + PIP, and a wrapping flex layout so
  cards share a uniform height with natural-ratio widths (gallery-card
  behavior).
- GameCover only keys the measured ratio by rom id for the rom's own cover, so
  a `coverSrc` override (screenshot) never pollutes the gallery's ratio cache.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 17:40:56 -04:00
Georges-Antoine Assi
e471efb987 feat(v2): morph gallery cover into the player on Play
Clicking Play at the center of a gallery cover now runs the shared-element
view transition into the /ejs (EmulatorJS) or /ruffle hero, matching the
card → details morph.

- useGameActions gains an optional `coverEl` resolver; `play()` wraps the
  navigation in `morphTransition` (cover → player hero, same `rom-cover-<id>`
  tag the player paints statically) and awaits the push so the snapshot is
  taken after the player renders. GameCard supplies its GameCover box.
- The player heroes only seeded `rom` from `currentRom` (set via GameDetails),
  so a direct gallery→play left `rom` null and the `v-if`-gated hero never
  rendered — nothing to morph into. Seed a lightweight `heroSeed` SimpleRom
  from the gallery store (new `galleryRoms.getRomById`) so the cover paints
  its morph tag immediately; `rom` fills in on mount. Play is disabled until
  the full payload loads.
- Enable hover-motion on both player heroes so the cover spin / hover video
  work there too.
- Arcade systems (arcade / neogeoaes / neogeomvs) skip the cartridge slot-in
  animation (new `isArcadeSystem`).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 12:46:31 -04:00