The picker sorts on created_at to match the order the backend restores
in, while every timestamp its rows and preview rendered was updated_at,
which a content-hash rewrite moves without touching the save. An archive
created at 10:00 and rewritten at 12:00 sorted below one created at 11:00
and never touched, so the tile a player read as newest sat second in a
list advertised as newest-first.
AssetList and AssetPreview take a `timestamp` prop naming which of the
two to render, defaulting to updated_at so the Save data subtab and the
EmulatorJS player keep dating rows by the field they are ordered on. The
launch screen's save picker asks for created_at, the field it sorts on.
Writes that start while a save load is in flight are dropped, since the
bytes they read predate the load, and forced writes capture the write
generation before waiting on the queue so a load that lands meanwhile
voids them. The tracker clears its boot baseline after the first upload
so a return to those bytes still syncs, and a forced write is skipped
only when the SRAM matches a slotted save loaded from the server, so a
slot-less legacy save still reaches the slot on an unchanged Save &
Quit. Autocleanup removes an evicted save's screenshot row and file
through the same helper the delete endpoint uses. The launch screen's
save list grows with the page outside viewport-fit mode instead of
nesting a second scrollbar.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XXrMndq8eYexafm6nhajLo
The save tracker now keeps a baseline separate from the bytes the server
holds: SRAM restored by a state or a fresh boot makes the periodic tick
wait for a change, but a forced write still opens the slot version since
nothing was uploaded yet. Forced writes skip only when no version exists
and the SRAM still matches the loaded save. A slotted upload names the
screenshot after the tagged save whatever the client called it, so
Save.screenshot matches by stem. Slot select values are namespaced so
the "new slot" entry cannot collide with a user-named slot, the info and
clear buttons get a 44px hit area, and the asset wrapper only scrolls in
viewport-fit mode.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XXrMndq8eYexafm6nhajLo
The newest compatible state is still armed by default, but when a save
postdates it the resume panel shows a warning with a one-click "Boot
from save" action, so a handheld's newer in-game progress is not
silently rolled back by an older browser state. The save preview row
also shows the save's own screenshot when it has one.
Closes#4278
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XXrMndq8eYexafm6nhajLo
Seed the save tracker once per boot and from the bytes just loaded
instead of re-reading the SRAM, fold the "wait for the queue, skip
unchanged bytes" sequence into one helper used by both forced writes,
and upload the state and the save in parallel on Save & Quit. The
loaded save is a plain variable, the slot fallback lives in one place,
the selection id derives from the selected asset, and the byte compare
is a plain loop.
The viewport-fit layout drives AssetList's own scrollable prop from the
lg-and-up and tall breakpoints instead of a CSS custom property, and
the fit selectors drop the redundant root modifier. The slot length is
validated by the upload endpoint from a limit on the model, and the
datetime tag helper takes its timestamp explicitly.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XXrMndq8eYexafm6nhajLo
Save writes from the periodic tick, the in-game Save button and Save &
Quit now run through one chain, so two first writes cannot both open a
version; loading a save bumps a generation that voids in-flight writes,
and byte-identical uploads are skipped since a slotted upload bypasses
the backend dedupe. Slotted uploads let the backend stamp the timestamp
and tag the screenshot with the same one, so save and screenshot match
by stem again, and a session version opened without a screenshot can
still receive one on update.
A slot-less save is no longer kept as a write target when a state is
armed, slot names are compared exactly like the backend does, the custom
slot field is capped at the column length, and an empty-string slot no
longer collides with the "new slot" sentinel. The viewport-fit layout
uses a new `tall` breakpoint token gated on `lg-and-up`, gives the hero
column a scroll fallback, and lets AssetList keep its own scroll cap via
a custom property. The slot info icon becomes a tappable button so the
tooltip also opens on touch.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XXrMndq8eYexafm6nhajLo
Picking a save on the v2 EmulatorJS launch screen never disarmed the
auto-selected newest state, and the player loads a state in preference
to a save, so the pick was ignored whenever any state existed. Selection
rules now live in a pure module: a picked save disarms the state, a
picked state keeps the bound save as the write-back target.
Web saves now follow the sync clients' slot model. New saves go to the
"autosave" slot (capped history) or the slot picked on the launch
screen; a save that already has a slot keeps it; a legacy slot-less save
stays as an archive and its progress moves to the picked slot. Each
session opens one new version in the slot and updates it on later
writes, so periodic sync does not churn the history.
The launch screen gains a slot selector with an info tooltip, the save
preview collapses to a compact row so the list gets the height, the
pre-game screen fits the viewport on desktop with only the asset list
scrolling, and the slot chip drops its redundant label.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
PlayerShell renders the stage in a v-else on `running`, so releaseGame
unmounts it while the view stays mounted. The fallback held that element
in a closure and only cleared it on exit, leaving document.fullscreenElement
and the legacy alias pointing at a detached node, with no fullscreenchange
to correct vueuse's state.
The real API exits when its element is removed, so the fallback now does
too, watching only while it holds an element. That keeps the fix in the
polyfill rather than asking every caller to clear fullscreen before it
tears its stage down.
Moves useFullscreenFallback to its own module: v2 composables are one
named export per composables/useFoo/index.ts.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Uo885XxwhN8wfC4oCtR48
review-polish pass over the save-picker change.
Two comments carried more prose than the rule allows. The emulator comparison
re-normalized a value ResolvedContainer already lowercases at resolve time,
which the sibling state resolver relies on, so it now reads the same way.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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
simplify pass over the save-picker change.
The claim validated the pick, dropped the resolved row and passed the bare id
down two layers, where hydration fetched and re-checked the same save. It now
carries the row the way the resume state and the memory card already are, so
the restorability rule has one home and the claim one lookup.
The picker holds the picked id rather than the row, so an id that is no longer
on offer falls back to the newest by construction instead of through a watch,
and the list of archives uses AssetList, the variant meant for saves, rather
than the tile strip whose thumbnail area a save never fills.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comments cut to the repo's two-line limit, and the fallback's background
keeps a `black` fallback value so it does not depend on the `.r-v2` token
scope being present, as the v1 shim's literal did not.
The attribute name was written three times across the stylesheet and the
enter/exit pair, where a rename in one would silently stop the CSS
matching.
Verified the fallback in Chromium: it stands aside where the native API
exists, and where it does not the stage computes to position fixed,
z-index 99999, filling the viewport, opaque in both themes and with no
token scope, reverting to static on exit and leaving the prototype clean
on dispose.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Uo885XxwhN8wfC4oCtR48
Follow-up to #4515, merged before its review landed:
- Mark the card logo decorative (empty alt); the provider name sits
next to it and screen readers announced each provider twice.
- Add a name-tag prop so the scan reference dialog renders provider
names as h4 again, keeping heading navigation.
- Restore the ul/li provider collection in the setup wizard so screen
readers keep list semantics.
- Finish the Flashpoint label normalization in the GameDetails
provider registry and the heartbeat store scan options; the
remaining copies live in frozen v1 files.
- Replace raw hex colors in the story's placeholder logo URLs with
CSS color names.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
usePlayerFullscreen took an optional target so three library-driven
players could call it bare, purely to install the prototype patch, and
throw the controller away. That discarded controller was not free:
vueuse defaults the target to documentElement and still registers its
fullscreenchange listeners on both it and document.
Split the side effect into useFullscreenFallback and make the target
required. The three call sites now say what they mean without a comment
apologising for an unused return value.
Refcount the install. The patch is process-global while its callers are
scoped, so overlapping consumers would otherwise stack private patch
layers and restore them in teardown order. Probing HTMLElement.prototype
rather than Element.prototype lets an installed fallback see itself.
Drops v2's writes to playing.fullScreen, which no longer had a reader in
either tree. The field stays because v1 still destructures it.
Also: hoist swallow to module scope, annotate the return inline rather
than exporting an unused interface mirroring vueuse's shape, cover the
document.fullScreen alias at the layer that defines it, dispose test
fallbacks in afterEach so a failed assertion cannot leak a patched
document into the next test, and drop test cases that re-covered the
util through the composable.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Uo885XxwhN8wfC4oCtR48
code-review pass over the save-picker change.
The launch screen listed every save this emulator wrote, but the broker only
restores .zip archives, so a bare save file could be named as the one about to
be restored while a much older archive actually went up. One restorable list
now feeds the panel, the tab and the picker alike.
A claim that carries a pick looks the save up by id instead of loading every
save on the ROM to scan for it, and the emulator comparison normalizes both
sides so a config value that is not already lowercase cannot silently match
nothing.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The fallback that emulates the Fullscreen API gated on a user-agent
sniff for iOS. Both branches of that check also match iPad, where the
API genuinely works behind the webkit prefix, so the fallback was
replacing a working native implementation with a fixed-position div:
iPad players lost real fullscreen and kept the browser chrome.
Gate on capability instead. iPhone has no element fullscreen at all
(caniuse note 5, still current for iOS 27), iPad has the prefixed API,
everything else has the standard one, so probing Element.prototype puts
each platform on the best implementation it has and retires the fallback
by itself if iPhone ever ships the real thing.
Centralise the rest behind usePlayerFullscreen. Fullscreen was reaching
the five players five different ways, and the fallback was installed by
only one of them, so the shared "start in fullscreen" toggle did nothing
on iPhone in the other four. The composable installs the fallback for
the scope and wraps vueuse's useFullscreen, which brings the webkit
prefix handling that Stream's hand-rolled version lacked. Players whose
library drives fullscreen itself call it without a target: the fallback
patches the same prototype the library reaches for.
The fallback also has to expose document.fullScreen. It is the
deprecated alias support probes read to decide the API is usable, and
without it vueuse treats the polyfilled API as unsupported and enter()
silently does nothing.
Drops playing.setFullScreen, which had no callers. The fullScreen state
it wrote is still referenced by v1 and cannot go until that tree does.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Uo885XxwhN8wfC4oCtR48
The settings tiles, setup wizard step and scan reference dialog each
hand-rolled their own provider card markup and duplicated the provider
display data (names, logos, links, locale keys) three times. The
LaunchBox and Flashpoint tiles in the settings grid also showed a gap
under the footer: the tile was not a flex column, so a card stretched
by a taller sibling in its grid row left the spare space below the
footer instead of above it.
- Add the MetadataProviderCard shared composite with tile and row
layouts, status chip, setup/caveat pills, and #description /
#actions slots, plus a Storybook story covering both layouts.
- Add the METADATA_PROVIDER_INFO registry as the single home for
provider display data; all three surfaces derive from it. This
normalizes "Flashpoint Archive" -> "Flashpoint" and
"How Long To Beat" -> "HowLongToBeat".
- Pin the tile footer to the card's bottom edge, fixing the gap.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CI's check-v1-frozen fails any diff touching
frontend/src/{views,components,console,layouts} without the
allow-v1-changes label, which is reserved for sanctioned critical bug
fixes. A deprecation comment is not one, so the annotation comes out
rather than bypassing the guard. The divergence is documented on the v2
fork instead.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Uo885XxwhN8wfC4oCtR48
v2's EmulatorJS player reached into the frozen v1 tree for
installIOSFullscreenShim. The v1 implementation hides app chrome via
Vuetify selectors (.v-app-bar, .v-bottom-navigation, .v-navigation-drawer),
which match nothing in v2: that UI uses no Vuetify, and the player already
unmounts AppNav/BottomNav through useStageActive. The nav-hiding half was
silently inert on iOS in v2.
Fork the shim to src/v2/utils/playerFullscreen.ts with the nav handling
dropped and the hardcoded black swapped for --r-color-canvas-bg, per the
v2 zero-hex-literal policy. The v1 export is marked @deprecated rather
than changed, as the v2 constitution prescribes for coexistence forks.
Adds the test coverage the shim never had.
Also removes src/utils/indexdb-monitor.ts, which has had no importer in
either UI.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Uo885XxwhN8wfC4oCtR48
The component resolves the icon, text and tooltip that Home used to build
at the call site, and the facet branch had no test of its own:
SimilarGamesGrid, its other caller, has no test file.
Also inlines the single-use seed icon and trims three comments to the
repo's limits.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01427KQPf6WHJQ8feMKYp24Z
Capping the caption at `--r-card-art-w` read the global 158px, but
GameCard sets that token on itself, so the mobile override to 130px never
reached the sibling caption: a long one widened the wrapper past the
cover and threw the centring off. Pinning it the way GameCard pins its
own label tracks whatever width the card resolves to, size variants
included, and keeps the caption out of the row's scroll track.
Also strengthens the Home caption test, which passed on the key alone and
so missed a dropped interpolation value.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01427KQPf6WHJQ8feMKYp24Z
`reasonLabel` suffixed the starting year with a hard-coded "s", so every
locale rendered "1990s" - Japanese included, where it reads 1990年代.
Decades join the other translated facets, which collapses the function to
a single branch now that the phrasing carries its own value.
The Czech and Polish forms are the ones worth a native-speaker look.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01427KQPf6WHJQ8feMKYp24Z
Icon, text and tooltip were each deciding separately whether the feed
knew the seed game, so the same condition was tested four times over. A
single computed returns the whole caption or nothing, which also drops
the icon's v-if: every branch now has one.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01427KQPf6WHJQ8feMKYp24Z
Satisfies vue/attributes-order, which wants GLOBAL attributes ahead of
UNIQUE ones. The ordering predates this branch, but trunk's pull-request
mode compares against the upstream baseline by position, so shifting the
block up six lines resurfaced it as a new issue and failed trunk_check.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01427KQPf6WHJQ8feMKYp24Z
The caption under a recommended game card was left-aligned while the card
title above it was centred. Centre the caption instead of left-aligning
the title, so the change stays inside the recommendation feed rather than
shifting every GameCard in the gallery, the similar-games grids and the
match-ROM picker.
Two things stood in the way of centring:
- "Because you played X" never fit the cover width, so it filled the
caption and could not centre. It now captions the seed game on its own,
with a play icon, the way every facet reason is captioned; the full
sentence moves to the title tooltip, so no locale keys change.
- The ellipsis sat on the flex container, where it does nothing: an
anonymous text run has no box to truncate, so an over-long caption was
cut mid-word. It now lives on a real child span.
Also nudge the reason icon onto the caption's optical centre. MDI glyphs
centre on the em box, leaving them ~2px low against the text's cap height.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01427KQPf6WHJQ8feMKYp24Z
The live ticker rescheduled itself through requestAnimationFrame with no
stop condition, so the loop kept running after the story unmounted. Once
the suite tore the environment down, a pending callback fired against a
gone requestAnimationFrame and failed the run with an unhandled
ReferenceError, even with every test passing.
Drive it from an interval started on mount and cleared on unmount, the
way the RProgressCircular and RImg animated stories already do.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The member picker reused patcher.select-file, so a ROM with several base
files rendered two dropdowns both labelled "Select file". Add
patcher.select-archive-member across all 18 locales and use it.
Treat an empty archive_member_name form field as "not specified" rather
than as a member name that matches nothing.
Fold getZipMembers into the archiveMembers computed and watch that, so
the selection also resets when the member list itself changes.
Add PatcherTab coverage for sending the selected member, typed against
RomArchiveMember so the fixture cannot drift from the schema.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
review-polish pass over the save-picker change.
The comments explaining why an older pick only lands where the broker clears
the save tree said the same thing in four places, so each one now carries only
what its own reader cannot get from the code. The save fixture in the launch
screen test becomes a typed factory, which the emulator-scoping case it did not
cover yet now uses.
code-review pass (xhigh, --fix) over the save-picker change.
The launch screen inherited `user_saves` ordered by `updated_at` from the rom
schema, while the backend picks the archive to restore by `(created_at, id)`.
A content-hash rewrite on an older row was enough to make the two disagree, so
the no-picker panel could name a save the broker would not restore. The list
is now sorted the way the backend orders it.
Also give the restorability rule one home on the backend, so the validator and
the selector cannot drift, and correct a stale comment that still called the
memory card id claimSession's third argument.
Containers whose broker clears the save tree before restoring can land an
archive older than the container's own files, so offer the pick there and
validate it at claim time.
The browser capture read #videoCanvas by id, but the default path routes
frames through a MediaStreamTrackGenerator into a hidden #videoStream, so
drawImage returned a transparent bitmap. That still carries PNG magic, so
the backend accepted it and filed a blank thumbnail against a good state.
pull_state_to_library now asks the broker for the container's own capture
first, which is the same route for every emulator, and falls back to an
embedded frame (PCSX2) only when the broker answers 404. The browser
capture, its Redis stash, and the /state-frame endpoint are gone.
The providers row dropped a grid provider's match cover whenever that
provider was configured, even when its grid came back empty, so a
timed-out CDN probe hid the one Steam capsule the match had found. The
row now only drops a provider whose result set is actually in the grid.
A source listed twice in the cover priority handed the picker its
covers twice; the priority helper now keeps a source's first position
only, for every caller. The v1 cover dialog keys its panels by
provider as well as name, since both providers can return the same
title. The provider chips grow to the touch target on touch and
gamepad input.
The invalid-key regression test now raises the adapter's own exception
class, and the endpoint gate is covered with Steam as the only enabled
provider. A component test drives the dialog wiring: chips filter the
grid, Steam covers are handed off untouched, and the providers row
keeps a match cover whose grid is empty.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Untv32z88QMZ2yRSsTgGcC