* feat(player): play RPG Maker 2000/2003 games in the browser with EasyRPG
Embed the EasyRPG web player for extracted game folders on the rpg-maker
platform. The backend generates the player's index.json from the scanned
files and merges in the free EasyRPG RTP under every name the official
and fan RTPs give its assets, so games that lean on the RTP find them.
In-game saves sync with the user's RomM saves through the player's
IndexedDB storage.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(easyrpg): read the free RTP from a fixed path instead of an env var
The full image always keeps the RTP at /var/www/html/assets/easyrpg/rtp,
so the path is a constant beside the web path nginx serves it under. The
dev container links its copy there at startup.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(easyrpg): code-review fixes for the save sync and asset endpoint
- Wait for an in-flight push before the quit push, so the newest save uploads
- Keep Play disabled until the fresh rom (and its saves) is fetched
- Stop onPlay and the rom fetch from acting after the view unmounts
- Leave through usePlayerExit like the other players
- Handle a rejected IDB commit when the run itself fails
- Track uploads by the browser's file name
- Load only visibility and files per asset request, not the full rom
- Serve DEV_MODE files as octet-stream, matching nginx
- Make the traversal test actually reach the endpoint
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(easyrpg): simplify pass over the player and asset endpoint
- Load only file paths per asset request, and look up RTP folders in O(1)
- Reuse RomFile.file_name_for_download and usePlayerFullscreen
- Share one dev/prod serve helper for game and RTP files
- Derive the save sync's game key from the rom
- Have the RTP table tool reuse normalize_name
- Make save-module internals private and tidy the prepare/read loops
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(easyrpg): flag RPG Maker game folders on the rom schemas
Gallery lists carry no files, so the frontend guessed that every multi-file
rom on the rpg-maker platform was playable, including RPG Maker XP/VX/MV
folders. Rom now has a deferred `is_easyrpg_game` subquery (an RPG_RT.ldb at
the folder root), loaded with the other gallery file stats and derived from
loaded files on the with_files path, and the frontend reads it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(easyrpg): drop server save sync, keep saves per user in the browser
Server sync moves to a follow-up that puts the web players on device sync.
Saves now stay in the player's IndexedDB, as js-dos does, with the same note
on the start page. The player is launched as `<rom id>-<user id>` so each
RomM account sharing a browser profile keeps its own saves; nginx and Vite
drop the user id when routing to the backend.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(sync): let a client ask negotiate to restore the saves it lost
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(saves): sync web player saves as a browser device
A shared layer for the in-browser players: each browser profile registers
as a sync device, keeps every account's saves in its own IndexedDB store,
negotiates them with the server at launch (restoring any it lost), and
pushes changes with the device's conflict guard. Hashes match the server's,
including its zip-entry hash.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(emulatorjs): save as the browser's sync device, with the slot guard
EmulatorJS now uploads and downloads as this browser's registered device
instead of the IP-based login device, confirms downloads with their hash, and
lets a write that continues the slot's head be refused when another device
wrote the slot since; that progress is archived and the session keeps
writing to the archive.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(settings): list, rename, pause and remove your devices
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(player): sync EasyRPG, js-dos, PICO-8 and Ruffle saves with RomM
Each player's own storage is restored from the browser's synced copy before
boot and captured back during play and on leave:
- EasyRPG: its IDBFS saves, one slot per in-game slot
- js-dos: its changes zip through fsChanges pull/push, migrating saves it
kept in OPFS before
- PICO-8: cartdata files, flushed by loading a blank cart on leave
- Ruffle: the game's SharedObjects zipped into one save, kept out of
localStorage between plays so accounts don't share them
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(easyrpg): address Greptile review
- Start timing the play session once the player page loads
- Use object-form props in the view test's button mock
- Keep the RTP table tool's docstring to one sentence
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(saves): address Greptile review on web device save sync
- Remove EasyRPG save files that sync deleted, so the game cannot load them
- Keep the stale-device guard on device sync's page-close uploads
- Restore only the Ruffle SharedObjects the current SWF can reach
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(saves): code-review pass on web device save sync
Restore master's EasyRPG RTP table path lost in the merge, serialize
DeviceSaveSync pushes, only mark a no_op synced when the server hash
matches, forget the browser device when it is removed, close a late
EasyRPG IndexedDB connection, send content_hash on unload updates, and
share the IndexedDB helpers and slot-conflict check.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(saves): simplify pass on web device save sync
Archive conflicts through uploadArchivedSave and isSlotConflict, skip
hashing unchanged bytes, share bytesEqual from saveSync/hash, pass
restore_unlisted from DeviceSaveSync, use newest() for the EmulatorJS
slot head, and trim one-off Ruffle and PICO-8 helpers.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(saves): review-polish pass on web device save sync
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* docs(saves): humanizer pass on web device save sync comments
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(saves): open every player IndexedDB through openDb
The save sync store now rejects when another tab blocks its upgrade
instead of waiting forever, as the EasyRPG and pending-asset stores
already did.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(sync): let negotiate scope server saves to the client's emulators
A browser player's saves load only in that player, so a native save in
the same slot must not pair with it or download into it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(saves): register the browser device on each launch
Registration returns the existing device, so calling it every time
brings back a device removed from any browser, which EmulatorJS
otherwise kept sending as a dead id. The cached id now serves only when
offline. DeviceSaveSync also negotiates within its own emulator.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(player): share web player save sync through useDeviceSaveSync
The coalesced polled push, the flush before leaving, the page-close
capture and the discard prompt live in one composable, and the player
suites share one DeviceSaveSync fake from test-utils.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(saves): update one archive per slot after another device takes it
A slot refused mid-session archived every later write as a new save.
Later writes now update that archive in place, page-close sends
included, and the next launch settles the slot.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* perf(ruffle): skip unchanged polls and upload saves every 5 minutes
Polls compare the stored SharedObjects with the last read before zipping
them, and keep what changed in the browser, uploading it at most every
5 minutes. Leaving and page close still upload at once.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* perf(ruffle): sync saves like EmulatorJS, polling every second
Polls compare the raw stored strings, so an idle second decodes,
zips and hashes nothing. A change uploads once two polls agree on it,
and a failing upload backs off from 2 to 30 seconds through the retry
backoff EmulatorJS uses, now shared from saveSync. Leaving still
uploads at once.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(v2): scope stored preferences to the signed-in user
Preferences in localStorage were shared by everyone using the same
browser, so one person's gallery layout, scan providers, chosen cores
and so on carried over to the next account. useUserLocalStorage stores
them under `user:<id>:<key>` while someone is signed in, and under the
bare key while signed out. The first user to sign in after this change
claims any unscoped value, so existing preferences carry over once.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(v2): address Greptile review on user-scoped storage
- Scope the core, BIOS and disc keys the shared EmulatorJS player writes
(and v1's matching reads), so a game start no longer leaves bare keys
for the next user to claim.
- Build the test user with userFixture.
- Trim the helper's header comment.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(v2): store the jukebox session under the user's storage key
The resume session now goes through userStorage like the other stored
preferences, so each user gets their own key instead of one shared key
carrying a userId to check on restore.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(v2): lint against storage that isn't scoped to the user
Adds romm/no-unscoped-local-storage, which rejects raw localStorage and
vueuse's useLocalStorage/useStorage outside frozen v1, so new stored
preferences go through useUserLocalStorage/userStorage. The locale read
at module load stays unscoped with an inline disable.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(player): play RPG Maker 2000/2003 games in the browser with EasyRPG
Embed the EasyRPG web player for extracted game folders on the rpg-maker
platform. The backend generates the player's index.json from the scanned
files and merges in the free EasyRPG RTP under every name the official
and fan RTPs give its assets, so games that lean on the RTP find them.
In-game saves sync with the user's RomM saves through the player's
IndexedDB storage.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(easyrpg): read the free RTP from a fixed path instead of an env var
The full image always keeps the RTP at /var/www/html/assets/easyrpg/rtp,
so the path is a constant beside the web path nginx serves it under. The
dev container links its copy there at startup.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(easyrpg): code-review fixes for the save sync and asset endpoint
- Wait for an in-flight push before the quit push, so the newest save uploads
- Keep Play disabled until the fresh rom (and its saves) is fetched
- Stop onPlay and the rom fetch from acting after the view unmounts
- Leave through usePlayerExit like the other players
- Handle a rejected IDB commit when the run itself fails
- Track uploads by the browser's file name
- Load only visibility and files per asset request, not the full rom
- Serve DEV_MODE files as octet-stream, matching nginx
- Make the traversal test actually reach the endpoint
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(easyrpg): simplify pass over the player and asset endpoint
- Load only file paths per asset request, and look up RTP folders in O(1)
- Reuse RomFile.file_name_for_download and usePlayerFullscreen
- Share one dev/prod serve helper for game and RTP files
- Derive the save sync's game key from the rom
- Have the RTP table tool reuse normalize_name
- Make save-module internals private and tidy the prepare/read loops
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(easyrpg): flag RPG Maker game folders on the rom schemas
Gallery lists carry no files, so the frontend guessed that every multi-file
rom on the rpg-maker platform was playable, including RPG Maker XP/VX/MV
folders. Rom now has a deferred `is_easyrpg_game` subquery (an RPG_RT.ldb at
the folder root), loaded with the other gallery file stats and derived from
loaded files on the with_files path, and the frontend reads it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(easyrpg): drop server save sync, keep saves per user in the browser
Server sync moves to a follow-up that puts the web players on device sync.
Saves now stay in the player's IndexedDB, as js-dos does, with the same note
on the start page. The player is launched as `<rom id>-<user id>` so each
RomM account sharing a browser profile keeps its own saves; nginx and Vite
drop the user id when routing to the backend.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(easyrpg): address Greptile review
- Start timing the play session once the player page loads
- Use object-form props in the view test's button mock
- Keep the RTP table tool's docstring to one sentence
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(easyrpg): keep the RTP table in a fixtures folder
Matches handler/metadata/fixtures, where the other bundled data files live.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* perf(frontend): load md-editor on demand instead of with the app
md-editor's config() ran from the app entry, which kept the library in
the entry's import graph. A Vite and Vitest alias now routes every bare
md-editor-v3 import, v1 included, through plugins/mdeditor.ts, which
applies the XSS config as a side effect of the first load. The
sanitizer stays on for every caller without an entry import.
ChangelogDialog (mounted on every v2 page) and NotesTab imported
MdPreview and MdEditor statically. They now load them through small
MarkdownPreview and MarkdownEditor wrappers with defineAsyncComponent,
so md-editor and CodeMirror download when a note or the changelog is
shown, and the editor only when editing starts.
Based on the lazy-loading approach from #4988 by @andest01.
* fix(storybook): keep the app's alias array when adding @ and @v2
Addresses Greptile: spreading the app's alias array into an object turned
it into numeric keys, so Storybook lost the md-editor-v3 alias and with
it the XSS config.
* refactor(frontend): address code-review findings
- Share one alias list between vite, vitest and (through vite.config.js) Storybook.
- Re-export MdEditor and MdPreview from typed modules instead of wrapper SFCs, so callers keep prop and v-model type checks.
- Block deep md-editor-v3 imports in ESLint, since they would skip the XSS config.
- Pass no-echarts where notes and the changelog render, so md-editor does not fetch echarts from unpkg.
* refactor(frontend): simplify the shared md-editor module
Simplify pass:
- Merge the editor and preview re-exports into one shared/markdown module; both pulled the same md-editor chunk and stylesheet.
- MarkdownViewer imports MdPreview from it too, and gets no-echarts like the other v2 previews.
- Drop the ESLint ignore for mdeditor-dist.d.ts, which has no deep import.
* style(frontend): trim the shared md-editor module comment (review-polish)
* fix(frontend): keep the md-editor preview and editor in separate modules
The simplify pass merged them into one module, which put MdEditor and CodeMirror in the preview's chunk: the changelog and note previews went from 78 KB to 290 KB gzip. MarkdownViewer keeps using the shared preview module.
* feat(frontend): show a spinner while the note editor loads
* fix(frontend): cover md-editor chunk loads with the existing spinners (code-review)
ChangelogDialog waits on the renderer chunk with the releases fetch, so a
load failure lands in the dialog's error state instead of blank bodies.
NotesTab's preview gets the same loading spinner as the editor. Document
the @v2 and md-editor-v3 aliases.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(frontend): share the async md-editor components (simplify)
Define the async MdPreview/MdEditor wrappers and their attr-dropping
spinner once in shared/asyncMarkdown.ts instead of per NotesTab instance
and again in ChangelogDialog. Keep the md-editor alias out of the tsconfig
paths block in the architecture doc.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(frontend): let TypeScript follow the md-editor-v3 alias
Only Vite knew about the alias, so go-to-definition on md-editor-v3 opened
the package types instead of src/plugins/mdeditor.ts, where the sanitizer
config lives. A tsconfig path now points there too.
* refactor(frontend): turn off md-editor's CDN renderers once for v2
The shared markdownPreview/markdownEditor modules wrap the components with
noHighlight, noKatex, noMermaid and noEcharts, so v2 call sites no longer
repeat the flags and a new one cannot miss them.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* perf(frontend): keep the inactive UI and the markdown renderer out of the first load
vue-router fetches every named view of a route before entering it, so a v2 visit also downloaded the v1 view tree. The inactive UI's views are now deferred until rendered. The changelog dialog, mounted on every v2 page, loads md-editor-v3 on first open.
* perf(frontend): set up Storybook annotations only for the story test
Every vitest file paid for the Storybook preview (full Vuetify and the Storybook runtime) though only storybook.test.ts renders stories.
* fix(frontend): address pr-ready code review
* style(frontend): pr-ready polish
* docs(frontend): pr-ready humanizer pass
* fix(frontend): address Greptile review
- router.test.ts: cover an in-place UI switch, so a deferred view that renders blank fails the suite.
- storybook.test.ts: narrow the preview setup comment to the invariant it guards.
* refactor(frontend): drop the view-loader check from the deferred-view guard
Every route view is a lazy import loader, so a typeof check finds the
inactive UI's views without copying vue-router's own heuristic.
* chore(frontend): restrict direct md-editor-v3 imports
md-editor-v3 now loads lazily on v2 pages outside the game details route,
so an eager import anywhere else would quietly pull it back into a shared
chunk. ESLint now flags it and points at the MarkdownPreview wrapper. Type
imports stay allowed, the frozen v1 trees are skipped, and the list is
shared with the v2/lib block so primitives keep their own restrictions.
* fix(frontend): pr-ready code review
Prefetch every deferred view of the current route on a UI switch, lint
static imports of the md-editor wrappers, make the hand-back test
self-contained, and drop redundant mock resets.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(frontend): pr-ready simplify
Render MarkdownViewer through the shared MarkdownPreview wrapper, inline
the route-entering check, and set the test UI version once in beforeEach.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* perf(frontend): load md-editor config with its consumers and skip echarts
The md-editor config module now applies itself on import, and each
md-editor consumer (v1 details, NotesTab, MarkdownPreview) imports it,
so md-editor's config, json5 and the XSS filter leave the entry chunk.
Lint flags eager imports of the config module.
Echarts fences render as code and a stub instance stops md-editor from
fetching echarts from unpkg whenever a preview mounts.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Restore real timers from the global test setup and drop redundant teardown
vitest.setup.ts now calls vi.useRealTimers() after every test, so the 24
v2 test files that undid fake timers in their own afterEach no longer
need to, nor do three tests that wrapped their body in try/finally for
it. The hook is registered before enableAutoUnmount: Vitest runs
after-hooks in reverse, so components unmount while a test's fake clock
is still installed.
Also removes teardown that #5026 and #5028 made redundant: afterEach
unmounts of VTU wrappers in 11 files (with the variables and comments
that only existed to track them), and per-file setActivePinia calls
that the global beforeEach already makes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Echo params and expose locale from the shared vue-i18n mock
The shared mock's `t` now renders `key:{json params}` and `locale` is a
real ref, which covers what 19 test files built their own factory for:
a `locale` field, or a `t` that echoes params with `:` or `::`. Those
files now use the bare `vi.mock("vue-i18n")`, and the four `::` files'
assertions switch to the single colon.
24 assertions in 13 files that checked only a key now include the
params the component passes, so a dropped or wrong param fails them.
Factories that spy on `t` or render params in a test-specific shape
stay as they are.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Echo every argument to t from the shared vue-i18n mock
Pluralized messages pass the count second and the named values third,
so echoing only the second argument let a dropped `{n}` pass. The mock
now renders each argument after the key, and the four pluralized
assertions include the named values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(converto): integrate rom-converto for title id extraction and download conversion
* feat(converto): add conversion settings UI with per-platform format policies
* fix(converto): read conversion targets from the backend and translate the settings page
* fix(docker): ship rom-converto in the production image
Only the dev Dockerfile installed the binary, so the integration could
never enable on a released image. Fetch the same pinned, checksummed
musl build in a dedicated stage and copy it next to RAHasher.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(converto): skip the update check and batch info calls
The CLI asks api.github.com for a newer release on every run unless
told not to, so pass --no-update-check on each invocation. Inspect a
rom's files in one `info --paths-file` run instead of one subprocess
per file, and read the inspectable extensions from the capabilities
manifest so scans skip files info cannot recognize.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(scan): keep sigil authoritative for title ids
rom-converto ran first and overrode the ids sigil read. Sigil now runs
first and records its per-file ids; rom-converto only fills files sigil
left unset, on new or changed files, in one batch. Restore the base-id
selection for sigil extractions on every platform, as on master.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(downloads): make conversion opt-in and bound the cache
The download endpoint returned a converted file to every client once a
platform had a target, including the browser player and apps that check
hashes against RomFile. Conversion now needs ?converted=true.
A pre-warmed copy is served whatever its size; the in-request size cap
only gates starting a conversion. ROM_CONVERTO_CACHE_MAX_SIZE_GB
(default 20, 0 unbounded) caps the cache: conversions and the pre-warm
task stop when it is full, and cleanup evicts the least recently served
copies.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(types): regenerate frontend types for the converto schema
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(converto): address code-review findings (pr-ready step 2)
- Fall back to rom-converto's stored ids only when it ran this pass, in
disc order, so a rescan that skipped extraction keeps sigil's save target
- Persist per-file title ids that extraction writes onto reused rows
- Only authenticated callers may start an in-request conversion; past a
240s deadline serve the original and let the conversion finish into the
cache instead of nginx returning 504
- Treat a probe OSError or timeout as a failed probe; kill the subprocess
when the caller is cancelled
- Give the pre-warm task the scan timeout and report progress in the
ConversionStats shape the task UI reads
- Reuse zip_cache constants, walk the cache off the event loop, tolerate
files vanishing mid-cleanup, and trim long comments
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(converto): simplify conversion code (pr-ready step 3)
- Move the converted-download policy (target lookup, cached-first, sync
size cap, deadline) from the endpoint into utils/conversion_cache and
share conversion_target with the pre-warm task
- Share one path lookup between get_cached_converted and get_or_convert;
the pre-warm walks the cache once and tracks a running byte budget
instead of walking it twice per rom
- One normalize_platform_formats beside TARGETS_BY_PLATFORM for the
config loader (via _validated_platform_map) and the settings endpoint;
update_converto_settings takes a ConvertoConfig and is written back
with dataclasses.asdict
- read_infos owns its never-raise contract, so the scan drops its blanket
except; drop the unused RomConvertoInfo.kind and error attributes
- Sort files for the rom-converto identity only when it is used; stat
each cached file once during cleanup
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(converto): trim comments (pr-ready step 4)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(converto): convert on first download instead of pre-warming
A library pre-warm fought the TTL: cleanup dropped every copy nobody
downloaded within a day. Remove the Convert library task and convert on
demand only. Files over ROM_CONVERTO_MAX_SYNC_SIZE_MB now start their
conversion in the background while the original is served, so the next
download within the TTL gets the converted copy at any size.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(converto): drop decrypt and encrypt download targets
Downloads now only change a rom's container or compression (CHD, RVZ,
CSO, NSZ, ...); serving decrypted files is left for a separate decision.
NDS and PS3 have no remaining targets. Also note that the conversion
concurrency limit applies per process.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(converto): move the cache limits into converto.*
cache_max_size_gb and max_sync_size_mb join cache_ttl_hours in
config.yml and PUT /api/config/converto_settings, replacing the
ROM_CONVERTO_CACHE_MAX_SIZE_GB and ROM_CONVERTO_MAX_SYNC_SIZE_MB env
vars, so every eviction knob is edited in one place at runtime. The
loader takes its defaults from ConvertoConfig and one table holds each
integer's minimum for both the loader and the payload.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(converto): lock conversions with flock instead of a sentinel
A conversion now holds a non-blocking flock on its key dir, which the
kernel releases if the worker dies. That replaces the .partial sentinel,
its 6-hour staleness guess (which a long ROM_CONVERTO_TIMEOUT could
outlive), and the rename-aside takeover. Cleanup skips locked dirs, and
partial output gets a hidden name so it never counts as a served copy.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(converto): parametrize repeated test cases
Collapse the per-platform info parsing, operation resolution and
converto_active cases into parametrized tests, so a new platform or
target is one row.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(scan): run rom-converto first with sigil as the fallback
rom-converto reads each rom's new or changed files first, in one batch,
and its title ids win. sigil still reads what it can, since it alone
provides save targets and Switch content types, and fills the ids
rom-converto left unset.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(converto): edit the cache size limits on the settings page
* feat(converto): store per-file metadata read by rom-converto during scans
* fix(converto): show the labels of the cache settings fields
* fix(scan): keep the stored save target when sigil reads nothing
* fix(converto): read Xbox 360 disc ids and Wii title versions, store content type as text
* feat(converto): save file icons, banners and backgrounds read by rom-converto
* chore(converto): bump rom-converto to v0.23.0
* fix(converto): address review findings in the conversion cache, scan metadata and settings
* refactor(converto): move per-file metadata out of the conversion PR
Scan-time metadata (title ids, the 17 rom_files columns, artwork and
converto.scan_metadata) moves to its own PR so its columns land with the
UI that reads them. This PR keeps conversion only.
The conversion cache no longer has uncompressed_size_bytes to budget
with, so a conversion to an uncompressed target reserves a fixed
multiple of its input and the cleanup pass after it evicts any overshoot.
Co-Authored-By: DevYukine <20647088+DevYukine@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017BuuZVVtVPNLRaCjTN9bgQ
* feat(converto): let the client pick the download format with ?format=
`?format=zso,iso` lists the formats a client can read. The stored file is
served whenever its format is listed, even with conversion off, so most
emulator clients never trigger a conversion. Otherwise the first listed
format with a cached copy is served, then the first one rom-converto can
produce.
A conversion that outlasts a short wait answers 202 with Retry-After
instead of falling back to the original, so a URL never serves two
different files and a client never gets bytes it can't read. 406 means
no listed format can be served. HEAD reports the same without starting
a conversion. This replaces `?converted=true`, the per-platform download
target and `max_sync_size_mb`; `cache_ttl_hours` stays config.yml-only.
Co-Authored-By: DevYukine <20647088+DevYukine@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017BuuZVVtVPNLRaCjTN9bgQ
* feat(converto): convert the library in place with a manual task
`converto.platform_formats` now names the format a platform's library is
stored in, and the new "Convert library" task brings every matched rom
to it. Each output is staged in a `.romm_tmp_` directory beside the
original, moved into place, and only then are the originals (and a cue's
tracks) deleted. Single-file roms take the new name, folder roms keep
theirs and get their .m3u entries rewritten, and the file rows refresh,
so a rom keeps its id, saves and collections.
Only lossless conversions qualify, so xbox (xiso trims the dump) has no
library format. Unmatched roms are skipped because a converted file no
longer hash-matches a DAT. `/api/config` now carries the library targets
and, per input extension, the formats a download can be converted to.
Co-Authored-By: DevYukine <20647088+DevYukine@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017BuuZVVtVPNLRaCjTN9bgQ
* feat(converto): library format settings and "Download as" on the game page
The settings page follows the reworked backend: per-platform formats are
now the library format the "Convert library" task stores matched games
in ("Leave as is" keeps a platform untouched), the scan metadata, cache
TTL and max-sync fields are gone, and a "Convert library now" button
starts the task behind a typed confirmation, since it deletes the
originals.
The game's More menu offers "Download as <format>" for a single-file rom
when download conversion is on, from the per-extension table
`/api/config` exposes. A one-byte ranged GET asks for the format, the UI
polls through 202s while it converts, then downloads it; a 406 shows an
error.
Co-Authored-By: DevYukine <20647088+DevYukine@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017BuuZVVtVPNLRaCjTN9bgQ
* fix(converto): address code-review findings (pr-ready step 2)
Guard the conversion settings route, add it to the user menu, ignore a
non-positive Retry-After, drop duplicate Download as clicks, name the game
in the persisted error, and tidy the settings page (display-name sort,
useUnloadGuard, decimal cache sizes, save snapshot).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(settings): share the config alerts and save bar (pr-ready step 3)
Extract ConfigFileAlerts and SettingsSaveBar from the three settings
views that copied them, move ScanSettings onto useUnloadGuard, align the
retry slot, and flatten downloadFormats, getDownloadFormats and the
format poll loop.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(converto): trim comments (pr-ready step 4)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(converto): guard destructive tasks and serve download formats per rom
- TaskSpec gains destructive and single_instance. The Tasks list asks for a
typed confirmation before a destructive task, and POST /tasks/run answers
409 while a single-instance task is queued or running.
- convert_library is both, and only runnable with ROM_CONVERTO_ENABLED.
- The heartbeat reports CONVERTO.ENABLED, which hides Conversion settings
from the sidebar and user menu and warns on the page.
- DetailedRomSchema.download_formats lists what the caller can convert the
rom's single file to, resolved by the backend's own operation table and
empty for visitors who can't start a conversion. It replaces
CONVERTO_DOWNLOAD_FORMATS in /api/config and the frontend's copy of the
extension matching.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Yukine <devyukine@gmx.de>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: DevYukine <20647088+DevYukine@users.noreply.github.com>
/pair only had a default view, so the v2 named router-view rendered
nothing and the QR pairing link opened a blank page. Give it a v2 view
like /pair/device and drop PairDispatcher.
Move the language selector and version tag bar into AuthFooter, used by
the sign-in layout and both pair shells.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Select/autocomplete/combobox item, selection and chip slots now pass the
raw item as `item`, so drop the `.raw`/`.title` unwrapping. VDateInput
graduated out of labs, and theme colors are typed as Color.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Replace the em-dashes in frontend comments outside the frozen v1 UI
(script, template and style comments, plus the header build-tokens.ts
writes into tokens.css), then drop the rule. String literals keep their
em-dash glyphs. The AGENTS.md rule stays, and pr-ready's humanizer pass
catches new ones in prose.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RyamrxVw5BzEidVzm68LY7
* chore(deps): bump vue-router to 5.3.1 and vue to 3.5.43
vue-router 5 needs vue ^3.5.34. The runtime API RomM uses is unchanged:
typecheck, the unit suite and the production build pass without code
changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* fix(v2): stop URL query writes from dropping history entries
Query-only router.replace calls resolved against currentRoute, which is
still the page being left while a navigation waits on async guards (the
view-transition capture, the ROM fetch in /rom/:id's beforeEnter). A
write landing in that window cancelled a pending push, so the click was
swallowed, or, on Back/Forward, replaceState'd the entry the browser had
already moved to with the old page's URL, deleting it from history.
patchQuery now binds each write to the path it was made on, waits for an
in-flight navigation to settle (tracked by installQueryNavigationGuard,
installed in AppLayout) and drops the write if the navigation left that
page. The gallery filter sync, the platform, collection, admin, library
management and notification tabs, and the notes selection now write
through it, and the gallery's debounced write is cancelled on unmount.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* style(v2): replace em-dashes in comments of files this PR touches
trunk check reports every no-emdash-in-comment hit in a modified file,
not only on changed lines. Comment text only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* fix(v2): rewrite a ?subtab= the details tab can't show
GameDetails swaps currentRom before a rom-to-rom navigation commits, so a
tab that resets its subtab for the new game writes into the pending
navigation and that write is dropped. The URL then kept a subtab the new
game doesn't have. useSubtabQuery now rewrites an invalid ?subtab= to the
subtab on screen on mount and after every path change, which also fixes
stale deep links.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* refactor(v2): key the details ROM by the route's :rom param
GameDetails read a single currentRom slot that the route guards filled
before the navigation committed, so the page being left briefly
rendered the next game under its own URL, and anything reacting to that
wrote into a navigation still in flight.
stores/roms now keeps a bounded, id-keyed cache of DetailedRoms.
setCurrentRom and update() feed it, so the shared /rom/:rom guard and
every SimpleRom write keep it current, and v1 keeps reading currentRom
unchanged. v2 reads through useRouteRom(), which looks the record up by
the committed route's :rom param: a guard can prefetch the next game
without the current page seeing it. The dialogs, useRomSync, the scan
and pending-asset refreshes, FilesTab and the player seeds all go
through the cache or the route id. useSubtabQuery's rewrite is narrowed
to stale links, the case it still covers.
Also replaces em-dashes in comments of the files this touches, which
trunk check flags per modified file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* style(v2): sort useRomScanRefresh imports for trunk's prettier
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* fix(v2): keep the shown game cached through a burst of rom hops (code-review)
Each superseded rom-to-rom navigation still cached its game, so ten
quick hops could evict the record the committed page renders and blank
it until the last hop landed. Re-cache the shown game before the next.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* refactor(v2): simplify the query-write and ROM cache plumbing (simplify)
- routeQuery: track the in-flight navigation as a single marker and
schedule one flush per router instead of a waiter queue; add
replaceQuery for whole-query writes and route Logs through it, so no
v2 query writer bypasses the guard.
- Tab, subtab and gallery-filter writers use syncQueryParam, which only
writes keys that changed.
- useSubtabQuery shares one owned-subtab helper and drops the route.path
trigger the id-keyed cache made redundant.
- The ROM cache holds 3 records (nothing reads it to skip a fetch) with a
single-step eviction; GameDetails re-caches the shown game via
useRouteRom; FilesTab uses refetchRom's result; Stream parses :rom
with romIdFromRoute.
- Trim comments to the two-line rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* style(v2): trim the roms.update merge comment (review-polish)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* style(v2): tidy comment grammar left by the em-dash pass (humanizer)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* fix(v2): address review findings on query writes and the ROM cache
- syncQueryParam compares against the queued write, so a control
switched back before the first write lands still gets written.
- Only the tracked navigation (or an untracked duplicate) settles the
query guard, so an older navigation aborting after a newer one
started can't release writes into it.
- roms.reset() (run on logout) clears the detailed ROM cache, and
deleting a game drops its record once the page has moved off it.
- Shared makeDetailedRom fixture beside makeRom; the CollectionsIndex
mock carries a route path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* fix(v2): settle query writes only for the tracked redirect chain
- A duplicate navigation settles the query guard only when it began as
the tracked navigation (a guard redirect back onto this page, followed
through redirect chains via redirectedFrom). An unrelated duplicate no
longer releases a held write while the tracked navigation is pending;
that navigation settles itself when vue-router cancels it.
- DeleteRomDialog logs a failed post-delete redirect instead of
reporting the delete as failed, and keeps the record of a game the
page still shows so an aborted redirect can't blank it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* style(v2): drop the routeQuery header paragraph the guard docs already cover
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Add a no-restricted-syntax rule for `as unknown as DetailedRom` and
`as unknown as SimpleRom` in non-v1 test files, add a makeDetailedRom
factory next to makeRom, and move the eleven files that used the double
cast onto the factories. Removing the casts surfaced a Stream test
fixture that passed StateSchema where UserStateSchema is expected and
set a platform_name field DetailedRom does not have.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Logs now opens on Events (admins only), with the backend log a tab away
at ?tab=logs. Events reads as a timeline: grouped by day, the time and a
category-tinted icon on a rail, then the sentence and who, what, where.
Both tabs scroll as one piece under fixed tabs: the toolbar scrolls away
with the rows, and the log shows its newest line on top, holding still
while you read further down. The event list is windowed and pulls the
next page in as its end comes into view.
An admin keeps the page when DISABLE_LOGS_VIEWER turns the log off. The
settings content also sits closer under the nav bar on phones.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings › System › Audit log lists what every user, and RomM itself,
did, newest first: who, what (a sentence built from the event, linking
to its target while it exists), when, and the device and address it
came from. Filters for user, category, date range and a search live in
the URL; later pages stay pinned to the first so new events don't shift
them. Only admins see the entry, and the route guard turns away anyone
else, including a group granted users.read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Toasts disappear after a few seconds, and nothing reaches a user who has no
tab open. Notifications are now stored per user and kept until dismissed, so
what a background job or another user did is waiting the next time RomM is
opened.
Backend:
- `notifications` table (0130) with kind, level, data, actor and read_at, capped
at the newest 200 per user.
- /api/notifications: list, mark read, dismiss one, dismiss all.
- notify()/notify_admins() store the row and push `notifications:new` to the
user's socket room; read/dismiss push to the user's other tabs.
- Producers: a scan's end (to whoever started it; an unattended scan tells
the admins when it failed or found new games), a manual task's end (to who
ran it; a scheduled task's failure to the admins), an admin ending someone's
stream, and an admin changing someone's role.
Frontend (v2):
- Unread count badge on the navbar avatar, and a Notifications entry in the
user menu and settings sidebar.
- Notifications view: marks what it shows read, links each row to what it is
about, dismiss one or all.
- Live toast for a new notification, except scans, which already toast.
- The text is rendered from the kind in the reader's language (18 locales).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Trim the query-only navigation comment to the non-obvious why, and build
the test's route fixtures from `router.resolve` instead of casting bare
literals through `unknown`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Routes whose title is owned by the view (usePageTitle) carry no
meta.title, so the navigation guard reset document.title to "RomM" on
every navigation, including the query-only ones the v2 game details tabs
and the gallery filter syncs make. The view's watcher never refires there
(its source is unchanged), so the title stayed lost.
Fixes#4646
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
simplify pass.
`v2/router/routes.ts` hand-maintained 34 route-name string literals and a
comment saying ROUTES could not be imported without a cycle. `routeNames.ts`
is a leaf, so that constraint is gone: key the registry off ROUTES and type
it with the new `RouteName`, which turns a mistyped key into a compile error
instead of a silent fall-through to the 404 view.
Drop the unreachable chunk-load guard in the 401 interceptor: `main.ts`
imports the router statically, so it is in the entry chunk and the dynamic
import resolves from memory. Restate why that import is lazy.
Take `SimpleRom` instead of re-narrowing it, reuse the import specifier
already in `router.ts`, drop `circular: true` (already the default), and
inline the test roms so the factory is not duplicated across two files.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- Platform and Collection render their non-Library tabs through one
GalleryTabShell instead of two copies of the fixed-head CSS, so Collection
also gets the per-tab scroll reset and the focus-ring inset. The desktop
panel rules are scoped to md-and-up rather than undone on phones, and the
shell still scrolls when a window is shorter than the head.
- One `.r-section-head` utility replaces the three identical section-header
blocks (both settings tabs and DangerZone). DangerZone's hint is required,
as every caller passes one.
- Drop no-op CSS (divider flex, `min-height: 0` beside `overflow-y: auto`,
Upload's zero-basis flex and its phone reset) and two redundant comments.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
- Unmatch now goes through the danger-tone confirm dialog, like every other
destructive v2 action.
- The platform tab panel is keyed by tab, so switching tabs opens each one
at the top instead of inheriting the previous tab's scroll offset.
- The firmware overlay dropzone grows with a long list, so the drag overlay
covers the rows the user has scrolled to.
- The desktop panel keeps an 8px inset so focus rings on edge-to-edge
content aren't clipped by its scroll container.
- Comments trimmed to house style (no em-dashes, one or two lines) and the
head comments now describe the fixed desktop head.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
- Platform settings adopt the collection tab's structure (stacked field
labels, info icon on Details, Apply) and both tabs share the platform's
460px column.
- A shared DangerZone composite replaces the duplicated danger-zone markup
in both settings tabs, and Edit ROM moves Unmatch out of the footer into
one, away from Apply.
- On desktop the platform and collection heads stay fixed and only the tab
body scrolls down to the viewport bottom; phones keep the page scroll. The
platform icon box floors at the collection cover height so both heads,
and their tabs, line up.
- Upload ROMs runs in a new desktop-only SettingsLayout `fill` mode: the
dropzone and file list reach the bottom, the Upload button sits beside the
platform picker and the count + Add move under the list. RDropzone gains
a `fill` prop so the empty CTA stretches too (also used by Firmware).
- "x files selected" now reads "x files to upload" in every locale.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
* fix(v2): absorb the skipped transition preemption rejects
Activating a game card starts a shared-element morph, and navigating
inside it starts the router's own view transition. The browser skips the
older of two overlapping transitions, rejecting its `ready` promise with
an AbortError that nothing consumed, so it surfaced as an unhandled
rejection on every forward card activation. Back navigation preempts the
same way in the other order: the router's transition starts first and the
back-morph skips it.
Absorb the skip at both leaking sites, in the transition plugin wrapper
(only `captured` is awaited) and in `morphTransition` (only `finished` is
consumed). Both transitions are still created and one still animates, so
the morph behaviour is unchanged.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix(v2): absorb the preemption skip at every transition site
The router's wrapper absorbed the AbortError a preempted transition
rejects `ready` with, but the two transitions the v2 morph code starts
directly did not. Move the handling into one exported helper used at all
three sites, so the back-morph preempted by a navigation during its
capture phase no longer leaks an unhandled rejection.
The helper rethrows any reason that is not an AbortError, so a genuine
transition failure stays visible instead of being swallowed.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* test(v2): share the view transition test fixtures
Both transition test files carried their own copy of the
startViewTransition stub, and the unhandled-rejection probe was inlined
in one and rebuilt in the other. Move them to src/test-utils, next to
serverError, so there is one stub to keep in step with the API.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* test(v2): drive the back-morph guard through a real router
The fake router and route fixtures needed `as unknown as` casts, which
the v2 component rules prohibit. A memory-history router gives the guard
real route objects instead, so the test drops the casts and exercises the
registration it actually ships with.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
`startViewTransition` ran its callback twice whenever
`document.startViewTransition` exists: once eagerly at the top of the
function, to build the fallback promises, and again inside the native
update callback. The only caller today is the router's `beforeResolve`
guard, which passes no callback, so the double run was dormant.
The eager call is gone from the native path. The fallback path still
invokes the callback itself, and still resolves `captured` immediately:
nothing is snapshotted without the API, and the guard awaits that promise
to know navigation may proceed, so making it wait would buy nothing. On
the native path `captured` still resolves from inside the update
callback, so a caller awaiting it still learns the old state was
captured.
Tests cover the callback running once on the native path, once when a
native transition is preempted, and once on the no-API path with all four
promises resolving.
Co-authored-by: Claude Sonnet 5 <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>
Reworks the stream view into a stage plus a control bar revealed from the
screen edge, with in-browser volume and mute on same-origin containers,
save state and save archive tabs, memory card selection and import, and a
disc-swap control for multi-disc games. Launch progress is reported while
the broker unpacks a pkg or archive ROM.
Adds an admin desktop session view and the routes for both.
Consolidates the three copies of the track-time formatter into a shared
formatTrackTime util (Intl.DurationFormat can't match the "2:37" format,
its digital style always pads minutes), points the six private copies of
the axios errorMessage helper at the shared util (MediaTab's was dead
code and is just removed), drops the legacy ?mode= redirect since the
jukebox never shipped with query-based modes, shrinks the free-radio
sample from 1000 tracks to the 200 that comfortably fill an hour, and
prunes redundant comments.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The browse mode moves from ?mode= to a path segment (/music/:mode?)
written with router.push, so every subgroup is its own history entry
and back/forward walks between them. Selections inside a mode stay in
the query via router.replace so refining a pick does not spam history.
Legacy ?mode= links are honored on entry and rewritten to the subpath.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Quality pass over the jukebox feature: extract helpers the diff had
duplicated, collapse copy-pasted template blocks, and remove wasted work
on paths that run per render or per keystroke.
Reuse:
- share shuffled() from utils instead of two Fisher-Yates copies
- add v2/utils/errorMessage.ts and v2/utils/jukebox.ts so the mode list
has one owner instead of three hand-maintained copies
- game_cover_url reuses MusicTrackSchema.cover_url_for
Simplification:
- launch tiles and the session-mode ternary become data-driven
- drop unused order options from the music service and the unreachable
romId fallback in deleteSoundtrack
- extract buildPlayerPayload() from its two call sites
Efficiency:
- count music tracks over a single-column projection
- group tracks with push instead of rebuilding each bucket array
- precompute track rows so the list stops rescanning per render
- page the catalog and the panel's two fetches in parallel
- update a favorite in place rather than rebuilding three arrays
- debounce the search URL write alongside the fetch
Also adds freeRadio tests and fixes a vue-tsc error on route.query.game.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Resolve conflicts in useCanPlay and its useGameActions tests, where master
added the has_file_on_disk gate to the play checks while this branch added
the js-dos route. Keep both: js-dos also boots from the ROM file, so it gets
the same gate as EmulatorJS and Ruffle.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review follow-ups:
- Only the fallback and stored languages are awaited at boot; the rest
load when switched to, so startup no longer blocks on every locale
bundle. The locale watcher awaits the incoming language before
re-applying the route title.
- `settings.controller-debug` already exists, so the last literal
route title becomes a key, and the root route drops its redundant
"RomM" title (the guard already falls back to it). Every `meta.title`
is now an i18n key, which the test no longer has to exempt.
- Drop the em-dash from the new comment per the repo writing rule, and
the trailing space in the locale load error.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Opening a route in a new tab showed the raw i18n key (e.g.
"settings.scan-settings") as the tab title. Locale namespaces load as
separate chunks and nothing awaited them, so the router guard resolved
the title before any messages existed. Route definitions compounded it
by calling `t()` at module-eval time, baking the key into `meta.title`
and leaving the guard to translate it a second time.
Bootstrap now awaits a `localesReady` promise before installing the
router, `meta.title` holds the plain key, and a locale watcher
re-translates the current title — the stored language is applied when
the app mounts, after the first navigation guard has already run.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Game details now titles the tab with the game name, and the three
players (EmulatorJS, Ruffle, Stream) with "Play <game name>".
Adds a usePageTitle composable so titles that depend on fetched data
stay in sync: the router's meta.title is resolved in the navigation
guard before the data lands, and doesn't re-run on param-only
navigations like /rom/1 -> /rom/2.
Also fills the remaining v2 gaps: /pair and /pair/device had no title,
the platforms and collections index routes had untranslated English
ones, and platform / collection / profile set theirs imperatively so
they went stale after a rename and leaked the previous page's title
onto a not-found route.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Expose the scan.* section of config.yml (metadata & artwork priority,
per-field artwork overrides, region priority, language priority, media
types, gamelist and pegasus export) in an editable v2 Settings page.
Backend:
- Add PUT /api/config/scan (platforms.write) with a validated
ScanSettingsPayload and ConfigManager.update_scan_settings().
- Expose GAMELIST_AUTO_EXPORT_ON_SCAN and PEGASUS_AUTO_EXPORT_ON_SCAN
in ConfigResponse / GET /api/config.
- Preserve the streaming section on runtime config writes (previously
dropped on every write).
Frontend:
- New Settings/ScanSettings.vue page + ScanPriorityList.vue reorderable
list (drag + up/down for keyboard/gamepad); region/language use
RComboboxField.
- Wire the scan-settings route, permissions, and sidebar entry.
- Regenerate OpenAPI types; add all new strings to every locale.
Closes#3849
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move the streaming player UI from v1 to v2 per the v1-frozen rule.
The shared streaming store and backend stay canonical; only the
frontend surface moves.
- New v2 player view (Player/Stream.vue) porting the launch/playing/
error state machine, session claim, iframe UI auto-hide, volume,
save/load state, fullscreen, save-and-exit and stop/release.
- Fold streaming into the single Play action via useGameActions:
routes to /rom/:id/stream when a container is configured, else
EJS, else Ruffle. Streaming wins over in-browser emulation.
- Hydrate streaming config in AppLayout (v2 users never mount v1
Main.vue, where v1 put the fetchConfig call).
- Make the rom/:rom/stream route v2-only (v1 default falls back to
Home).
- Add stream-* i18n keys to all 18 locales.
- Remove the v1 Stream player, PlayBtn cast button and Main.vue
fetchConfig wiring.
Generated-By: PostHog Code
Task-Id: e091168f-69fd-4d4a-9f12-d473dd3f17c9
Add a Pinia streaming store (config fetch, session lifecycle, broker
controls), a v1 player view at rom/:rom/stream with save state and
volume controls, and a cast button on PlayBtn for platforms with a
configured streaming container. The route registers a v2 named view
via v2For so the v2 fallback screen shows until a v2 player lands.