Commit Graph

12393 Commits

Author SHA1 Message Date
Georges-Antoine Assi
fdb4cb5e82 chore(v2): trim the launch-path comments and mount the nginx map in dev
The dev container mounts frontend/ alone, so the vite plugin that now
reads the nginx template could not find it and the dev server refused to
start. Mount the template directory read-only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-17 08:18:21 -04:00
Georges-Antoine Assi
8ecb4dd0c5 refactor(v2): fold the cleanup pass findings into the launch path
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>
2026-09-17 08:18:20 -04:00
Georges-Antoine Assi
0ccda23164 fix(v2): keep the save flush and the js-dos isolation on the launch path
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>
2026-09-17 08:18:20 -04:00
Georges-Antoine Assi
3eadc4c33c fix(v2): apply the code review fixes to the launch path
Replace the player entry when leaving by SPA navigation, keep a failed
js-dos runtime load from stacking a second stylesheet, and answer the
player URLs from `vite preview` as well as the dev server.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-17 08:18:20 -04:00
Zurdi
8bcf72df7d Merge pull request #4567 from rommapp/claude/v2-spa-launch-view
feat(v2): open the EmulatorJS and js-dos launch views without a page load
2026-09-17 13:49:01 +02:00
Georges-Antoine Assi
da9360148d Merge pull request #4571 from rommapp/claude/romm-security-fix-9d9ea0
fix(deps): bump engine.io-client past the ws memory-exhaustion advisory
2026-09-17 07:41:49 -04:00
Georges-Antoine Assi
c39655acd0 Merge pull request #4566 from tmgast/fix/sigil-cnf-serial-shapes
fix(scan): read PSX and PS2 serials sigil missed and identify multi-disc roms by their first disc
2026-09-17 07:22:41 -04:00
Georges-Antoine Assi
05f445a4cf refactor(scan): ask the handler whether a rom is a folder
`directory_exists` and `Rom.full_path` already spell out the check the
scan does at its own call site, so the path is no longer rebuilt here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-17 07:17:51 -04:00
Zurdi
0bb7fd85a4 Merge pull request #4576 from rommapp/claude/v2-upload-and-picker-polish
feat(v2): polish upload actions and pickers across details, player and scan settings
2026-09-17 12:41:48 +02:00
zurdi
c1e6ce5424 fix(v2): describe RSelect info from a node outside aria-hidden
The field's aria-describedby pointed at the info well, which was marked
aria-hidden, so assistive technology could drop the description. The info
text now lives in its own hidden node that the field references, and the
well is no longer aria-hidden since its default content is decorative
already.

Also cover the info tooltip reveal: keyboard and pad focus open it, mouse
focus does not, and blur or opening the menu closes it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CZ7NE6z9cJ8zsT3TsCtQds
2026-09-17 12:37:05 +02:00
zurdi
a342bccd13 test(e2e): expect Upload to folder in All files and Upload in folder subtabs
The Files tab no longer offers a plain Upload from All files, which has
no destination of its own. The admin spec now checks "Upload to folder"
there and Upload in a folder subtab, and the read-only spec checks that
neither appears once the tab has rendered.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CZ7NE6z9cJ8zsT3TsCtQds
2026-09-17 12:23:17 +02:00
zurdi
4101aba964 fix(v2): fold select notes into info wells and unwrap scan settings copy
The memory card and scan media notes sat as loose hints under their
select; both now live in the select's info well. Scan settings section
descriptions were capped at 680px and wrapped early on wide screens; they
now take the section width and only wrap when it runs out.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CZ7NE6z9cJ8zsT3TsCtQds
2026-09-17 11:48:35 +02:00
zurdi
393e8bd08c feat(v2): lead slot pickers with a new slot and default uploads to autosave
Both slot pickers, in the save upload dialog and the EmulatorJS player,
list "+ New slot" first behind a divider. A save upload now starts on
autosave, with No slot moved to the end, matching the slot grouping in the
save list. The player's slot info moves from a loose button into the
select's info well.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CZ7NE6z9cJ8zsT3TsCtQds
2026-09-17 11:48:35 +02:00
zurdi
0d738e3435 feat(v2): upload into a folder from All files through a grouped picker
All files has no destination of its own, so its header now offers only
"Upload to folder", styled like Upload, and folder subtabs keep only
Upload. The destination picker leads with "New folder" set apart by a
divider, defaults to Root, and shows each folder with its subtab icon.

RSelect gains `dividerAfter` for grouped menus, plus an `#append-label`
well mirroring the inline prefix label, which `info` fills with an info
icon and tooltip read as the field's description.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CZ7NE6z9cJ8zsT3TsCtQds
2026-09-17 11:48:35 +02:00
zurdi
5849a27786 fix(v2): move the soundtrack and manual upload into a section header
The Soundtrack and Manual subtabs put Upload in a full-width button under
their viewer, unlike the Files, Screenshots and Save data tabs, which host
it in a header above the content. Both now use that header, with Upload
pushed to the right next to the manual entry selector when there is one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CZ7NE6z9cJ8zsT3TsCtQds
2026-09-17 11:48:34 +02:00
zurdi
5497ee9edb chore(v2): trim the launch-path comments and factor the test fixtures
Comments down to the fact a reader cannot recover from the code, and the save,
state and firmware fixtures behind one factory each rather than a cast per
literal.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R1VFUvsR5wYK3axxR1gebc
2026-09-17 05:53:30 +02:00
zurdi
6bf6ed25d2 refactor(v2): fold the cleanup pass findings into the launch path
- The stream player restated the stop pair `useActivityPresence.stop()` now
  owns, so it calls it.
- The dev server's isolation list and the nginx map it mirrors are checked
  against each other by a test, rather than by a comment asking whoever edits
  one to remember the other.
- One case covers the js-dos runtime being injected once, whichever side of the
  first load a second view mounts on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R1VFUvsR5wYK3axxR1gebc
2026-09-17 05:44:52 +02:00
zurdi
8d4e856360 fix(v2): close the gaps the code review found in the player launch path
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
2026-09-17 05:33:30 +02:00
Sam Dornan
c9d0b0da12 fix(v2): stop the unhandled rejection when a view transition is preempted (#4570)
* 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>
2026-09-16 22:27:06 -05:00
Sam Dornan
3efe5a1758 fix(v2): stop probing platform icon variants that cannot exist (#4573)
* fix(v2): stop probing platform icon variants that cannot exist

The /assets/platforms catalogue is keyed by RomM's canonical platform
slug, and two probes worked against that:

- prefetchPlatformIcons fetched only `<slug>.svg`, but 114 of the 199
  catalogue entries ship `.ico` with no `.svg`, so every ico-only
  platform in the library 404'd on every app load, on every page, since
  AppLayout prefetches the whole platform store.
- RPlatformIcon tried `fsSlug` before `slug`. The filesystem slug is the
  on-disk folder name, which for Batocera/ES-DE libraries is an alias
  (`dreamcast`, `megadrive`, `pcengine`) with no asset, so each of those
  burned two 404s per icon render before the canonical slug resolved.

Neither broke rendering, since both chains terminate at default.ico, so
this removes wasted requests only: 94 of the 138 folders in
PLATFORM_FS_ALIASES have an asset under the canonical slug alone and
none have one under the folder name alone.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* test(v2): tighten platform icon test typing and trim comments

The prefetch tests faked `blob()` with `{ type } as Blob`; a real `Blob`
carries the same `type` and drops the cast. The chain helper took a
`Record<string, unknown>` prop bag, which could not catch a mistyped prop
name.

Comment blocks over two lines carry the same fact in one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* fix(v2): keep probing candidates when a prefetch fetch fails

A rejected fetch threw past the candidate loop to the outer catch, so a
transport failure on `.svg` abandoned the `.ico` that would have warmed
the cache. Each candidate now fails on its own.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 22:22:09 -05:00
Sam Dornan
f77ef4c40e fix(v2): invoke the view transition callback once (#4574)
`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>
2026-09-16 22:13:21 -05:00
Sam Dornan
6a02a837aa fix(deps): bump engine.io-client past the ws memory-exhaustion advisory
engine.io-client 6.6.5 pinned ws to ~8.20.1, below the 8.21.0 fix for
GHSA-96hv-2xvq-fx4p (CVE-2026-48779). 6.6.6 moves to ~8.21.0, and
socket.io-client 4.8.3 already allows ~6.6.1, so the bump resolves
in-range without an override. Also dedupes happy-dom's nested ws copy.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 21:33:41 -05:00
Sam Dornan
70c9b9f364 fix(v2): line the placeholder rows up with the rows they stand in for (#4561)
* fix(v2): line the placeholder rows up with the rows they stand in for

The Home card rows painted a fixed number of skeletons (6, 6 and 4) while
their requests ask for up to 15, so the loading row was shorter than the
row it turned into. They now size themselves from RECOMMENDED_ROMS_LIMIT,
RECENT_ROMS_LIMIT and RECENT_PLAYED_ROMS_LIMIT, the way v1's
RecentAddedSkeleton already did.

List mode has two placeholder rows: the bootstrap GameListSkeletonRow, and
GameListRow's own skeleton path for a row that mounts before its position
resolves. The second painted the 48x64 cover placeholder inside the title
cell and a thin bar in the cover column, so for the second before
hydration a cover-shaped block sat where the title text starts. It now
paints the same per-column shapes as the bootstrap row.

The list header's select-all checkbox is a stretched grid child carrying a
4px margin, which put its tick 6px left of the body rows' ticks, centred
in the same column.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* test(v2): cover all three Home loading rows and read the real limits

The mock listed the three ROM limits by hand, so the assertion compared
the view against a second copy of those numbers instead of the numbers
themselves. It keeps the real module's exports now and stubs only the
feed request. Only the recommendation row was asserted, though the other
two changed the same way, so the count check is a table over all three.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* fix(v2): stop the loading rows lying about their height and their count

Three placeholder defects, all only visible while a row is loading.

The recommended row's cards carry a caption under the title, and the
placeholder skipped it, so the row sat 24px shorter until the data landed.
Its placeholder now reserves that line.

Nineteen of those 24 were the caption. The other five were the label: its
reserved height was a class rule, which loses to the inline height the
skeleton bar has to carry, so the reservation never applied and every
skeleton card stood 5px short of the card replacing it. The reservation
moves to a wrapper that has no inline height of its own, and the bar keeps
its own thickness.

Rows also showed a count of 0 for as long as their list was in flight and
then jumped to the real number. The count chip now stays off until the
count means something.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* style(v2): trim the placeholder-row comments to their invariants

Each of these ran to three lines or more, and spent them on the approach not
taken. What is left is the fact a reader cannot get from the code: the two
placeholder rows share a column grid, the label wrapper owns the line box its
bar cannot, the count stays off until its list lands, and sizing goes through
props (and the default `inheritAttrs`) so a skeleton can swap for a real card
without moving anything.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* style(v2): finish the comment pass on the placeholder rows

Drop the skeleton comment's third line in GameListRow, and take the em-dash out
of GameCardSkeleton's header.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PwN1xRVo44Y2vKbuVDndf

* style(v2): name both rows in the parity comment

"Both" only resolves if the reader already has the two mounts below it in view;
the comment now says which two rows share the column grid.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 21:23:33 -05:00
Georges-Antoine Assi
c28059c328 chore(scan): review-polish the title id extraction pass
Name the candidate predicate for what it checks, trim the ordering
docstring, and drop the comments the moved guards made stale.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-16 22:02:32 -04:00
Georges-Antoine Assi
9e940e7d10 refactor(scan): simplify the title id extraction path
Sort title id sources with the natural key the models already compute,
give the compressed suffixes one home, and let SigilService reject a
container itself rather than trusting every caller to.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-16 22:00:57 -04:00
Georges-Antoine Assi
cf8d79f9f6 fix(scan): apply pr-ready code-review findings
Order discs by their number so "Disc 2" precedes "Disc 10", test one
rule for containers sigil cannot read, and drop the unreachable
OSError handler around Path.is_file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-16 21:53:31 -04:00
Georges-Antoine Assi
d13fca5ea3 Merge pull request #4563 from rommapp/claude/loving-golick-0d269c
fix(v2): stop the layout's min-height leaking into the gallery shell
2026-09-16 21:36:39 -04:00
Georges-Antoine Assi
993a9047f3 Merge pull request #4554 from sdornan/fix/generate-test-data-seeder
fix(tools): repair the test-data seeder's imports and rom digests
2026-09-16 20:37:45 -04:00
Georges-Antoine Assi
dda065555b Merge pull request #4542 from LoneAngelFayt/streaming-patches-3
fix(streaming): make broker save-clearing configurable and date the picker by its sort key
2026-09-16 20:37:14 -04:00
Georges-Antoine Assi
d16aa85968 Merge branch 'master' into streaming-patches-3
AssetList moved its timestamp into <AssetTimestamp> and gained
groupBySlot on master, so the picker's `timestamp` prop now feeds the
component's date and both props coexist. The "updated" | "created" type
and its accessor join Asset's other shared helpers in v2/utils/assets,
where AssetPreview takes them too, since the old local name collided
with the AssetTimestamp component.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-16 19:12:34 -04:00
Georges-Antoine Assi
d3cda9b003 Merge pull request #4534 from rommapp/claude/fix-4398-inconclusive-scan
fix(scan): don't report an unanswered lookup as a confirmed miss
2026-09-16 19:05:45 -04:00
Georges-Antoine Assi
d6eba3297a fix(scan): treat every silent provider as inconclusive
ScreenScraper catches its own rate limit and breaker, so the miss they
cause never reaches resolve_fetch and was still written up as confirmed.
Hasheous had the opposite gap: an unanswered hash lookup still counted as
attempted, so a complete rescan cleared the id the lookup could not redo,
and a disabled handler reports the same flag as an outage without ever
having been consulted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-16 18:38:47 -04:00
nendo
3ca79a1205 fix(scan): reread title ids on every rescan and break sort ties by exact name 2026-09-17 07:36:21 +09:00
Georges-Antoine Assi
951ea75075 Merge pull request #4533 from LoneAngelFayt/streaming-patches-2
fix(streaming): pool same-origin webstation containers and keep a claim on its own container
2026-09-16 18:18:44 -04:00
nendo
2e6acaac3c Merge remote-tracking branch 'upstream/master' into fix/sigil-cnf-serial-shapes
# Conflicts:
#	backend/tests/utils/test_m3u.py
2026-09-17 07:09:35 +09:00
nendo
33c3011ef6 fix(docker): clone sigil from its rommapp home 2026-09-17 07:07:07 +09:00
zurdi
3f67e0b74a feat(v2): open the EmulatorJS and js-dos launch views without a page load
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
2026-09-17 00:03:48 +02:00
nendo
d43e4e731f chore(scan): review-polish the title id ordering comment 2026-09-17 07:01:35 +09:00
nendo
f40bd69d9d refactor(scan): resolve playlists in the sigil service and keep one stop rule 2026-09-17 07:00:49 +09:00
nendo
35f799086d fix(scan): apply code-review findings to title id source ordering 2026-09-17 06:57:17 +09:00
Georges-Antoine Assi
bf6f9db02a fix(streaming): serialize one player's claims on a platform
The ownership check and the reservation that follows it are separate Redis
round trips, so two concurrent claims from one player could each read no
session of their own and then win a different member of the pool, leaving
the second one unreachable. A per-player, per-platform gate held across the
pair makes the loser read the winner's session instead of a free container.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-16 17:38:47 -04:00
Sam Dornan
b661e76d67 fix(v2): stop the layout's min-height leaking into the gallery shell
AppLayout and GalleryShell both used `.r-v2-shell`. Vue copies a parent
scope id onto a child component's root element, so AppLayout's
`min-height: 100dvh` matched the gallery `<section>` and beat its
`height: calc(100dvh - var(--r-nav-h))`, leaving the section a full
viewport tall. Since `<main>` already reserves `--r-nav-h`, every gallery
route overflowed the document by 58px, with the bottom of the virtual
scroller below the fold.

Rename the layout block to `r-v2-app-shell` so the two cannot collide,
matching the unique blocks already used by SettingsLayout and IndexShell.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 16:38:19 -05:00
Zurdi
6b0416378f Merge pull request #4560 from rommapp/claude/player-nav-links
feat(v2): make the player back links and the details Play button real links
2026-09-16 23:24:56 +02:00
zurdi
b6d5cfcb40 fix(v2): keep a shelved game's Play a button and pass non-primary clicks through
A modified click on the launch anchor skipped play(), which is where the
protected-launch confirmation lives, so a retired or never-playing game
could reach its player page without the prompt. useGameActions now
exposes needsLaunchConfirm and GameActionBtn renders a button instead of
an anchor while it holds, so every launch of a shelved game confirms.
The anchor also leaves non-primary clicks to the browser, matching the
other v2 link handlers.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MozJiij1oQbu12GvtAPBFR
2026-09-16 23:19:50 +02:00
nendo
c6170db6bc fix(scan): identify multi-disc and playlist roms by their first disc 2026-09-17 06:14:08 +09:00
zurdi
d0be75b841 feat(v2): make the player back links and the details Play button real links
The pre-play view's "Back to game details" and "Back to gallery" buttons
and the Play / Stream CTAs in the game details header were JS-only
buttons, so they could not be middle-clicked or opened in a new tab.
usePlayerNav now hands out route locations that RBtn renders as
RouterLinks, and GameActionBtn renders the launch actions as anchors to
the player document when the surface is not itself a link. A plain click
still runs through play(), keeping the protected-launch confirmation and
the full-document load EmulatorJS and js-dos need.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MozJiij1oQbu12GvtAPBFR
2026-09-16 22:37:16 +02:00
Zurdi
fdeff24f2d Merge pull request #4558 from rommapp/claude/ejs-auto-save-sync
feat(player): sync in-game saves seconds after the game writes them
2026-09-16 22:14:04 +02:00
Zurdi
fb721a50f0 Merge pull request #4555 from rommapp/claude/v2-sidebar-states-match-fixes
fix(v2): jukebox in the settings sidebar, launch-view titles, match overlay
2026-09-16 22:12:49 +02:00
zurdi
0d73d2ff30 chore(v2): drop em dashes from two comments and unstale the resume story
The ResumePanel story mirrored the launch view's label with the
condition the view no longer has, so its empty-state cases showed the
layout this branch fixes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MozJiij1oQbu12GvtAPBFR
2026-09-16 21:14:56 +02:00
zurdi
e5e5f00b77 fix(player): flush on Quit, drop stale unload bytes, test the SRAM poll
Quit cleared the sync sentinel before routing away, so the route guard
that flushes a pending save found nothing to own and skipped it; Quit
now flushes first. A close cancelled at the prompt kept the bytes it
captured, which a later close could upload over newer progress; each
beforeunload starts clean. The unload upload also stands down while
the same bytes are already on the wire, beforeunload sets returnValue
for older browsers, and a boot that lands after unmount installs
nothing. The poll moves to pollSaveFiles in utils, covered with fake
timers.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MozJiij1oQbu12GvtAPBFR
2026-09-16 21:09:21 +02:00