Commit Graph

10109 Commits

Author SHA1 Message Date
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
Ian Mancini
8e97a7f064 fix: add shortname dictionary for pegasus export 2026-06-21 16:17:56 -03:00
Ian Mancini
4e612d9a78 fix: chmod 600 -> 644 for exported files 2026-06-21 16:17:28 -03:00
Zurdi
28e2ebe780 Merge pull request #3562 from rommapp/copilot/fix-game-entry-removal
Handle missing ROM files during delete-from-filesystem requests
2026-06-20 18:40:34 +02:00
Zurdi
dd3f9d0496 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-20 18:33:54 +02:00
copilot-swe-agent[bot]
bd0bc65e92 fix: allow ROM deletion when file is missing
Co-authored-by: zurdi15 <34356590+zurdi15@users.noreply.github.com>
2026-06-20 16:23:24 +00:00
copilot-swe-agent[bot]
bd2e6b7962 chore: outline minimal fix plan
Co-authored-by: zurdi15 <34356590+zurdi15@users.noreply.github.com>
2026-06-20 16:21:20 +00:00
copilot-swe-agent[bot]
5548a0cb95 Initial plan 2026-06-20 16:19:34 +00:00
zurdi
33a98d32a5 style: adjust tooltip padding for better visual alignment 2026-06-20 16:14:17 +00:00
zurdi
b94badf502 Merge remote-tracking branch 'refs/remotes/origin/master' 2026-06-20 16:12:45 +00:00
zurdi
b7a7f6a5e3 feat: enhance user permissions and UI elements for better access control 2026-06-20 16:12:05 +00:00
Zurdi
cce2587024 Merge pull request #3557 from rommapp/feat/logs-view
feat: real-time backend logs view
2026-06-20 17:54:23 +02:00
zurdi
78cac11913 feat: add DISABLE_LOGS_VIEWER configuration and implement checks in logs endpoints and frontend 2026-06-20 15:48:58 +00:00
Georges-Antoine Assi
74d60bbad9 Merge pull request #3559 from rommapp/feat/pytest-xdist
Run backend tests in parallel with pytest-xdist
2026-06-20 07:37:07 -04:00
zurdi
78eef900b9 feat: update logs endpoint to require 'logs.read' scope and adjust related authorization checks 2026-06-20 09:55:10 +00:00
Zurdi
26c853f1cd Merge pull request #3554 from rommapp/feat/add-debug-overlay
feat: Add debug overlay
2026-06-20 11:23:19 +02:00
zurdi
90777d5cbb refactor: address Copilot review on debug overlay
- Lazy-load DebugOverlay via defineAsyncComponent so its chunk (and the
  vueuse perf hooks it pulls in) stays out of the default bundle until the
  developer toggle is enabled.
- Add useDebugMode unit tests mirroring useCrtMode: default-off, persisted
  restore, write-through, and singleton sharing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 09:21:43 +00:00
Georges-Antoine Assi
b8450add5f Validate test database name before CREATE DATABASE
Addresses review feedback: `db_name` is interpolated into CREATE DATABASE
statements via f-strings (identifiers can't be bind parameters), so validate
it up-front against a plain-identifier allowlist ([A-Za-z0-9_]+) and refuse
anything containing quoting/other characters, rather than rely on quoting.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 21:38:50 -04:00
Georges-Antoine Assi
26cf4b36f8 Scope test-user grant to the romm_test namespace
Addresses review feedback: granting ALL PRIVILEGES on *.* is overly broad,
especially against a shared DB instance. A database-level grant on the
`romm\_test%` wildcard pattern still lets the user CREATE the per-worker
databases (romm_test_gw0, ...) needed by pytest-xdist, while confining it to
that namespace — verified that out-of-namespace CREATE DATABASE is denied.

PostgreSQL needs no equivalent change: its CI service user (POSTGRES_USER)
is the container superuser.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 21:34:46 -04:00
Georges-Antoine Assi
02815ec403 Run backend tests in parallel with pytest-xdist
Add pytest-xdist and run the backend test suite across multiple workers
(`-n 4` in CI). Each worker gets its own database so the autouse
`clear_database` fixture can't wipe rows another worker is mid-test with:

- Rootdir `backend/conftest.py` sets a per-worker `DB_NAME`
  (`romm_test_gw0`, ...) before any app module is imported, so each
  worker's engine binds to its own database.
- `tests/conftest.py` creates the per-worker database on demand (mariadb/
  mysql and postgresql paths) just before migrations run.
- The test user's grant is widened to `*.*` (setup.sql + CI) so it can
  `CREATE DATABASE` for the workers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 21:02:47 -04:00
Zurdi
4b58479232 Merge pull request #3556 from rommapp/feat/add-dropzone-to-savestates
feat: Add dropzone to saves/states
2026-06-20 01:02:14 +02:00
Zurdi
ca74dbbb96 Merge pull request #3555 from rommapp/fix/platform-refresh-on-scan
fix: Refresh platforms on scan
2026-06-20 00:20:47 +02:00
zurdi
8b70e31828 refactor: address Copilot review on logs feature
- main.py: await the cancelled log-forwarder task (suppressing
  CancelledError) so its pubsub/lock cleanup finishes before shutdown.
- forwarder: only heartbeat the Redis lock while we still own it; if a
  stall let another worker take it, relinquish forwarding to avoid
  duplicate lines (the outer loop re-contends).
- endpoints/logs.py: derive MAX_LOG_LIMIT from LOG_BUFFER_SIZE so the
  REST backfill never drifts from the producer's ring buffer.
- Logs.vue: append the download <a> to the DOM before click() (matches
  the Patcher pattern) for cross-browser reliability.
- Add tests/endpoints/test_logs.py: non-admin 403, limit clamping to
  [1, MAX_LOG_LIMIT], oldest-first ordering, and malformed-entry skip.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 20:53:58 +00:00
zurdi
02c6fc8d3f fix: suppress bandit B110/B112 on intentional log-stream swallows
The log-stream handler and forwarder deliberately swallow exceptions: the
handler is a best-effort mirror that must never raise into the app, and the
forwarder can't log its own failures without feeding back into the stream.
Annotate these with `# nosec` (with justification) so Trunk's bandit check
passes, keeping lines within black's width.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 16:17:45 +00:00
zurdi
ad543d93ee feat: add logs feature with internationalization support
- Introduced a new logs view for admin users, allowing real-time monitoring of backend logs.
- Implemented a log entry streaming mechanism using Socket.IO.
- Added filtering and searching capabilities for log entries.
- Created localized log messages in Spanish, French, Hungarian, Italian, Japanese, Korean, Polish, Portuguese, Romanian, Russian, Simplified Chinese, and Traditional Chinese.
- Updated router and sidebar components to include the new logs route.
- Enhanced user interface with tooltips and buttons for copying and downloading logs.
2026-06-19 16:06:50 +00:00
zurdi
40f7e49b11 feat: integrate dropzone for file uploads in SaveDataTab component 2026-06-19 14:52:59 +00:00
zurdi
67e70b21c1 fix: enhance platform refresh during scan completion and add new platforms to store 2026-06-19 14:43:33 +00:00
zurdi
eb1b477013 feat: add debug overlay with localization support for multiple languages 2026-06-19 13:06:26 +00:00
zurdi
fcccb5d583 feat: add random game button and localization for random ROM functionality 2026-06-19 12:40:10 +00:00
zurdi
68793c1f93 fix: game card reveal animation as global utility 2026-06-19 12:17:58 +00:00
Zurdi
c2d1bc592e Merge pull request #3552 from rommapp/feat/crt-mode
feat: CRT mode as a theme setting
2026-06-19 13:56:34 +02:00
Zurdi
24f8e6eb66 Merge pull request #3551 from rommapp/feat/add-user-avatar-to-notes
feat: Add user avatar to shared assets like notes or screenshots
2026-06-19 13:40:08 +02:00
Zurdi
2abb986d53 Merge pull request #3550 from rommapp/feat/backend-disconnect-warning
feat: backend connection status notice + offline-aware boot
2026-06-19 13:39:27 +02:00
zurdi
2fab0f0ab4 add tests for useCrtMode composable functionality 2026-06-19 11:47:03 +02:00
Zurdi
2e6fee639a Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-19 11:41:06 +02:00
Zurdi
58301e5add Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-19 11:39:54 +02:00
Zurdi
8f8418030c Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-19 11:39:44 +02:00
Zurdi
e1f5dcf090 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-19 11:36:39 +02:00
zurdi
1cc76de47d fix: improve error handling and connection state management in API and heartbeat 2026-06-19 11:35:15 +02:00
zurdi
1b05ffc6c2 fix: update pluralization in Spanish translations and improve file upload handling in RDropzone 2026-06-19 11:06:30 +02:00
Zurdi
efbee1bbe9 Merge pull request #3553 from rommapp/fix/gallery-animation
Fix/gallery animation
2026-06-19 09:49:22 +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
2997f984ff Merge remote-tracking branch 'origin/master' into feat/backend-disconnect-warning 2026-06-19 07:48:12 +00:00
zurdi
53d0b9f841 Merge remote-tracking branch 'origin/master' into feat/crt-mode 2026-06-19 07:47:49 +00:00
zurdi
f1dd8b6e90 Merge remote-tracking branch 'origin/master' into fix/gallery-animation 2026-06-19 07:47:29 +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
80b1dba7b8 feat: enhance gallery card animations with blur-up reveal effect 2026-06-19 07:32:45 +00:00
zurdi
5714ba3cec refactor: move screenshot file validation logic to utils and clean up endpoints 2026-06-19 07:30:07 +00:00