Commit Graph

13122 Commits

Author SHA1 Message Date
Georges-Antoine Assi
b6dcfc6a3c polish(pr-ready step 4): trim comments and docstrings, keep the newest-state lookup off the event loop
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 11:48:16 -04:00
Georges-Antoine Assi
8f7d092d67 simplify(pr-ready step 3): one refusal type, one resume-import value, one zip staging loop
- build ImportRefusalSchema directly in the broker, dropping the mirror dataclass and the asdict conversion
- replace the resume_via_import/resume_needs_import pair with one ResumeImport literal
- stage base and foreign zips through a shared helper, parse each member once, and read the base only when something is imported
- ImportSpec.kinds is a set of names, and a successful import-spec answer is cached briefly so one claim asks once
- show the suggested emulator's display name in the refusal hint
- trim long comments and the dangling spec reference

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 11:43:08 -04:00
Georges-Antoine Assi
eaea7e6db1 review(pr-ready step 2): decide import eligibility on the won container and release the claim on refusal
- recheck import-spec right after the win; refuse a foreign save/state the won broker will not import instead of sending it natively
- only route an older native exit state through the import archive when the broker takes archive-channel states
- withhold resume_slot from activate when the import was lost
- import_spec: webstation-only, ACK timeout, catch http.client errors
- keep a foreign archive's own state out of a save import; preserve member timestamps and modes
- fix cs_CZ/pl_PL plural forms, a stale picker comment, and change-history docstrings

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 11:33:48 -04:00
Georges-Antoine Assi
4348c1e63d Merge remote-tracking branch 'origin/master' into streaming-patches-6
# Conflicts:
#	backend/handler/streaming/launch.py
#	backend/tests/endpoints/test_streaming.py
#	frontend/src/services/api/streaming.ts
2026-09-25 10:50:24 -04:00
Sam Dornan
7dd35aa139 fix(sync): give a sync session the life of one launch, and drop the dead play-session link (#4670) 2026-09-25 10:14:09 -04:00
Georges-Antoine Assi
86f46212d3 Merge pull request #4645 from andest01/feat/4182-websocket-status-banner
feat(v2): surface WebSocket transport fallback in BackendStatusBanner
2026-09-25 09:13:36 -04:00
Georges-Antoine Assi
87bdd01526 fix(i18n): sort websocket-unreachable-retrying key in common.json
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 08:21:34 -04:00
Zurdi
c63c0f3a75 Merge pull request #4769 from rommapp/claude/notifications-apprise-framework-e5dab1
feat: send notification channels through every Apprise service
2026-09-25 12:23:24 +02:00
zurdi
95c04849a4 feat(settings): order the Account group as profile, user interface, notifications
In both the settings sidebar and the user menu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 12:23:08 +02:00
zurdi
09fb8c1a4a style(storybook): sort the RComboboxField stories imports (trunk fmt)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 12:16:22 +02:00
Zurdi
7301f1af55 Update frontend/src/v2/lib/forms/RComboboxField/RComboboxField.stories.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-09-25 12:13:17 +02:00
zurdi
eb582bde5a fix(notifications): address Greptile review on the URL read and About tooltip
- A save that reads a just-typed URL now shares the read the field's debounce
  starts, instead of racing it and saving the fields from before the paste.
  A URL that wasn't read, or was replaced meanwhile, isn't saved.
- The About dialog measures its values again when one changes, not only when
  the grid resizes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 11:57:16 +02:00
zurdi
51894eb5e7 chore(notifications): review-polish comments
pr-ready step 4: comments name no product as the actor, and the payload
helper's docstring says what it sends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 11:14:11 +02:00
zurdi
4205757e38 refactor(notifications): simplify pass; set URL-only services up from their URL
pr-ready step 3 (simplify), plus the dialog changes asked for while it ran.

- A service that gives out its own URL (Discord, Slack, ntfy...) is set up
  from that URL alone. The catalog lists the fields such a URL fills in
  (url_fields), and the dialog shows only what it lacks, such as Discord's
  bot name, which a URL read no longer wipes.
- Reading a URL checks that its fields rebuild the same URL, so a misread
  token is refused instead of saved.
- Bot name gets a translated label; "Advanced options" is a small text toggle.
- Simplify: compiled template patterns cached per service, one table of
  token patterns, parse_bool for flags, the log collector reordered, the
  paste state reset in one place, the About tooltip state as a list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 11:09:01 +02:00
zurdi
8c91187d9b fix(notifications): review fixes for URL pasting and the About tooltip (code review)
- The About tooltip measures truncation whenever its grid lays out, so
  it opens on the first hover or focus; RTooltip decides on the
  pointer's arrival, before a hover-time measurement had landed.
- A pasted URL naming a schema RomM leaves out is refused before Apprise
  builds its plugin.
- An empty reply no longer leaves a bare "Reply:" on the error, and the
  warnings Apprise logs outside a send reach the server log again.
- A parsed service missing from the dialog's catalog shows the paste
  error instead of its raw id, and URL fields are read in one loop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 10:54:10 +02:00
zurdi
4e8cde1810 fix(about): show a cut-off version in an RTooltip, not the native title
The full value shows in the v2 tooltip, and only when its tile cuts it
off, so a version that fits isn't repeated on hover.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 10:48:30 +02:00
zurdi
c72db52a44 fix(about): truncate a long version instead of overflowing the dialog
A branch name as the version widened its 1fr column to the text's full
width, pushing the second column past the dialog. The columns now start
from a 0 minimum so the value truncates with its ellipsis, and the full
value shows on hover.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 10:46:37 +02:00
zurdi
88631d0c53 feat(notifications): keep a pasted URL, show what it filled in, send the RomM icon
- The pasted URL stays in its field once the others are filled in; it
  goes when the dialog opens or another service is picked by hand.
- The field then says which fields the URL filled in, and those fields
  glow briefly (not with reduced motion).
- Apprise sends the RomM icon where a service shows the sender's
  picture, such as Discord's avatar, instead of Apprise's own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 10:45:22 +02:00
zurdi
ec239c7953 feat(notifications): read a pasted URL into an Apprise channel's fields
- Pasting a service's own URL (a Discord webhook's) or an Apprise URL
  in the channel dialog fills its fields in as soon as it's pasted, or
  says why it can't. POST /api/notification-channels/apprise-services/parse
  instantiates the plugin and matches the URL Apprise writes for it
  against the service's templates, so it works for every service; a new
  channel moves to the service the URL is for.
- A failed delivery's error carries the start of the service's reply
  after Apprise's warning, so a 400 says why (Discord refuses a bot name
  containing "discord"). Apprise's log stays out of the server log.
- Setup guides link Apprise's wiki instead of appriseit.com.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 10:41:04 +02:00
zurdi
29084cc593 chore(notifications): review polish for the Apprise channels
- Name what the helpers return: checked_fields gives back the fields to
  keep, _defuse_mentions breaks up pings.
- Declare AppriseFieldValue as an explicit TypeAlias, which mypy under
  trunk needs to use it in annotations.
- Trim the comments that restated a field list or defended a limit, fix
  the Apprise type's comment still describing a single URL, and split
  the dense channels paragraph in the architecture doc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 10:27:18 +02:00
zurdi
bcd9981c28 refactor(notifications): simplify the Apprise channels (simplify pass)
- Tell a moved destination by Apprise's own url_identifier, with the
  same secrets on both sides, instead of a hand-kept list of field
  names that missed region and instance fields.
- RComboboxField takes `rules` and reports to its RForm like RSelect,
  so a required list validates itself; the dialog's missing-list state
  and the prop threaded through two components go.
- The backend leaves default values out when it keeps the fields, so
  the form sends what it holds instead of mirroring each default.
- Load Apprise only when an Apprise channel delivers: the local schemas
  are left out of the catalog instead of disabled at import, so scans,
  tasks and webhook or email jobs no longer load every plugin.
- Look services and fields up by key, build a URL from the service it
  already has, merge the plugin helpers, and find the first fitting
  template instead of all of them.
- One create call for every channel type, assert_admin for the service
  catalog, the timeout wording in describe_error, the plain-text body
  shared with email through OutboundMessage.text, WebhookUrl back to
  its name.
- Reuse settings.username and settings.password for those field
  labels, an RBtn for the setup guide link, and load the catalog only
  when the dialog can show it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 10:04:23 +02:00
zurdi
61ec7986a3 fix(notifications): harden Apprise channels (security audit and code review)
- Leave FCM out of the catalog: its keyfile token makes Apprise open a
  local path or fetch a URL itself.
- Treat credential-named tokens as secrets even when Apprise doesn't
  (Mastodon, Misskey, Plivo, SMSEagle, LaMetric, Rocket.Chat, a JSON
  path), and hide any secret left in the masked target or in the
  errors that reach last_error and the logs.
- A secret left out of an edit keeps its value, an empty one removes it,
  and a kept secret no longer follows the channel to another host,
  port, schema, SMTP server or ntfy mode. The form offers "Remove it"
  for stored secrets and names them through `stored_secrets`.
- Break up @everyone, @here and <@…> so a notification pings nobody, as
  the removed Discord payload did.
- Keep only the fields the service takes, cap lists at 20 items, and
  accept only a hostname or address as a host.
- Give the channel test the same 60 s budget as a queued delivery, and
  build the service catalog response once per process.
- Don't require a stored secret list (Bark) again on edit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 09:27:32 +02:00
zurdi
8089040bfd feat(notifications): rebuild notification channels on Apprise
Forward notifications to any of the 100+ services Apprise reaches instead
of the two hand-coded webhook formats. The channel form lists every
Apprise service with the fields it takes, and the backend builds the
Apprise URL from them.

- New `apprise` channel type, admin only: Apprise opens its own
  connections, past the SSRF guard. The owner's role is checked again at
  every delivery.
- GET /api/notification-channels/apprise-services describes each service
  from Apprise's plugin details: URL tokens as fields, options as
  advanced fields. A field is required only when every URL template
  needs it.
- A channel stores the service and its fields sealed; the URL is built
  from the template those fields fill at each send. Local schemas, the
  options that read files and the ones RomM sets are never offered.
  Apprise follows no redirects, does not retry and its timeouts are
  capped.
- The RomM JSON webhook keeps its payload and HMAC signature; its
  Discord and ntfy formats go, Apprise covers them. Email is unchanged.
- The v2 dialog picks the type from one searchable list and renders the
  service's fields, options folded under "Advanced options".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 09:01:39 +02:00
Georges-Antoine Assi
34c7bc60bf Merge pull request #4631 from LoneAngelFayt/streaming-patches-5
fix(streaming): bind every session action to the claim that owns it
2026-09-24 21:44:52 -04:00
Georges-Antoine Assi
f63424d2ef Merge remote-tracking branch 'origin/master' into streaming-patches-5
# Conflicts:
#	backend/main.py
2026-09-24 21:35:46 -04:00
Sam Dornan
b834b35cb4 chore(deps): bump fastapi to 0.141.1 and replace fastapi-pagination with a local page model (#4715) 2026-09-24 21:09:04 -04:00
Georges-Antoine Assi
8a33ccb35a Merge branch 'master' into streaming-patches-5 2026-09-24 21:01:09 -04:00
Georges-Antoine Assi
808239db37 refactor(streaming): generate the remaining streaming API types from the backend
The launch socket payloads, the 409 busy detail and the card-import answer
were hand-written in services/api/streaming.ts and could drift from the
backend models they mirror.

- Publish Socket.IO payload models into the OpenAPI components
  (utils/openapi.py), starting with the three streaming launch events.
- Raise the busy 409 from a ContainerBusyDetail model and declare it on
  the game and desktop claim routes.
- Derive MemoryCardImport from ClaimStreamingSessionRequest, and type the
  list and control calls with their generated response models.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 20:57:36 -04:00
Georges-Antoine Assi
5e7b17e257 Merge pull request #4763 from rommapp/feat/dev-proxy-target
feat(dev): DEV_PROXY_TARGET to run the frontend against a remote RomM
2026-09-24 20:57:15 -04:00
Georges-Antoine Assi
d5b4019d96 fix(dev): verify remote proxy TLS and document the OIDC limit (address Greptile review)
Remote DEV_PROXY_TARGET upstreams now keep certificate verification on,
since authenticated /api traffic flows through them. Loopback targets keep
secure: false as before. DEVELOPER_SETUP.md notes that OIDC sign-in cannot
complete through the proxy.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 20:53:20 -04:00
Georges-Antoine Assi
a63d67f539 Merge pull request #4746 from andest01/fix/oidc-stale-state-redirect
fix(auth): redirect instead of 500 when the OIDC callback is rejected
2026-09-24 19:52:21 -04:00
Georges-Antoine Assi
f41f412fbb test(auth): type the OIDC callback test client (address Greptile review)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 18:38:35 -04:00
Georges-Antoine Assi
a9d2f08b48 fix(streaming): narrow the heartbeat's named container for mypy (review-polish)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 17:55:15 -04:00
Georges-Antoine Assi
2eb2b5973e refactor(streaming): share the claim query params, mark-and-start the exit save pull in one call, and drop no-op casts (simplify)
- Declare the container and claimed_at query params once, with named length limits.
- Add lifecycle.start_exit_save_pull for the two callers that mark and start back to back.
- Build every claim query on the frontend through one claimParams helper.
- Drop PlayerState casts that narrowed nothing in the launch socket handlers.
- Reuse _load_session in the _drain test helper.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 17:49:59 -04:00
Georges-Antoine Assi
3a63f5c5c3 refactor(auth): tighten OIDC callback docstring and reuse cookie constant (pr-ready: simplify)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 17:45:14 -04:00
Georges-Antoine Assi
d99c3c5f7b fix(streaming): report a failed archive resume, stop duplicate stream entry, and fold emulator case in core checks (code-review)
- Exit-state emulators with no uploaded archive no longer send a resume slot or report resume=true.
- isCoreCompatible compares emulator ids case-insensitively, like grouping and labels.
- launch-ready skips enterStream when a status poll already entered the stream.
- A Desktop heartbeat answered after a release no longer overwrites the exited state.
- Drop the notice_in_scope alias, reuse session_is_desktop, trim over-long comments.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 17:43:30 -04:00
Georges-Antoine Assi
b658f2fe23 fix(auth): harden the OIDC callback rejection path (pr-ready: code-review)
- Catch AuthlibBaseError so rejected id_tokens (JoseError) redirect too
- Redirect to /login?bypass_autologin=true to avoid an autologin loop,
  and honor the flag on the v2 login page like v1 does
- Treat the kiosk guest as signed out on failure
- Log the provider-supplied error fields with repr()
- Cover provider errors, id_token errors, kiosk mode, and session survival

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 17:43:19 -04:00
Georges-Antoine Assi
d0cc8a4be5 Clarify DEV_PROXY_TARGET comment in env.template
Updated comment for DEV_PROXY_TARGET to clarify usage.
2026-09-24 17:22:40 -04:00
Georges-Antoine Assi
9f63a5abce feat(dev): DEV_PROXY_TARGET to run the frontend against a remote RomM
Setting DEV_PROXY_TARGET in .env points the Vite dev and preview proxies
(/api, /ws, /openapi.json) at another RomM instance and also proxies
/assets/romm there, since covers only come from the local symlink when
developing against the local backend. Unset keeps today's behaviour.

The Set-Cookie rewrite from the original proposal is not needed: RomM
never emits a Domain attribute, and browsers accept Secure cookies from
plain-http localhost.

Closes #4663

Co-Authored-By: Stuart Anderson <andest01@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 17:19:12 -04:00
Georges-Antoine Assi
8e5c913824 Merge pull request #4747 from rommapp/claude/vitest-version-check-xyo7ek
Upgrade vitest and @vitest/ui to v5
2026-09-24 17:17:07 -04:00
Georges-Antoine Assi
8ebdb18c8a Merge pull request #4729 from rommapp/claude/uvicorn-upgrade-decision-i7a2ok
build(deps): bump uvicorn to 0.53 and uvicorn-worker to 0.4
2026-09-24 17:08:36 -04:00
Georges-Antoine Assi
aba5a2e1e8 Merge pull request #4762 from rommapp/fix/rom-screenshot-cache-bust
fix(v2): version ROM file URLs with the file's own timestamp
2026-09-24 17:07:19 -04:00
Georges-Antoine Assi
3706905ea0 Merge remote-tracking branch 'origin/master' into fix/rom-screenshot-cache-bust 2026-09-24 17:00:32 -04:00
Georges-Antoine Assi
15e9db0e70 fix(v2): key the manual and walkthrough PDF viewers on their URL
Addresses Greptile's review on #4762: the PDF viewers were keyed on the
ROM's updated_at, so a file-only rescan changed the URL without
remounting vue3-pdf-app.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 17:00:23 -04:00
Georges-Antoine Assi
551497f34d Merge pull request #4761 from rommapp/perf/retroarch-sync-manifest
perf(sync): batch RetroArch manifest hashing and list PROPFIND paths unhashed
2026-09-24 16:58:18 -04:00
Georges-Antoine Assi
2679603e52 fix(sync): drop the removed remove_screenshot helper from RetroArch DELETE
#4749 replaced asset_store.remove_screenshot with release_thumbnail while
#3904 was in flight, so master fails to import the RetroArch sync router.
release_thumbnail keeps a screenshot its state still shows, but a
RetroArch DELETE of `<state>.png` asks for that exact file, so delete the
row and file directly, like the save and state branches.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 16:50:28 -04:00
Georges-Antoine Assi
76c1433355 fix(v2): version ROM file URLs with the file's own timestamp
Screenshots, library artwork, manuals and walkthroughs from the game folder
were cache-busted with rom.updated_at. A rescan that replaces one of those
files keeps its RomFile row and bumps only that row's updated_at, so the
browser kept serving the old bytes. Build the URL from the file's own
updated_at via a shared versionedRomFileUrl helper, and move romFileUrl
out of soundtrackTracks into the same module.

Found while reviewing #4512.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 16:48:33 -04:00
Georges-Antoine Assi
68a3e6b262 Merge remote-tracking branch 'origin/master' into perf/retroarch-sync-manifest 2026-09-24 16:47:05 -04:00
Zurdi
404518c5e0 Merge pull request #4749 from rommapp/claude/issue-2653-7225d5
feat: rename saves and states, and one public/private look across v2
2026-09-24 22:37:54 +02:00
Georges-Antoine Assi
bb9aa28ea6 chore(sync): review-polish pass on the RetroArch manifest perf work
Rename cached_md5s to cached_hashes, since it also caches PSP member
hash maps, and keep its docstring to one line.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 16:35:59 -04:00