The kiosk guest may PROPFIND the root and browse or download under
roms/, as it can in the web UI. The manifest, saves, states, blobs and
OPTIONS still challenge it, so RetroArch sends credentials.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Rewrite the RetroArch Cloud Sync architecture section: add the PSP,
kiosk, size cap and missing-file behavior, drop the stale hash note
- Document SYNC_RETROARCH_PSP_SERIAL_MAP in env.template and the env table
- Trim two docstrings and reuse CLIENT_DEVICE_IDENTIFIER for the device type
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
FSRetroArchSyncBlobHandler becomes FSRetroArchSyncHandler, and
SYNC_RETROARCH_BLOB_BASE_PATH becomes SYNC_RETROARCH_BASE_PATH, stored
under /romm/retroarch_sync.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Each manifest.server fetch creates the user's RetroArch device if it is
missing, or bumps its last_seen, so RetroArch shows up alongside the
user's other devices. RetroArch's requests carry no install identity, so
it is one device per user, deduped on client_device_identifier.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The manifest protocol is RetroArch's own, so name it after RetroArch
rather than its WebDAV transport, and group it with the existing sync
code: endpoints/sync/ becomes a package with the RetroArch router as a
subroute, and the handlers move under handler/sync/retroarch/. Settings
move into the SYNC config section as SYNC_RETROARCH_*.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Group the handler modules under handler/webdav_cloud_sync/ (sync_handler,
psp, emulator_names, browser) and rename the endpoint, blob handler, tests,
config settings, storage folders and cache keys to match. The route moves
from /api/cloud-sync to /api/webdav-cloud-sync.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Bound /api/cloud-sync uploads with the asset size limit
- Cap PSP bundle member count and uncompressed size
- Keep PSP writes and deletes on the existing bundle row, one member at a time
- Match PSP bundles by exact folder, support the no-core-folder layout
- Reject . and .. PSP segments; map parse_sfo struct errors and write
errors to 4xx
- Require ROMS_READ for roms/ browsing
- Clear missing_from_fs on overwrite
- Resolve state screenshots by exact name, never a gallery screenshot
- Round-trip unknown core folder names exactly
- Keep + allowed in the shared sanitizer, strip it only on ROM rename (#2746)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- A failed login keeps the attempted username only when it names an
account, so a password typed into the username box is never stored.
- Gunicorn trusts X-Forwarded-For only from loopback and private ranges
(FORWARDED_ALLOW_IPS, documented in env.template), so a client can no
longer choose the address the audit log and rate limits see.
- A player's fetch (purpose=play) is recorded as rom.player_load instead
of being skipped, so the marker can't hide a download.
- Play-session ingest treats a rom hidden from the caller as unknown, so
its session and rom.play event don't name it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Trim comments to what the code can't say, type the remaining test
fixtures, and document the audit_events table, GET /api/audit-events
and the cleanup_audit_log task in the backend architecture guide.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Bound a webhook delivery: 15 s in all, and only the first KiB of a
refusal's body is read, so a hostile endpoint can't hold the API or a
worker with an endless or slow reply.
- Key the confirmation-code cooldown per user and per address instead of
per channel, which a delete and re-create reset, so a user can't mail
an address without limit.
- Don't carry a stored secret to another origin or format: it has to be
given again (Discord, which uses none, drops it), so a changed URL
can't be used to read an ntfy token or HMAC key.
- Refuse a webhook URL whose port isn't a number; one got saved and then
broke the channel list with a 500.
- Refuse an unknown SMTP_SECURITY instead of logging in over plaintext.
- Tell the reset form whether reset links are really emailed, which also
needs a shareable ROMM_BASE_URL (heartbeat NOTIFICATIONS.EMAILS_RESET_LINKS).
- Say a code went out only when the address is new to the channel.
- Match a channel's address whole, so a trailing newline isn't kept.
- Test that forgot-password answers alike and sends the link afterwards,
and document the new cache keys.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous commit carried only the renames of this change, when staging
the rest failed on a path the rename had already moved. This is the change
itself.
A reset link only ever went to the server log, for an admin to pass on. It
now goes to the user's email address when SMTP is set up, the user has one
and ROMM_BASE_URL is shareable, falling back to the log otherwise or when the
server refuses the message. The link is built from ROMM_BASE_URL alone, never
the request's Host, so a forged header can't aim it at another server; it
goes out after the response, so its timing doesn't reveal whether the
username exists; and a user's inbox gets at most one a minute.
The SMTP sender moves from the notification channels to
handler/email_handler.py now that it has a second caller. The v2 reset form
says the link is on its way when the server sends email.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Trims the comments the earlier passes left long or unwrapped, and documents
the shared `socket_handler.emit_to_user` and the netplay channel split in
the backend architecture notes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Notifications could only come from backend code, and only in the kinds the
web client knows how to translate. Anyone can now send one that carries its
own text.
- A notification can carry its own title, body, icon and in-app link. RomM's
own kinds stay translated; `custom` and any other kind (`argosy.sync_done`)
is shown with its own content.
- POST /api/notifications: anyone with me.write notifies themselves; an admin
can also notify user ids, `admins` or `all`, and is shown as the sender.
RomM's own kinds are reserved, links must stay inside RomM, and `data` is
capped at 4 KB.
- notify()/notify_admins() accept the same title/body/link/icon.
- Frontend: `snackbar.success(msg, { persist: true })` (or
`{ persist: { body, link } }`) also keeps the message in the inbox. The
first of the request's answer or the socket push shows the toast, so it
appears once.
- Documented in BACKEND_ARCHITECTURE and the backend and frontend skills.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep `typecheck` to vue-tsc and move the tsconfig.node.json pass to
`typecheck:scripts`, run as a separate CI step so a failure names the
pass that broke. Drop the JSON-invalid comments from tsconfig.node.json.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
dpdm cannot resolve or parse Vue SFCs, so it saw none of the ~519
components: `.vue` imports were dead ends and the graph stopped at the
first one. `import-x/no-cycle` runs on the ESLint config that already
parses `.vue` with type awareness, and Trunk already runs ESLint in CI,
so the check needs no separate tool, config file or CI step.
Lazy route components make the router reachable from the views it
renders, so dynamic edges are excluded; without that the rule reports
390 files instead of the real 3. Those 3 are the frozen-v1 `src/console`
cycles dpdm also found, so the two tools agree on today's graph and the
swap is not a cleanup.
Drop the `circular` script, `dpdm.config.ts`, the `@dpdm-ignore`
directive and dpdm itself.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
code-review pass.
dpdm cannot parse Vue SFCs, so the four entry points only reached 133 of
the frontend's modules: every `.vue` import was an unresolved dead end and
traversal stopped there. Make every `.ts` module an entry instead, which
brings the analysed graph to 771 modules. Frozen v1 `src/console` is carved
out because it still holds cycles we are not refactoring.
Take `ROUTES` and `isAuthExemptRoute` from the leaf module statically, and
keep only the router instance lazy. Guard the dynamic import so a failed
chunk load still rejects with the original AxiosError.
Move the `getDownloadPath` tests next to the module that now owns them.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The overview table in docs/FRONTEND_ARCHITECTURE.md conflicted: master
updated the Vue row to 3.5 and re-wrapped the column, this branch bumped the
TypeScript row. Resolved by keeping master's table and carrying the
TypeScript 5.9.3 bump into it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvDZhPHsNguuX5zqFjDfSD
vue-tsc 2.2.x runs on the old Volar core; 3.x cuts a full typecheck of the
196k-LOC frontend from 47.2s to 36.1s with no new diagnostics.
The declared TypeScript floor of ^5.7.3 already resolved to 5.9.3, so raising
it to ^5.9.3 only makes the constraint honest and satisfies @vue/tsconfig
0.9's `typescript >= 5.8` peer.
erasableSyntaxOnly makes the existing style a compiler rule: Vite strips types
with esbuild, so enums, namespaces and parameter properties would not survive
the transform. The codebase already has none, and the flag reports 0 errors.
TypeScript 6 and 7 are deliberately not taken. 7.0 is the native port and
drops the JS compiler API, which both vue-tsc and typescript-eslint still
require, so each fails to start under it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvDZhPHsNguuX5zqFjDfSD
* fix(a11y): translate the v2 primitives' own control labels
The library hard-coded 20 English strings for controls a primitive
renders on its own behalf, so screen-reader users heard English in every
locale: close on RDialog/RDrawer/RCarousel, remove on RChip/RSelect/
RComboboxField, clear on RTextField/RSelect/RComboboxField/RDateField,
RDateField's picker toggle and four month/year steppers, plus the
visible "Today" and "All" text.
The overridable-prop pattern was already there and had already failed:
RCarousel's closeLabel/prevLabel/nextLabel and RDateField's
clearLabel/todayLabel defaulted to English literals and no call site
ever passed one. Extending it would have made translation depend on
roughly 130 call sites each remembering to pass a label for a string
that is identical at every one of them.
Instead the app provides one bundle and every primitive reads it through
useChromeLabels(). The provider hands over getters that resolve via
i18n, so they run inside the reading component's render effect and a
locale switch re-renders the labels with no refs to unwrap. inject is
plain Vue, so lib still imports no i18n, and the English defaults keep a
bare mount rendering an accessible name. The existing label props stay
as per-instance overrides, now defaulting to undefined so they resolve
through the bundle.
Reuses common.close, common.clear, common.remove and common.all; adds
eight common.* keys across all 18 locales for the date-field steppers
and carousel navigation. setup.previous/next were left alone: they are
wizard step semantics ("previous step", "back"), not item navigation.
Storybook provides the same bundle, so stories exercise the real path.
Two tests guard the decay this had already suffered once: that an
injected bundle reaches a primitive's aria-label, and that every label
resolves to a real translation in every locale.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ENyaGKiTZiwPGH7qyN4iMe
* refactor: tighten the chrome-label comments and use import.meta.url
Condense the module header and the test's header to the repo's comment
limit, and derive the locales directory from import.meta.url rather than
__dirname, matching the review feedback on #4619.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ENyaGKiTZiwPGH7qyN4iMe
* fix(a11y): cover RAlert and RSteps, and test the real locale switch
RAlert's close button and RSteps' stepper name were missed on the first
pass: RAlert writes its label as a bound string literal
(:aria-label="'Close'") and RSteps builds "Step 2 of 5" from a template
string, neither of which the plain aria-label="Text" scan matched. Both
now read the injected bundle, which gains a step(current, total) member
backed by common.step-of across all 18 locales.
The locale-propagation test previously flipped a local variable and
called $forceUpdate, which only proved a getter re-reads on render. It
now mounts against createChromeLabels(), switches i18n.global.locale and
asserts the rendered label changes on its own, so it exercises the path
the app actually uses. RAlert and RSteps get assertions of their own.
Wrap the new skill bullet so it stops adding a markdownlint line-length
violation, and drop three comments that only restated the ?? beside them.
Reported by Copilot (RAlert) and Greptile (test, comments) on #4620.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ENyaGKiTZiwPGH7qyN4iMe
* fix(a11y): put RDateField's combobox role on its focusable input
The role sat on the field's wrapper div, which is not focusable and had
no aria-controls, so the two accessibility lints on it were right:
assistive tech saw a combobox it could not reach and that pointed at no
popup. The previous comment explained why the role could not go on
RTextField, and it was accurate: RTextField binds $attrs to its outer
element, which becomes a <label> when it owns the visible label, where
the role is disallowed.
So give RTextField a typed `popup` prop that lands role="combobox",
aria-haspopup, aria-expanded and aria-controls on the native input,
where ARIA 1.2 wants them. A single object prop rather than an attribute
bag keeps arbitrary attributes off the input. RDateField passes it,
drops the role from the wrapper (keeping the keydown handler, which is
what the wrapper is actually for) and gives the teleported panel a
useId() so aria-controls resolves.
The wrapper never was a tab stop, so no tab order changes: the input it
delegates to is the same element that now carries the role.
Covers the two vuejs-accessibility errors that eslint reported against
this file on master; src/v2/lib is now lint-clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ENyaGKiTZiwPGH7qyN4iMe
* fix(a11y): make popup and multiline exclusive, and tighten comments
The new `popup` prop rendered its combobox attributes only on the
<input> branch, so a caller that also set `multiline` type-checked but
got a plain <textarea> with none of the role, expanded state or popup
association it asked for. Binding them to the textarea instead is not an
option: ARIA in HTML allows no role override on <textarea>, so
role=combobox there would be invalid. The conflict now reports itself
through console.error rather than dropping the ARIA in silence, and the
prop documents the single-line constraint.
Adds RTextField.test.ts covering all three cases: the role landing on
the input while the <label> outer element stays clear of it, no
combobox attributes when the prop is absent, and the conflict being
reported.
Also drop a sentence recording what the code used to do, which CLAUDE.md
rules out, and shorten the RDateField template comment.
Reported by Greptile (both P2) on #4621.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ENyaGKiTZiwPGH7qyN4iMe
* chore(deps): declare the Vue 3.5 floor the code already requires
useId lands in Vue 3.5 and RComboboxField has been calling it on master,
so the declared ^3.4.27 range understated the real minimum: a resolution
inside 3.4 would fail to build. The lockfile already pins 3.5.29, so
this only corrects the manifest and changes no resolved version.
RTextField carried a comment claiming the project was "on 3.4 still",
which is what made useId look like a regression in review; it is gone,
and the architecture doc's framework row now matches.
Also stop advertising aria-controls while the picker is closed. The
panel is v-if'd, so the input pointed at an element that was not in the
document; `controls` is now optional and RDateField passes it only while
the panel is mounted, with the closed state asserted.
Reported by Copilot on #4621.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ENyaGKiTZiwPGH7qyN4iMe
* refactor: drop a comment recording what the code used to do
The describe name already states what the block verifies, and the rest
was change history, which CLAUDE.md rules out.
Reported by Greptile on #4620.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ENyaGKiTZiwPGH7qyN4iMe
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
The vite plugin parsed the COOP/COEP patterns out of the nginx template at
config load, but the Dockerfile's frontend-build stage copies frontend/
alone, so the config threw ENOENT and the image build failed.
Restate the two patterns in the plugin and let its test assert they still
match the template's map, which also drops the dev container mount that
existed only to feed that read.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The dev server now parses the isolated URLs out of the nginx template
instead of restating them, and refuses a template that yields none.
js-dos skips the runtime preload on the leg it is about to reload away,
records its play session on pagehide, and takes the relaunch marker from
the composable that defines it.
Also drops a redundant parameter and a duplicated derivation from
applyLaunchIntent, collapses the repeated id checks in isLaunchIntent,
gives the js-dos asset bases one home, and trims the comments.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A full navigation out of the player aborts the route change, so the leave
guards below the view never run and the v1 player's pending save was lost.
`usePlayerExit` now settles the departing document first, and EmulatorJS
asks the v1 `Player` for its flush there.
js-dos reached its view by SPA navigation without cross-origin isolation,
although the DOSBox-X backend is a threaded build and nginx has always
isolated its URL. It now relaunches into an isolated document the way
EmulatorJS does, so the view still opens without a page load.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Findings from the review pass over the SPA launch change, plus the two bot
reviews on the PR.
Correctness:
- Presence stops were addressed to the device, not to a rom, so a view that
never announced anything could clear what another tab was playing. A stop now
needs a started session, and happens once; `useActivityPresence` grows the
`stop()` the two call sites were spelling out by hand.
- The EmulatorJS exit read `window.EJS_emulator`, which a departure taken while
the loader was still injecting would not see yet, so the runtime could be left
in a document a later launch then failed to load into. It tracks the injection
itself.
- js-dos resolved its asset base per view: a second launch in a document whose
runtime came from the CDN looked for the payloads locally. Two views mounting
at once could also both inject the runtime. Both now go through one
document-level loader, which resolves with the base it served from and lets a
later mount retry a failed load.
- A blocked sessionStorage threw while every EmulatorJS view was initialising.
Storage that cannot be read is an absent intent, and one that cannot be
written cancels the relaunch rather than losing the selection to it.
- Outside a secure context the headers cannot expose SharedArrayBuffer, so the
reload only delayed the same error by a round trip. It is refused up front.
- The dev server mirrored one of the two nginx isolation entries, leaving the
console player unisolated there.
Reuse and cover:
- `usePlayerExit` owns the whole rule again: `departing` moved in, so both views
use `guard` rather than one of them restating it, and the `leaving` flag it
never needed is gone.
- Resolving an intent back into a selection is a pure pair in `launchIntent.ts`
with its own tests, rather than closures the view kept to itself.
- The Vite plugin is a script beside `precompress`, so the regexes that have to
track nginx are tested.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R1VFUvsR5wYK3axxR1gebc
Play navigated to the EmulatorJS and js-dos launch views with a full document
load, because only a directly loaded player URL carries the COOP/COEP headers
nginx attaches to it, and only a cross-origin isolated document exposes the
SharedArrayBuffer that threaded cores need. Every launch paid that reload,
while only three cores (dosbox_pure, ppsspp, azahar) need threads, and js-dos
8.4.1 does not reference SharedArrayBuffer at all.
Both views are now reached by SPA navigation with the cover morph, like the
PICO-8 and Ruffle views. When a threaded core is booted without
SharedArrayBuffer, useIsolatedLaunch keeps the pre-play selection in
sessionStorage and reloads the view into the isolated document, where it
boots straight away; a second miss reports the insecure context instead of
looping. Adding a threaded core is one entry in areThreadsRequiredForEJSCore;
another player that needs isolation uses the same composable.
Leaving a player view is a full navigation whenever the document is isolated,
since the rest of the app cannot embed third-party images under that policy
(provider covers in Match ROM, see #4522), and whenever the EmulatorJS runtime
was injected, which declares globals a second injection would clash with.
usePlayerExit holds that rule for both views; js-dos also injects its runtime
once per document. EmulatorJS closes the play session on pagehide as well,
since the full navigation unmounts nothing.
The Vite dev server mirrors the nginx header map for the player URLs.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R1VFUvsR5wYK3axxR1gebc
Follow-up to #4548 from the code-review pass. Stats a 5.2.0 release
stored under `platform_id` are widened to `platform_ids` when a job is
reported, so listing old finished cleanups validates again. The live
worker check moves next to the queues as `has_live_worker`, with its
own tests, and the endpoint names the queue it enqueues on so the check
and the enqueue cannot drift apart. The cleanup tasks return the typed
stats the response schemas declare. The developer setup points the RQ
commands at the backend's own Redis settings through `-c config`, and
the architecture doc mentions the 503.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F9ta8rXUTP9aMdatPYKX4K
Entry and exit failures are not the same. A rejected request is a denial
and the stage just stays windowed, but callers exit before opening a
body-teleported dialog, so a failed exit leaves that dialog painted over
by the stage with nothing said. The shared wrapper discarded both.
Uses console.error rather than the console.warn this replaced, which v2
does not allow to ship.
Also drops indexdb-monitor.ts from the frontend architecture doc's source
tree, which still listed the deleted file.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Uo885XxwhN8wfC4oCtR48
The cover search dialog only reached SteamGridDB, so a PC game whose
capsule lives on Steam had no way to pick it up short of a full
re-match. Steam now joins SteamGridDB behind `GET /search/cover`,
ordered by the configured cover priority, and each result carries its
provider so the dialog can filter by source and credit the artwork.
The Steam handler builds the picker from the store search alone and
probes the CDN for the portrait capsule and the landscape header under
the same budget the match picker uses, so a slow CDN costs thumbnails
rather than the dialog. Hits with no artwork are dropped.
A failing provider costs only its own covers; a rejected SteamGridDB
key is still reported, since that is the user's to fix. The "search
cover" action in the edit dialog now opens whenever either provider is
enabled, and the game overview credits Steam-hosted covers.
The resource shape the picker consumes moves to the shared base handler
as `CoverResource` / `CoverResult`, since it is no longer SteamGridDB's
alone.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Untv32z88QMZ2yRSsTgGcC
Three more inaccuracies, all raised in review:
The patterns skill still described useSocketEvent as debt with consumers
wiring socket.on/off by hand, contradicting the debt entry removed in
54fce62. The composable has five consumers and no raw socket.on/off call
remains in v2, so the section now documents it as the mechanism.
The overlay diagnostic told the reader to check the teleport target is
body. Since the scope classes sit on <html>, any in-document target
inherits them; the real failure mode is a detached node.
The architecture doc's scope banner said v2 uses no Tailwind, which
contradicted the CSS Stack note directly below it: console/index.css
imports Tailwind and main.ts loads it app-wide. v2 uses no Tailwind
utility classes; the stylesheet is still in the bundle.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LnHWknZwwZcm89JuXjrugK
The v2 skills described a Vuetify-backed component layer that v2 no longer
has: src/v2/ contains zero `from "vuetify"` imports and zero `<v-*>` tags.
Agents following the skills would write code against a layer that is gone.
Corrected across the four frontend-v2 skills:
- layout guidance (Vuetify utility classes) now describes scoped CSS + tokens
- wrapper contract reframed around attribute forwarding, not Vuetify wrapping
- RForm wraps a native <form>, not v-form; rules are plain functions
- RVirtualScroller is a custom windowed list, not a v-virtual-scroll wrapper
- overlay scope rationale now cites the primitives' own Teleport to body,
and drops the RDialog .v-overlay__content override that no longer exists
- scroll restoration describes the scrollRestoration store actually in use
Also dropped four Known debt entries that are implemented and wired
(virtualisation migration, useGalleryFilterUrl, scroll restoration,
useSocketEvent).
FRONTEND_ARCHITECTURE.md documents v1 only but never said so, reading as
repo-wide. Added a scope banner pointing at the v2 skills, marked the
Vuetify/Tailwind rows v1-only, corrected the Tailwind version to 4.3.1,
and noted that the Tailwind import lives in console/index.css which
main.ts loads app-wide.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LnHWknZwwZcm89JuXjrugK
Add an `emulatorjs.default_cores` block mapping a platform slug to the
core the player preselects for it, so an instance can run DS software on
DeSmuME and DSi software on melonDS without every user picking a core on
every device.
The player resolves its core from the game's remembered core, then the
platform's, then the configured default, then the platform's first
supported core. Each candidate is checked against the cores the platform
actually supports, so an unknown platform or core falls through.
Playing no longer writes the resolved core back to local storage unless
the user picked a different one, so changing the configured default
reaches devices that never made a choice.
Closes#4434
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Drop the `0` to `-1` remap and hand SQLAlchemy whatever the operator set,
so the knob means exactly what the pool means by it. `-1` is now the
documented way to never recycle, in both `env.template` and the env var
table.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The engine sets `pool_pre_ping` but no `pool_recycle`, so a connection
the database closed for being idle is still handed out, and the ping on
that half-closed socket blocks the worker until TCP gives up: tens of
seconds to minutes of an unresponsive API for every request that draws
it, while a fresh connection to the same server answers instantly.
Default to 300s, under the lowest `wait_timeout` MariaDB is commonly
configured with, and make it settable.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Add v2 browser playback for .p8 and .p8.png cartridges, backed by the
FAKE-08 WebAssembly runtime, with canvas rendering, audio, fullscreen and
keyboard, gamepad, mouse and touch input. Wires up platform detection,
play actions, routing, localization, gallery navigation, play-session
tracking and lifecycle cleanup.
The runtime is fetched in the emulator stage of docker/Dockerfile, pinned
by source commit and verified with sha256, so it is provisioned the same
way as EmulatorJS, Ruffle and js-dos rather than committed to the repo.
DISABLE_PICO8 gates the player, matching the existing DISABLE_EMULATOR_JS,
DISABLE_RUFFLE_RS and DISABLE_JSDOS toggles.
Based on #4383.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Resolve semantic conflicts with master:
- `zip_cache._ensure_zipfile_writable` is now public `ensure_zipfile_writable`.
- `get_saves()`/`get_states()` take `rom_ids` instead of `rom_id`.
Also ignore the cloud-sync test artifact directories.
`filesystem.structure` now spells out the whole layout rather than only the part
below a platform folder. A template is relative to the library root, `{platform}`
marks the platform folder, and `{game}` marks where a game begins.
Merge `{gameFile}` and `{gameDir}` into one `{game}` terminal. The information a
terminal carried was the depth, not the kind: at a declared level a file is a
game of its own and a folder is one multi-file game, which a stat answers. That
drops the two-template idiom for a level holding both, and `_discover_default_roms`
with it, since the default scan is now just `roms/{platform}/{game}`.
Retire the auto-detected `{platform}/roms` layout, along with
`filesystem.roms_folder` and `filesystem.firmware_folder`, which named one path
segment each that a template now contains. Both are refused at startup with the
template that reproduces the layout, so an instance that relied on either says so
instead of scanning an empty library and marking every rom missing. Firmware gets
its own `structure.firmware` key rather than following the rom layout implicitly.
`get_roms_fs_structure` keeps meaning the folder a platform's games start in, so
the `.physical` sentinel paths already in the database still resolve. Per-platform
overrides have to agree with `default` on where the platform folder sits;
relocating one platform needs platform discovery and the watcher to union several
roots, which is left out.
The setup wizard reports `library_ready` plus the configured template instead of
a `struct_a`/`struct_b` discriminator, so the banner shows the layout in force
rather than guessing it client-side.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Hashing 1.96 GiB of real ROM files is 2.2x faster at 4 concurrent
workers than at 1 (108 -> 240 MiB/s on 16 cores, 108 -> 264 MiB/s
pinned to 4 cores). Pinned to 2 cores it is still 1.6x, so the new
default costs nothing on small hosts.
Metadata providers cap themselves independently of this value, so the
extra workers queue rather than exceed an allowance: ScreenScraper holds
a concurrency limiter set to the account's advertised thread count, and
the other adapters pace their own request rate. Database work in the
scan path is synchronous on the event loop, so it serializes regardless
and the connection pool is unaffected.
The compose example advised one worker per CPU, which overshoots on a
large host. Both it and env.template now say what raising this actually
buys, since metadata is paced no matter how many workers there are.
Only installs that never set SCAN_WORKERS move; any explicit value is
preserved.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Frontend system folders such as gamecube, megadrive or n3ds only became
RomM platforms after the user copied a 100+ line system.platforms map into
config.yml. A built-in alias table now covers the folder names those
frontends use, seeded from the two example configs and cross-checked
against the upstream system lists.
Resolution order is unchanged for existing users: config bindings and
versions win, a folder name that already is a slug keeps matching itself,
and only then is the alias table consulted. The two call sites that
resolved folder names by hand share one resolver.
The example configs shrink to genuine overrides. The Batocera example
also mapped odyssey2 to the original Odyssey; the alias points at
Odyssey 2.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A quick scan skipped every rom it already knew, so a file dropped into a
game folder went unnoticed until a complete or hashes rescan. This branch
answered that with a seventh scan type; letting quick reconcile the files
of the roms it knows says the same thing with less to learn.
Quick now visits every rom. New ones take the metadata pipeline as
before; existing ones only have their files reconciled against disk,
keeping the stored hashes of files whose size and mtime are unchanged. No
provider is contacted for an existing rom, so quick no longer needs a
metadata source picked, in the scan view, the platform dialog and the per
rom refresh alike.
The watcher schedules a quick scan again, and the per rom "Refresh files"
action sends quick scoped to that rom.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>