Commit Graph

11392 Commits

Author SHA1 Message Date
Georges-Antoine Assi
a5f37d32e3 refactor: drop file-less roms in the query, not after loading
Every surface that enumerates roms to point at their files was fetching the
whole platform and discarding the file-less ones in Python. Give filter_roms a
`physical` filter to sit alongside `missing`, and pair the two in
HAS_FILE_ON_DISK_FILTERS, the query-side twin of Rom.has_file_on_disk.

- The device feeds lose _servable_roms(); the three get_roms_scalar calls spread
  the filters instead, so the dropped roms no longer get their RomFile rows
  selectin-loaded just to be thrown away.
- Both exporters filter in SQL. Pegasus was collecting and copying assets for
  roms it went on to skip, and the ES-DE guard's `not rom` arm was dead.
- The bulk zip download applies them to its platform/collection selector. A
  physical game contributes no files, so it only inflated the rom count in the
  log line, the generated "N ROMs (crc).zip" filename, and the bulk cache
  namespace. Roms named by explicit id still bypass this.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-26 21:42:01 -04:00
Georges-Antoine Assi
c2547ec68c fix: model "no file on disk" once instead of per call site
Physical games encoded file-lessness as is_physical=True with
missing_from_fs=False, while every consumer asked the same question through
missing_from_fs alone. Each of those consumers was therefore wrong for a
physical game, and each would have needed its own is_physical rider.

Add Rom.has_file_on_disk, covering both reasons a rom has no file, expose it
on RomSchema, and route the file-dependent surfaces through it:

- The ES-DE and Pegasus exporters no longer emit entries whose path points at
  the .physical sentinel folder.
- The device feeds gain a single _servable_roms() seam, so all three entry
  points that enumerate roms drop the ones with no file rather than minting
  download URLs for them.
- GET /roms/{id}/content answers 404 with a reason instead of falling through
  to the generic "no files found".
- v2 gates Play, Download, copy-link and the QR share on the flag, in
  useCanPlay and useGameActions rather than at each of the surfaces.

The is_physical exclusions in mark_missing_roms stay: they are what maintains
the invariant that a physical game is never flagged missing, and the one in
the missing filter keeps a stray flag away from the cleanup task that
hard-deletes.

Also translate the physical-game and barcode strings, which had been copied
into eleven locales as English.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-25 22:26:20 -04:00
Georges-Antoine Assi
08901ca3a9 cleanup: reuse, simplify and trim the physical-games feature
Backend:

- Drop the post-scan re-assert of is_physical/upc/fs_path in
  create_physical_rom; scan_rom already forwards them in rom_attrs. The test
  fake was written to drop those fields to exercise the dead path, so it now
  matches the real scan_rom contract.
- Extract build_hashless_fs_rom() and use it from both the physical endpoint
  and the scan socket, which built the same FSRom literal by hand.
- Return added_rom instead of re-fetching it; add_rom is already decorated
  with @with_details, so get_rom repeated the whole eager-load fan-out.
- Pair invalidate_filter_values_cache() with refresh_affected_smart_collections(),
  as every other rom-mutating endpoint does.
- Reword the 409 detail: build_physical_fs_name uniquifies the name, so an
  IntegrityError can only mean a concurrent add.
- upc_handler: inline the single-use base_url and hoist the minimum title
  length to a module constant.

Frontend:

- Load BarcodeScannerDialog lazily. GlobalDialogs is mounted on every page, so
  the static import chain put ZXing (~438 KB) in the eager layout chunk. The
  scanner's watcher now runs immediate/post so it still starts when mounted
  behind a v-if.
- Guard the scanner against a teardown that races the decodeFromConstraints
  await; closing during the permission prompt left the camera on and the
  decode loop running.
- Render the UPC scan trigger through RTextField's append-inner adornment
  instead of a hand-built flex row.
- Type the createPhysicalRom payload with the generated PhysicalRomCreateForm
  and drop the metadataSources argument, which had no caller.
- Declare @zxing/library directly; it was imported but resolved transitively.
- Drop two write-only refs, scope the reader local to startCamera, and trim
  comments that restate the code.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-25 20:47:56 -04:00
Georges-Antoine Assi
69938b1cee add support for physical (DB only) games 2026-08-25 20:19:05 -04:00
Georges-Antoine Assi
18ecf8f825 Merge pull request #3816 from rommapp/feat/walkthrough-documents
feat: walkthrough documents with reading progress and GameFAQs import
2026-08-25 19:50:10 -04:00
Georges-Antoine Assi
3c95231294 feat: walkthrough documents with reading progress and GameFAQs import
Unify manuals and walkthroughs on one document model instead of a
separate walkthrough subsystem. Walkthroughs are RomFiles under a new
WALKTHROUGH category with an optional RomFileDocMeta provenance sidecar,
and reading progress is a per-user RomFileUser row keyed on rom_file_id
so the same mechanism covers manuals and walkthroughs.

Backend:
- models: RomFileCategory.WALKTHROUGH, DocSource, RomFileDocMeta,
  RomFileUser; migration 0110 (enum value + two tables, cross-DB)
- serve .txt/.html documents inline (HTML under a sandboxing CSP);
  add .txt to allowed manual files
- endpoints: walkthrough upload / GameFAQs fetch / delete, and per-user
  reading-progress GET (ROMS_READ) / PUT (ROMS_USER_WRITE, like notes, so a
  kiosk guest capped to the read scopes cannot write)
- last_page is range-checked, so an out-of-range value is a 400 rather than
  an integer column overflow
- the guide body is read under the size cap instead of being buffered in
  full and truncated afterwards
- GameFAQs import extracts text only (stored as .txt); no remote HTML is
  persisted or served. Host-allowlisted on top of the SSRF-safe client
- a Cloudflare bot challenge is detected and reported as "open it in your
  browser and upload the text" instead of an opaque 403
- reading-progress upsert retries as an update on a unique-constraint
  race, so concurrent saves for one user/file can't 500
- a GameFAQs guide is removed from disk again if indexing it fails,
  rather than being left unreferenced
- tests for CRUD, progress, the GameFAQs parser/URL validation, and
  hidden-rom masking on every walkthrough route

Frontend (v2):
- TextViewer (.txt/.html), useReadingProgress composable, WalkthroughSubtab
  (upload + add-from-GameFAQs-URL + delete + progress), wired into MediaTab
- ManualSubtab renders .txt manuals; walkthrough category surfaced in
  FilesTab; regenerated types; i18n keys across all locales
- a pending scroll position is committed before the viewer follows a new
  document, so switching files mid-debounce no longer drops it
- WalkthroughSubtab gates upload, the GameFAQs URL field, and delete on
  useCan("rom.edit"), as ManualSubtab already does

AI assistance: implemented with Claude Code (Opus 4.8). The data-model
design, backend, migration, tests, and v2 UI were AI-authored under human
direction. Alternative approach to #2892.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-25 19:40:20 -04:00
Georges-Antoine Assi
76bc1574c6 Merge pull request #4271 from mvanhorn/fix/1893-nested-arcade-rom-filenames
fix: Preserve nested arcade ROM filenames
2026-08-23 21:28:07 -04:00
Georges-Antoine Assi
f355368ac0 Merge pull request #4267 from jgarcesres/fix/oidc-pkce-s256
fix(auth): send PKCE on the OIDC authorization request
2026-08-23 21:17:09 -04:00
Matt Van Horn
86d8aea09c fix: Preserve nested arcade ROM filenames
Fixes #1893
2026-08-22 21:16:35 -07:00
Juan Garces
6efcd0a1e7 test(auth): exercise the real OIDC client instead of a stand-in
The previous test built its own AsyncOAuth2Client and passed an explicit
code_verifier, so it asserted Authlib's behaviour rather than RomM's and
passed with or without the fix.

Drive oauth.openid.authorize_redirect (what /api/login/openid calls) and
assert the challenge on the redirect matches the verifier saved to the
session, which is the pair the callback needs to redeem the code.
2026-08-22 15:14:57 -05:00
Georges-Antoine Assi
41b307f00f Merge pull request #4266 from rommapp/dependabot/npm_and_yarn/frontend/brace-expansion-2.1.4
chore(deps-dev): Bump brace-expansion from 2.0.3 to 2.1.4 in /frontend
2026-08-22 15:55:03 -04:00
Georges-Antoine Assi
e3080c9fb3 Merge pull request #4264 from tmgast/perf/roms-list-per-page-work
Fix N+1 and entity sort in GET /api/roms
2026-08-22 15:54:44 -04:00
Georges-Antoine Assi
80dff4f7cf refactor(roms): fold the rom list test fixtures onto shared helpers
Three fixtures rebuilt the Rom literal that _add_rom already assembles, and
the RomFile boilerplate repeated six times. Adds _add_file, drops the
dict[str, object] cast that forced a type: ignore, and trims the comments.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 15:46:20 -04:00
Georges-Antoine Assi
b2581bf7ec chore(alembic): rechain the rom_files category index after 0108
master landed 0108_roms_primary_region on the same parent, so the index
migration moves to 0109 and revises that one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 15:19:39 -04:00
Georges-Antoine Assi
217623a0c6 Merge remote-tracking branch 'origin/master' into perf/roms-list-per-page-work 2026-08-22 14:34:42 -04:00
Georges-Antoine Assi
6a25a21656 Merge pull request #4263 from sdornan/claude/compassionate-chatelet-c7bcc7
refactor(v2): give the metadata provider taxonomy one home
2026-08-22 14:33:24 -04:00
Juan Garces
316734b3fb style(auth): trim the PKCE comment and docstrings to repo convention
CLAUDE.md caps a comment at one or two lines and a docstring at one
sentence. The rationale that was inline (the failure mode, the
backwards-compatibility argument, the OAuth 2.1 reference) belongs in the
PR body, so what stays is the one fact the code cannot convey: Authlib
derives no code_verifier unless code_challenge_method is set.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 13:08:07 -05:00
Juan Garces
eadd8fe5c3 fix(auth): send PKCE on the OIDC authorization request
Authlib only derives a code_verifier when `code_challenge_method` is set
on the client, so the OIDC client registered in `decorators/auth.py` sent
no `code_challenge` at all. Against a provider that mandates PKCE the user
authenticates successfully and is then redirected back without a `code`,
which surfaces as a generic login failure with nothing useful in the logs.

Set `code_challenge_method: "S256"` in `client_kwargs`. Providers that do
not support PKCE ignore the extra parameters (OIDC Core 3.1.2.1), so this
is backwards-compatible, and OAuth 2.1 requires PKCE of every client.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 12:47:26 -05:00
Georges-Antoine Assi
87638807c7 refactor(v2): give the grouped provider sections one home
Each of the three provider surfaces had hand-rolled the same section
labels and the same order-and-partition block. The setup wizard's step
and the scan info dialog held byte-identical `GROUP_LABELS` maps, so
those move to `SETUP_GROUP_LABELS`, and the partition becomes
`groupProviders()` with a unit test. The settings view keeps its own
labels, since its `settings.*` keys and section icons differ.

Trims the comments that explained the taxonomy instead of recording what
the code cannot say.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 12:39:02 -04:00
Georges-Antoine Assi
57badfd626 Merge pull request #4262 from sdornan/claude/beautiful-colden-2f5983
fix(hltb): keep a pinned HowLongToBeat match through a rescan
2026-08-22 12:04:22 -04:00
Georges-Antoine Assi
14afa111b1 test(hltb): drop the unused Playmatch patch from the scan tests
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 11:36:15 -04:00
Georges-Antoine Assi
7f8f87e538 refactor(hltb): inline the HowLongToBeat match resolution
The helper had a single caller, so the stored-ID branch now sits in
fetch_hltb_rom like the Flashpoint and MobyGames fetchers. Its tests move
with it and drive the same six cases through scan_rom.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 11:27:54 -04:00
Georges-Antoine Assi
d698ecd97c Merge pull request #4261 from sdornan/claude/auto-collection-count-bug-e07d62
fix(frontend): keep collection ROM counts in step with the gallery
2026-08-22 11:11:25 -04:00
Georges-Antoine Assi
97f2c3daa5 chore(frontend): trim the collection refresh comments
Cut the rationale that was repeated at every caller down to one line on
the store method, drop the change-history comment from the store test,
and narrow errors with `axios.isAxiosError` the way the rest of the
frontend does instead of a hand-written cast.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 10:51:40 -04:00
Georges-Antoine Assi
3ccf901de6 Merge pull request #4260 from sdornan/feat/region-priority-default-sibling
feat(gallery): pick a game's default version by region priority
2026-08-22 10:20:18 -04:00
dependabot[bot]
371a383d65 chore(deps-dev): Bump brace-expansion from 2.0.3 to 2.1.4 in /frontend
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 2.0.3 to 2.1.4.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v2.0.3...v2.1.4)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 2.1.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-22 13:46:29 +00:00
Georges-Antoine Assi
db9f61c1f5 Merge pull request #4254 from sdornan/claude/starlette-upgrade-591133
chore(deps): bump starlette from 1.0.1 to 1.6.0
2026-08-22 09:44:03 -04:00
Georges-Antoine Assi
6aa1c69252 Merge pull request #4252 from sdornan/claude/server-stats-platform-links-ea2921
feat(v2): link Server Stats platform rows to their platform
2026-08-22 09:37:10 -04:00
Georges-Antoine Assi
6101d1c4a7 Merge pull request #4251 from rommapp/fix/4248-v2-core-persistence
fix(v2): remember the core a game was launched with
2026-08-21 19:53:59 -04:00
nendo
1c40160201 test(roms): pin the derived file stats to the subqueries they replace
The with_files path computes multi_file, top_level_file_count and
has_soundtrack in Python; the other path reads them from correlated
subqueries. The differential test asserts both answer the same for a
flat file, a folder with two top-level files, a nested single file, a
soundtrack folder and a rom with no files at all, so neither predicate
can be edited without the other.

Also assert a rom's files load in a fixed number of queries rather than
one per file.

Claude-Session: https://claude.ai/code/session_01J1pbRJBY3PatzkB5skQNEU
2026-08-22 08:49:42 +09:00
Sam Dornan
9617d6de3a fix(v2): stop metadataProviderGroup classifying prototype members
`in` walks the prototype chain, so metadataProviderGroup("toString")
returned the inherited function rather than undefined, breaking the
declared return type. Object.hasOwn keeps the lookup to the map's own
keys.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 18:47:08 -05:00
Sam Dornan
f81d5115a0 refactor(v2): make the proxy group's exhaustiveness real
MetadataProviderKeyIn claimed a consumer would get a compile error when
a group grew a member, but the hash-matcher code branched on the key:
setHashMatcher treated every non-Hasheous key as Playmatch, so a third
proxy would silently share Playmatch's stored flag and be missing from
the switch list.

Both now hang off a Record keyed by HashMatcherKey, so adding a proxy to
the map fails to compile until it declares its own stored flag and its
name/logo/gate. providerKeysInGroup returns the narrowed union to make
that possible, and the catalog filter asks the taxonomy for the group
instead of matching against the proxy key list.

Payload wiring stays hand-written: which slot a matcher fills is set by
its backend gate, not by the taxonomy.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 18:44:57 -05:00
Sam Dornan
54f63e0544 refactor(v2): give the metadata provider taxonomy one home
The "general catalogs vs specialised sources vs hash proxies" split was
declared four separate times, each with its own shape: the scan
composable's key sets, and the provider arrays in the setup wizard's
metadata step, the settings view and the scan info dialog. Adding Steam
in #4241 filed it as specialised in three of them while the composable
treated it as general, and the fix took two passes because the first
sweep only found two of the three stragglers.

Provider slug to group now lives in one map, and each surface derives
its sections from it instead of declaring them, so the three near
identical markup blocks per surface collapse into one loop. Per-surface
presentation data (logos, locale keys, websites, docs URLs, heartbeat
wiring, section icons) stays where it is used. The hash matcher key
list and union are derived from the proxy group too.

Rendered providers, their order and their fields are unchanged; rows
and sections gained data-provider / data-group attributes as test
hooks.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 18:39:00 -05:00
Sam Dornan
3b9acc3e34 docs(hltb): state which scans resolve by stored ID
The docstring read as though a stored ID always wins, but the ID branch is
scoped to UPDATE and to UNMATCHED with no metadata. Say so, and cover the
COMPLETE fall-through with a test so the exclusion reads as deliberate.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 18:26:31 -05:00
nendo
97d2f7b5b7 perf(roms): trim per-page work on the roms list endpoint
Remove loader-option and query work the list endpoint discards:

- Batch the has_notes flag instead of eager-loading Rom.notes, whose
  backrefs to roms and users are both lazy="joined".
- noload RomUser.user everywhere rom_users feeds RomUserSchema, which
  carries no user fields.
- noload Rom.platform and Rom.metadatum in get_siblings_for_roms, where
  load_only narrows columns but not relationships.
- Let callers that resolve siblings themselves skip the sibling
  relationship load entirely.
- Eager-load RomFile.track_meta in get_files_for_roms, matching every
  other call site.
- Order the page over bare ids and fetch rows by primary key when the rom
  id index is off, instead of sorting the entity through a filesort.
- Derive the file-stat flags from the page's files when with_files is
  set, instead of running three correlated subqueries per row.
- Index rom_files on (rom_id, category).

Claude-Session: https://claude.ai/code/session_01J1pbRJBY3PatzkB5skQNEU
2026-08-22 08:19:18 +09:00
Sam Dornan
6932abc5a9 fix(hltb): keep a pinned HowLongToBeat match through a rescan
fetch_hltb_rom called the fuzzy filename search unconditionally, so an
UPDATE scan re-guessed the match even when rom.hltb_id was already set. Any
other game scoring above the similarity floor replaced an ID the user had
pinned by hand in Edit ROM.

get_rom_by_id has existed since #2926 was fixed, but only the Edit ROM path
called it. Extract resolve_hltb_rom as a module-level function, following
resolve_launchbox_rom, so the ID-first branch is covered by tests rather
than trapped in a closure over scan_rom's frame.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 18:06:07 -05:00
Sam Dornan
96311d7dac fix(frontend): treat a refused collection read as authoritative
A 404 or 403 on the per-collection read is the server saying the collection
is gone or off limits, so falling back to the cached copy kept a deleted
collection on screen (and a virtual one that a rescan took below the ROM
threshold that generates it). Those two statuses now drop the cached entry,
which is what makes the caller read not-found, while any other failure still
leaves the cached copy to fall back on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 13:13:05 -05:00
Sam Dornan
a0ad833468 fix(frontend): make the collection refresh race- and failure-safe
Three holes in the refresh flow, from PR review:

A refresh asked for while a virtual-collection fetch was in flight hit the
in-flight guard and was dropped, so the pre-change response stayed cached
for the session. It is now queued behind the fetch and runs when it settles.

The refresh promise rejected on a failed request while both callers fire it
in the background, which surfaced as an unhandled rejection and a second
console error. It resolves empty instead, leaving the cached slice alone.

The per-navigation read gave the loader an await before it wrote the page
and drove the gallery, so a slow read could land after the route moved on
and show a collection nobody was looking at. Only the newest load may write
now, which also drops the duplicate gallery load the route guard and the
route watch used to cause between them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 13:10:10 -05:00
Sam Dornan
f4ac8a4e06 fix(frontend): keep collection ROM counts in step with the gallery
A collection's ROM count was rendered from the collections store, whose
lists are fetched once per session and never refreshed. Virtual collection
membership is derived from ROM metadata, so every scan and every metadata
match moves it with no collection write to update that copy from, leaving
a stale count in the head band next to a gallery that fetches live.

The collection page now re-reads the collection it is opening from the
server, falling back to the cached copy only when that request fails, and
the store re-reads its loaded virtual collections when a scan settles or a
metadata write lands, so the tiles and the open page follow along.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 13:00:35 -05:00
Sam Dornan
3819c8762d fix(gallery): rank region names by their shortcode's position
region_names_for_priority expanded the configured shortcodes into a flat
list of region names and _region_rank turned each name's index into its
rank. Two names claiming one shortcode ("nl" for both Holland and
Netherlands) therefore ranked unequally, so a Holland-tagged rom always
beat a Netherlands-tagged one instead of both falling through to the
filename tiebreak. The helper's own comment claimed otherwise.

It now returns name -> rank keyed on the shortcode's position, so aliases
tie. Unknown and repeated shortcodes still contribute nothing rather than
shifting the ranks after them, which is now covered by tests too.

Reported by Greptile and Copilot on #4260.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 12:11:56 -05:00
Sam Dornan
5c43a97687 feat(gallery): pick a game's default version by region priority
The group_by_meta_id dedup window ordered each sibling group by
is_main_sibling then fs_name_no_ext, so absent a manual override the
gallery entry went to whichever filename sorted first: "(Demo)" beat
"(Europe)" beat "(USA)".

Two ordering terms now sit between those: a full release outranks a
pre-release, then the configured scan.priority.region order decides.
Release status comes first because a demo is not a substitute for the
game, so a Japanese release wins over a USA demo.

scan.priority.region already existed but only steered metadata and
artwork selection, so its description is reworded across all locales.

Regions live in a JSON column that no covering index can carry, and 0107
measured what one uncovered reference costs this window: the plan drops
from `type=index, Using index` to `type=ALL, key=NULL`, four times per
gallery page load. 0108 adds a STORED generated column over regions[0]
and covers it in idx_roms_sibling_cover instead, so the ranking reads a
scalar. The engine keeps it in sync and ALTER TABLE populates existing
rows, so no scan hook and no backfill are needed.

Pre-release detection matches the filename rather than the parsed `tags`
column: tags keep the dumper's casing, and fs_name_no_ext is already in
the index.

Reordering the priority list changes which rom represents a group, so the
cached gallery sidecars are dropped when the setting changes.

Closes #1528

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 11:55:07 -05:00
Georges-Antoine Assi
01deed2d76 Merge pull request #4250 from rommapp/chore/review-polish-skill
chore(agents): add a review-polish skill from recurring PR corrections
2026-08-20 21:47:04 -04:00
Georges-Antoine Assi
76ff5c9b91 Merge pull request #4246 from Florian-Cullmann/agent/fix-invitation-registration-errors
Fix missing v2 auth notifications
2026-08-20 21:35:29 -04:00
Sam Dornan
e93eb879a2 chore(deps): bump starlette from 1.0.1 to 1.6.0
Drop the `exclude-newer-package` pin that froze starlette resolution at
1.0.1, and widen the version specifier to allow the 1.6.x line.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-20 09:00:58 -05:00
Sam Dornan
c77b6407c3 feat(v2): link server stats platform rows to their platform
Each row in Settings > Server Stats > Platforms now navigates to that
platform's gallery. Rows render as anchors so modifier-click opens a new
tab, and a plain click runs the same platform-icon morph the Platforms
index rows use. The regions expand toggle stops its click so expanding
regions never navigates.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-20 08:24:49 -05:00
Georges-Antoine Assi
4eb80a7e95 fix(v2): remember the core a game was launched with
The v2 player read `player:<rom_id>:core` and `player:<platform_slug>:core` at
mount but never wrote either, so picking a core applied for that session only
and was forgotten on reload. The v1 player writes both on launch, so v2 was
missing that half.

Arcade is where this bites: its core list starts with mame2003, and resolution
falls back to the first entry, so a library that only runs under mame2003_plus
had no way to make the switch stick.

Both directions now go through one module, so the read and the write cannot
drift apart on the key format.

Fixes #4248

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 09:11:37 -04:00
Georges-Antoine Assi
7b993439c0 fix(agents): resolve two contradictions in the new guidance
Layer 3 is ephemeral state, so telling agents to write it to localStorage
contradicted the layer it sits under. Per-entity device preferences are their
own thing: they persist per device like layer 1 but stay keyed by entity and
out of user.ui_settings, so they get their own paragraph.

Ordering: review-polish renames things and edits tests, so it has to run
before the stack checks rather than after trunk. State the order explicitly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 08:07:39 -04:00
Georges-Antoine Assi
9b186dce4d chore(agents): add a review-polish skill from recurring PR corrections
Categorized the 54 commits pushed on top of contributor work across the 37
most recent approved PRs, and wrote the recurring patterns down.

The dominant one is comment and docstring trimming: 17 of the 54 commits do
nothing else, and CLAUDE.md already forbids it in three separate rules. The
new skill names the shapes that keep landing (change history, restatements of
the adjacent line, defences of an obvious choice, comparisons to the
alternative not taken) and carries the counter-rule too, since over-extracted
constants get trimmed the same way.

The stack-specific patterns go to the skills that already own them: alembic
numbering collisions and if_not_exists to backend-development, snapshot-before-
await and narrow watch sources to frontend-v2-patterns, the trunk fmt step and
its recurring hits to pre-pr-verification, en_US spelling to frontend-i18n.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 07:57:39 -04:00
Florian Cullmann
325cfe0e13 Fix auth notification rendering 2026-08-20 00:35:38 +02:00
Georges-Antoine Assi
42e8043372 Merge pull request #4245 from Florian-Cullmann/fix/4244-zone-identifier
Ignore Windows Zone.Identifier files
5.2.0
2026-08-19 17:39:44 -04:00