Commit Graph

12587 Commits

Author SHA1 Message Date
zurdi
8feef65006 refactor(v2): give the list view's repeated parts one home
The redesign wrote the same compact sort control into three headers, the
same compact row anatomy into four components, and a second rAF tween
beside the one it had just added.

- Extract ListSortMenu, which also settles the three different answers
  the headers gave when no column carries the current sort.
- Move the compact row's flex/stack/facts rules to global.css, beside
  the list chrome already there.
- Share one `tween` helper between the two animating composables.
- Let useAnimatedNumber take an already-formatted value, so Stat and
  PageHeader stop repeating the same number-or-string branch.
- Make the tick column a layout token instead of a constant, a CSS
  variable declared only for phones, and three literal fallbacks.
- Read the expansion duration from the motion token it documents.
- Drop the `compact` aliases that only renamed `smAndDown`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
2026-09-20 19:49:51 +02:00
zurdi
32eb667606 fix(v2): address the code-review pass on the list view
- Stop the pinned index header from subtracting the gutter twice, which
  pushed its glass past the right edge and scrolled the page sideways.
- Give the compact skeleton row the tick-column spacer the real row has,
  so covers and titles don't jump when the first window resolves.
- Name the sort menu "Sort by" when the gallery's order is one the
  columns don't carry, instead of claiming the first column.
- Paint a rolling counter's starting value before the first frame, which
  a background tab never serves.
- Dispose the expansion animation with its scope.
- Drop the selection notch's live region, which read out every frame of
  the roll, for a labelled image.
- Apply the letter-jump deadline on the scroll-end path too.
- Localise the platforms row's game count on desktop as the compact row
  already did.
- Delete rules and constants the compact branches made unreachable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
2026-09-20 19:31:16 +02:00
zurdi
13a1a96c79 fix(v2): drop the gallery controls the current sort can't honour
The backend indexes first letters off a text column only, so ordering by
size or date answers with an empty char_index while the letter bar kept
painting all 28 of them, and the new A-Z button opened a sheet of dead
letters. List mode had the same shape of problem in the toolbar, where
the grouping and sort clusters sat there inert.

- Add `orderSupportsLetters` and hide the strip, the A-Z button and the
  strip's reserved column behind it.
- Hide the toolbar's grouping and sort clusters in list mode (the column
  header owns sorting there) instead of disabling them.
- Take the strip's width out of the grid packer's inset wherever the
  strip doesn't render, phones included.
- Read the list header's sort menu off `getSortOptions`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
2026-09-20 17:59:54 +02:00
zurdi
9696de8ee8 fix(v2): rebuild the gallery list view for phones
The list header was built for a desktop table: it floated as its own
island over the rows, which showed through its blur, and the table
underneath it scrolled sideways on a phone.

- Pin the header edge to edge as one glass surface with the toolbar,
  tinted only once pinned, keeping its border as the divider.
- Trade the columns on sm-and-down for a two-line row (cover, title,
  facts) with a chevron that rolls a three-column detail panel open,
  so nothing scrolls sideways.
- Swap the alpha strip for an A-Z menu in the toolbar on phones and
  tablets, and land letter jumps flush under the toolbar in both
  layouts.
- Give the platforms and collections indexes, and the missing-games
  list, the same row.
- Move the selection counter into a notch above the floating bar and
  animate the bar in.
- Roll every counter up to its new value (useAnimatedNumber).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bZ7R3xC73MZu1vTNuatPK
2026-09-20 17:44:40 +02:00
Sam Dornan
8e61199d7b fix(security): keep CSRF in force when a session cookie is present (#4648) 2026-09-20 10:01:56 -04:00
Sam Dornan
d766604359 feat(frontend): tie gallery sorting to URL query params, add a grid sort-axis selector (#4641) 2026-09-19 17:37:56 -04:00
Sam Dornan
4ffc7c5ce1 style: apply the formatting requires-python already implies (#4638) 2026-09-19 12:33:45 -04:00
Georges-Antoine Assi
57e6462db8 Merge pull request #4634 from rommapp/claude/patcher-zip-bomb-budget
fix(patcher): budget a zip member as it is extracted
2026-09-19 09:29:12 -04:00
Georges-Antoine Assi
3dc59f46ea Merge pull request #4636 from rommapp/claude/document-viewer-sanitization-comments
docs(files): state what actually guards an inline HTML document
2026-09-19 09:27:58 -04:00
Georges-Antoine Assi
2645d47217 test(patcher): type the archive-reader fake against the real signature
Annotating it to `read_zip_archive_files`'s own parameters and return type
pins the contract the fake stands in for, rather than accepting anything
through *args.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-19 09:23:19 -04:00
Georges-Antoine Assi
a806f8addd Merge pull request #4633 from rommapp/claude/upload-platform-visibility
fix(upload): mask a hidden platform on the chunked upload start
2026-09-19 09:22:18 -04:00
Georges-Antoine Assi
311534c6f9 Update backend/utils/media_types.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-09-19 09:20:04 -04:00
Georges-Antoine Assi
98fa14b010 Update backend/tests/endpoints/test_permissions_visibility.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-09-19 09:17:13 -04:00
Georges-Antoine Assi
5361dfee4a docs(files): state what actually guards an inline HTML document
Two comments described HTML documents as sanitized on ingest. Nothing
sanitizes them: the only `sanitize_*` helpers cover filenames and usernames,
and `is_html_document_file` is consulted at serve time only. The sandboxing
CSP and the viewer's iframe sandbox are the whole defence, so describe them
that way, and pin the header with a test before someone drops it believing
the sanitizer exists.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-19 08:48:39 -04:00
Georges-Antoine Assi
3e1779f119 fix(patcher): budget a zip member as it is extracted
The size checks around the extraction read `ZipInfo.file_size`, which is
whatever the uploader put in the header, and the check on the finished file
only ran once the member had been written in full. An archive whose method
zipfile cannot decode goes through 7zz, which decompresses it itself and
ignores that header, so a small declared size passed the pre-check while the
real member filled the disk.

Count the bytes as they are written and stop at the cap, which makes the
check on the finished file redundant.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-18 20:57:56 -04:00
Georges-Antoine Assi
0d0dce6e79 fix(upload): mask a hidden platform on the chunked upload start
`start_chunked_upload` loaded the platform without checking the caller can
see it, so a user with `roms.write` restricted by a permission group could
write a file into a platform folder hidden from them (a later scan ingests
it), and could tell a hidden platform from a missing one by the response.

Answer both cases identically so neither the write nor the enumeration is
possible.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-18 20:54:59 -04:00
Georges-Antoine Assi
d7f19eefeb Merge pull request #4626 from andest01/fix/storybook-theme-canvas
chore(storybook): light and dark theme switch work in storybook
5.3.0-beta.1
2026-09-18 16:47:38 -04:00
Georges-Antoine Assi
0f7f10ccbe Merge pull request #4627 from rommapp/dependabot/npm_and_yarn/frontend/md-editor-v3-6.5.4
chore(deps): bump md-editor-v3 from 5.8.5 to 6.5.4 in /frontend
2026-09-18 16:43:58 -04:00
Georges-Antoine Assi
da94431121 Merge pull request #4622 from rommapp/claude/typescript-upgrade-eval-j65v0x
chore(frontend): upgrade vue-tsc to 3.x and raise the TypeScript floor
2026-09-18 16:43:33 -04:00
Georges-Antoine Assi
99343f4fcc Merge pull request #4625 from rommapp/claude/gh-attach-screenshots
docs: upload PR screenshots with gh --attach
2026-09-18 16:43:05 -04:00
dependabot[bot]
2ab69d9e65 chore(deps): bump md-editor-v3 from 5.8.5 to 6.5.4 in /frontend
Bumps [md-editor-v3](https://github.com/imzbf/md-editor-v3) from 5.8.5 to 6.5.4.
- [Release notes](https://github.com/imzbf/md-editor-v3/releases)
- [Changelog](https://github.com/imzbf/md-editor-v3/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/imzbf/md-editor-v3/compare/v5.8.5...v6.5.4)

---
updated-dependencies:
- dependency-name: md-editor-v3
  dependency-version: 6.5.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-18 17:27:02 +00:00
Zurdi
6b93157c6f Merge pull request #4618 from rommapp/claude/unify-platform-collection-settings
feat(v2): unify platform/collection settings and fill the viewport
2026-09-18 18:52:11 +02:00
zurdi
86213445dc fix(v2): use the built-in Cancel on the token dialog's delivery step
Addresses Copilot's review: the delivery step still rendered its own Cancel
on the right of the footer. It now uses RDialog's `cancelable`, like the
config step, so Cancel sits left and reads the translated chrome label.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 18:38:37 +02:00
Stuart Anderson
60ebe4afc3 chore(storybook): light and dark theme switch work in storybook 2026-09-18 11:27:37 -05:00
zurdi
9509cb3cb1 refactor(v2): scroll the Platforms and Collections index with the page
IndexShell ran a full-viewport section with its own scroller under the top
bar. It now flows in the document like Home: the top bar's own glass follows
the window, and the toolbar still pins under it as one glass surface.
usePinnedToolbar tracks the window when given no scroller, measuring the
toolbar's natural top in page coordinates, and the top bar switches its glass
instantly whenever a pinnable toolbar is mounted (the handoff would otherwise
cross-fade).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 18:09:21 +02:00
zurdi
2e4f21122f refactor(v2): RDialog renders the Cancel button itself
`cancelable` adds an outlined Cancel at the footer's start that closes like
Escape (`update:modelValue` + `close`), with `cancel-disabled` for busy
states and `cancel-text` to rename it. Its label comes from the injected
chrome labels, so no call site passes common.cancel. The 27 dialogs that
hand-rolled Cancel use it; the lone-Cancel dialogs (manual target, barcode
scanner, load save/state) now match the rest, and the copy-link dialog's
text "Close" is outlined like every other one. ConfirmDialog keeps its own
slot to focus Cancel first, and the client-token dialog shows Cancel only
on its first step.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 18:09:09 +02:00
Georges-Antoine Assi
843e8296f5 docs: upload PR screenshots with gh --attach
gh 2.100.0 takes --attach '<file>#<alt text>' on pr create, pr edit and pr
comment, and rewrites a body reference to the local path into the uploaded
asset. The guidance no longer has to stop at handing the user file paths.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-18 11:55:38 -04:00
zurdi
b97ce5b014 Merge origin/master into claude/unify-platform-collection-settings
Brings in #4619 and #4620. The only conflicts were the 18 common.json
locale files, where both sides added keys; resolved as the union, sorted.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 17:51:39 +02:00
zurdi
15669bd54e review-polish: keep the new strip and badge comments to two lines
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 17:47:19 +02:00
zurdi
9f197d6a78 simplify: trim the pinned toolbar, strip and dialog leftovers
- The strip's JS fallback writes its shift on the strip itself, once per
  change, instead of restyling the whole gallery section every frame.
- usePinnedToolbar skips DOM reads and the throwaway observer while the
  toolbar or sentinel is missing (floating dock, teardown).
- GalleryShell: drop the always-true hasAlphaStrip, the no-op sentinel
  rules, unreachable var fallbacks and the local list-header height (now
  LIST_HEADER_HEIGHT_PX); one v-if covers sentinel and toolbar.
- Search leaves the query message to the shell.
- RBadge drops `floating`; a negative `inset` pushes the badge out.
- MemoryCardImportDialog puts Cancel in footer-start like every dialog.
- GalleryTabShell loses its redundant wrapper; stale comments trimmed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 17:41:46 +02:00
Sam Dornan
374f6dac4e Merge branch 'master' into claude/typescript-upgrade-eval-j65v0x
The overview table in docs/FRONTEND_ARCHITECTURE.md conflicted: master
updated the Vue row to 3.5 and re-wrapped the column, this branch bumped the
TypeScript row. Resolved by keeping master's table and carrying the
TypeScript 5.9.3 bump into it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvDZhPHsNguuX5zqFjDfSD
2026-09-18 15:39:20 +00:00
zurdi
15075dadf3 fix(i18n): route the gallery and platform views' literals through locales
Platform and Collection hard-coded their delete confirmation, success and
failure messages; Platform also its search placeholder and not-found
message. PlatformsIndex hard-coded its group-by tooltips and the Other,
Unknown generation and (Not) playable bucket headings, the setup wizard its
Other family group, the scan dialog its "Scanning …" snackbar, and the game
and platform list rows their "Open …" labels. 18 new keys, translated in
all 18 locales; group-by tooltips reuse gallery.view-flat/-grouped and the
error fallback reuses common.unknown-error.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 17:35:52 +02:00
zurdi
085e484971 feat(v2): scroll the AlphaStrip when its letters don't fit
On short viewports the strip clipped its last letters, and at rest (shifted
down with the toolbar) more of them ran below the viewport. The strip now
scrolls, with a hidden scrollbar and `safe center` so overflow never hides
the first letters. An end spacer driven by the same scroll timeline as the
shift keeps the last letters reachable before the toolbar pins, and the
highlighted letters scroll into view as the gallery moves. The per-letter
aria-label now uses the existing `gallery.jump-to` key.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 17:35:49 +02:00
Sam Dornan
896cb77f2e chore(frontend): upgrade vue-tsc to 3.x and raise the TypeScript floor
vue-tsc 2.2.x runs on the old Volar core; 3.x cuts a full typecheck of the
196k-LOC frontend from 47.2s to 36.1s with no new diagnostics.

The declared TypeScript floor of ^5.7.3 already resolved to 5.9.3, so raising
it to ^5.9.3 only makes the constraint honest and satisfies @vue/tsconfig
0.9's `typescript >= 5.8` peer.

erasableSyntaxOnly makes the existing style a compiler rule: Vite strips types
with esbuild, so enums, namespaces and parameter properties would not survive
the transform. The codebase already has none, and the flag reports 0 errors.

TypeScript 6 and 7 are deliberately not taken. 7.0 is the native port and
drops the JS compiler API, which both vue-tsc and typescript-eslint still
require, so each fails to start under it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvDZhPHsNguuX5zqFjDfSD
2026-09-18 15:31:28 +00:00
zurdi
bd3dc94c63 feat(v2): say when filters or a search empty the gallery
An empty result under active filters read "No games in this platform
yet". The shell now says no games match the selected filters, or the
query when one is set, and falls back to the view's own message. The
platform's empty message moves into the locale files.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 17:22:30 +02:00
zurdi
4fe426cd1c style(v2): tidy the filter drawer and the filter button badge
- The game-length fields share the row as two shrinkable columns, so
  "To (hours)" no longer overflows the drawer on phones.
- Reset filters is an outlined neutral button, like Cancel; Save as smart
  collection is outlined too.
- The active-filter highlight extends 8px past the row content on each
  side, with the content where it was.
- RBadge gains an `inset` prop for round anchors, whose bounding-box
  corner sits outside the shape; the filter count now overlaps the disc
  slightly instead of floating off it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 17:22:26 +02:00
zurdi
20bac3e693 review(code-review xhigh --fix): harden the pinned glass toolbar
- The floating dock has no toolbar, so it no longer counts as pinned and
  never takes the top bar's glass away.
- AlphaStrip centres its letters in floating mode, clear of the dock.
- Letter jumps offset by the top bar's height in both docks.
- usePinnedToolbar re-observes only when its elements change (the virtual
  scroller re-renders function refs on every scroll) and is unit-tested.
- The strip's JS fallback writes the style directly instead of
  re-rendering the shell; the scroll-timeline check also requires
  timeline-scope.
- Both shells share the global .r-pinned-toolbar glass class.
- PlatformListHeader keeps its blur; dialog test stubs render footer-start.
- Comments trimmed, em-dashes removed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 17:21:30 +02:00
Sam Dornan
ffd26fe6dc fix(a11y): translate the v2 primitives' own control labels (#4620)
* fix(a11y): translate the v2 primitives' own control labels

The library hard-coded 20 English strings for controls a primitive
renders on its own behalf, so screen-reader users heard English in every
locale: close on RDialog/RDrawer/RCarousel, remove on RChip/RSelect/
RComboboxField, clear on RTextField/RSelect/RComboboxField/RDateField,
RDateField's picker toggle and four month/year steppers, plus the
visible "Today" and "All" text.

The overridable-prop pattern was already there and had already failed:
RCarousel's closeLabel/prevLabel/nextLabel and RDateField's
clearLabel/todayLabel defaulted to English literals and no call site
ever passed one. Extending it would have made translation depend on
roughly 130 call sites each remembering to pass a label for a string
that is identical at every one of them.

Instead the app provides one bundle and every primitive reads it through
useChromeLabels(). The provider hands over getters that resolve via
i18n, so they run inside the reading component's render effect and a
locale switch re-renders the labels with no refs to unwrap. inject is
plain Vue, so lib still imports no i18n, and the English defaults keep a
bare mount rendering an accessible name. The existing label props stay
as per-instance overrides, now defaulting to undefined so they resolve
through the bundle.

Reuses common.close, common.clear, common.remove and common.all; adds
eight common.* keys across all 18 locales for the date-field steppers
and carousel navigation. setup.previous/next were left alone: they are
wizard step semantics ("previous step", "back"), not item navigation.

Storybook provides the same bundle, so stories exercise the real path.
Two tests guard the decay this had already suffered once: that an
injected bundle reaches a primitive's aria-label, and that every label
resolves to a real translation in every locale.

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

* refactor: tighten the chrome-label comments and use import.meta.url

Condense the module header and the test's header to the repo's comment
limit, and derive the locales directory from import.meta.url rather than
__dirname, matching the review feedback on #4619.

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

* fix(a11y): cover RAlert and RSteps, and test the real locale switch

RAlert's close button and RSteps' stepper name were missed on the first
pass: RAlert writes its label as a bound string literal
(:aria-label="'Close'") and RSteps builds "Step 2 of 5" from a template
string, neither of which the plain aria-label="Text" scan matched. Both
now read the injected bundle, which gains a step(current, total) member
backed by common.step-of across all 18 locales.

The locale-propagation test previously flipped a local variable and
called $forceUpdate, which only proved a getter re-reads on render. It
now mounts against createChromeLabels(), switches i18n.global.locale and
asserts the rendered label changes on its own, so it exercises the path
the app actually uses. RAlert and RSteps get assertions of their own.

Wrap the new skill bullet so it stops adding a markdownlint line-length
violation, and drop three comments that only restated the ?? beside them.

Reported by Copilot (RAlert) and Greptile (test, comments) on #4620.

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

* fix(a11y): put RDateField's combobox role on its focusable input

The role sat on the field's wrapper div, which is not focusable and had
no aria-controls, so the two accessibility lints on it were right:
assistive tech saw a combobox it could not reach and that pointed at no
popup. The previous comment explained why the role could not go on
RTextField, and it was accurate: RTextField binds $attrs to its outer
element, which becomes a <label> when it owns the visible label, where
the role is disallowed.

So give RTextField a typed `popup` prop that lands role="combobox",
aria-haspopup, aria-expanded and aria-controls on the native input,
where ARIA 1.2 wants them. A single object prop rather than an attribute
bag keeps arbitrary attributes off the input. RDateField passes it,
drops the role from the wrapper (keeping the keydown handler, which is
what the wrapper is actually for) and gives the teleported panel a
useId() so aria-controls resolves.

The wrapper never was a tab stop, so no tab order changes: the input it
delegates to is the same element that now carries the role.

Covers the two vuejs-accessibility errors that eslint reported against
this file on master; src/v2/lib is now lint-clean.

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

* fix(a11y): make popup and multiline exclusive, and tighten comments

The new `popup` prop rendered its combobox attributes only on the
<input> branch, so a caller that also set `multiline` type-checked but
got a plain <textarea> with none of the role, expanded state or popup
association it asked for. Binding them to the textarea instead is not an
option: ARIA in HTML allows no role override on <textarea>, so
role=combobox there would be invalid. The conflict now reports itself
through console.error rather than dropping the ARIA in silence, and the
prop documents the single-line constraint.

Adds RTextField.test.ts covering all three cases: the role landing on
the input while the <label> outer element stays clear of it, no
combobox attributes when the prop is absent, and the conflict being
reported.

Also drop a sentence recording what the code used to do, which CLAUDE.md
rules out, and shorten the RDateField template comment.

Reported by Greptile (both P2) on #4621.

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

* chore(deps): declare the Vue 3.5 floor the code already requires

useId lands in Vue 3.5 and RComboboxField has been calling it on master,
so the declared ^3.4.27 range understated the real minimum: a resolution
inside 3.4 would fail to build. The lockfile already pins 3.5.29, so
this only corrects the manifest and changes no resolved version.

RTextField carried a comment claiming the project was "on 3.4 still",
which is what made useId look like a regression in review; it is gone,
and the architecture doc's framework row now matches.

Also stop advertising aria-controls while the picker is closed. The
panel is v-if'd, so the input pointed at an element that was not in the
document; `controls` is now optional and RDateField passes it only while
the panel is mounted, with the closed state asserted.

Reported by Copilot on #4621.

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

* refactor: drop a comment recording what the code used to do

The describe name already states what the block verifies, and the rest
was change history, which CLAUDE.md rules out.

Reported by Greptile on #4620.

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

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 10:19:33 -05:00
Sam Dornan
3ca50f6d25 fix(i18n): route hard-coded UI strings through the locale files (#4619)
* fix(i18n): route hard-coded UI strings through the locale files

Both locale checkers passed while several user-visible strings never
entered i18n at all, and two referenced keys existed in no locale.

Add 12 keys across all 18 locales, with real translations:

- scan.info-*-desc (6): the scan-reference dialog's long-form
  descriptions. The non-English values come from each locale's existing
  scan.scan-types-info blob, which already carried the same six
  paragraphs as translated HTML.
- settings.title-header, settings.length-header: the two list-view
  column headers with no existing equivalent. The other seven reuse
  common.platform, common.size, settings.{added,released,rating}-header
  and rom.{languages,regions}.
- common.logout-success, common.logout-error, common.invalid-json and
  settings.controller-debug-extra-buttons for the remaining literals.

Also repair three sections the upstream blob had degraded: hu_HU lost
the paragraph break in two of them (running two sentences together in
one), and tr_TR was missing the "for example" paragraph entirely.

Drop the dead platformsDrawerOptions computed in the v1 interface
settings: its title and description called settings.group-platforms-by
and -desc, which exist in no locale, and the template used the result
only as a v-for key while the visible label comes from
settings.platforms-drawer-group-by.

Every en_US value is byte-identical to the string it replaces, so the
English UI is unchanged; the other 17 locales stop falling back to
English on these surfaces.

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

* fix(i18n): leave the frozen v1 interface settings untouched

The v1 freeze check flagged frontend/src/components, and removing a dead
computed is not the critical bug fix the allow-v1-changes label exists
for. Restore the file as it stands on master.

settings.group-platforms-by and -desc therefore stay referenced by that
panel while existing in no locale. They render nothing (the template uses
the computed only as a v-for key, and the visible label comes from
settings.platforms-drawer-group-by), so the cost is a vue-i18n "Not found
key" warning in the console until v1 is deleted. Adding the two keys to
all 18 locales instead would put strings no user can see into every
locale for translators to maintain.

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

* fix(i18n): correct the Czech complete-rescan warning

cs_CZ said the complete rescan "využije" (will use) the existing
metadata matches and external IDs, where every other locale says it
wipes them. A Czech user reading the scan reference could start a
destructive rescan believing their provider matches were safe.

The error was in scan.scan-types-info, so it reached the new
info-complete-rescan-desc that derives from it. Both are fixed.

Also condense the test's header comment to the repo's two-line limit and
derive its directory from import.meta.url. Vite gives test files a
working __dirname, so the previous form ran fine, but the ESM spelling
is the better default.

Reported by Greptile (P1, P2) and Copilot on #4619.

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

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 09:17:50 -05:00
zurdi
af0d53e81e refactor(v2): share the pinned glass toolbar between both gallery shells
- usePinnedToolbar owns the sticky toolbar's measuring, pinned state and the
  top-bar glass handoff; GalleryShell and IndexShell (platform / collection
  indexes) both use it, so the indexes drop their two-layer toolbar, overlay
  twins and JS clip too.
- The glass pins with the toolbar only (the top bar still turns to glass as
  soon as content scrolls under it), and the handoff is instant both ways.
- The top-bar glass recipe (and its reduced-motion flat variant) lives in two
  global custom properties shared by the top bar and both toolbars.
- The top bar offset lives on the header (or a spacer without one): putting
  it on the scroller's padding also offsets the sticky toolbar.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 16:07:57 +02:00
zurdi
12367d8ee6 feat(v2): pin the gallery toolbar as one glass surface with the top bar
The gallery toolbar used two copies (in flow + an absolute overlay) and a
JS-driven clip to hide cards under a transparent bar. The clip lagged the
compositor's scroll, so a fast scroll briefly showed cards under the bar.

- A single sticky toolbar pins right below the top bar. The section now runs
  under the top bar, so the header and cards scroll behind its glass like
  Home.
- Once pinned, the toolbar's glass also covers the top bar's area and the top
  bar drops its own glass and border (useNavGlass), so the two read as one
  surface with one blur and one bottom edge.
- The header, divider and toolbar span to the right edge; only the rows share
  the width with the AlphaStrip, which starts at the toolbar's bottom edge and
  follows it until it pins via a scroll-driven transform (JS fallback).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 15:59:56 +02:00
zurdi
e8c7719028 refactor(v2): scroll the gallery tab head with the page, fill via flex
- Platform / collection Firmware and Settings tabs no longer freeze the head
  on desktop. The whole page scrolls (under the translucent top bar, like
  Home), and the shell still fills the viewport so the tab body reaches its
  bottom. The wheel works anywhere on the page again.
- RDropzone's `fill` now grows the dropzone in any flex parent, in both
  modes, including one sized by min-height where `height: 100%` can't
  resolve. Firmware and Upload use it instead of overriding the primitive's
  root from outside.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 15:24:45 +02:00
zurdi
fec1d0d91e style(v2): halve the gap between the gallery toolbar and the content
The space under the header toolbar was the toolbar's 24px bottom padding
plus a 16px wrapper padding in each shell. It is now a single 20px padding
on the toolbar, in the gallery and the platform / collection indexes, pinned
or not.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 15:20:06 +02:00
zurdi
9bea95961f refactor(v2): RDialog owns the Cancel-left footer layout
RDialog gains a `footer-start` slot: its content sits on the left and the
`footer` actions are pushed right by a built-in spacer. The 23 v2 dialogs
that hand-rolled that layout with an inline `flex: 1` div or a class
spacer (plus ConfirmDialog's space-between wrapper) now use the slot, so a
new dialog can't forget the spacer. The Stream disc-swap dialog, which had
Cancel and Swap together on the left, now follows the convention too.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 15:18:57 +02:00
zurdi
98f188eaa3 fix(v2): keep the pinned gallery toolbar identical to the in-flow one
GalleryToolbar's header spacing was a margin. The shells render the toolbar
twice, in flow and as an absolute overlay once it pins, and the margin
collapsed out of the in-flow wrapper but stayed inside the overlay (its own
block formatting context). The pinned copy sat 8px lower than the one it
replaced, and the clipped band under it didn't match its real height.
Padding keeps both copies the same box, in GalleryShell and IndexShell.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 15:16:10 +02:00
zurdi
85d09b79f3 review(review-polish): share the settings column, space the mobile arrows, add tests
- Both gallery Settings tabs render in one `.r-settings-column` utility, so
  their shared 460px width has a single home.
- On phones the previous / next arrows centre in the gap between the cover
  and the screen edge instead of hugging the cover.
- Tests for SettingsLayout's `fill: "desktop"` mode and for PrevNextNav
  keeping its slot content when there's no list to step through.
- Comments trimmed to two lines, and trunk fmt applied.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 15:04:40 +02:00
zurdi
8022fe1a1c feat(v2): mobile arrows around the game cover, page scroll on gallery tabs
- On phones Game Details renders the previous / next arrows on either side
  of the cover (PrevNextNav takes the cover as slot content) instead of
  stacking them under it; desktop keeps them beside the title.
- On phones the platform / collection Firmware and Settings tabs scroll the
  document instead of an inner box, so content passes behind the
  translucent top bar like Home. The fixed-head layout is now scoped to
  md-and-up.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 14:57:58 +02:00
zurdi
91f7e6bbf9 refactor(simplify): share the gallery tab shell and the section header
- 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
2026-09-18 14:52:43 +02:00
zurdi
a7c458dc5a fix(v2): give Cancel an outlined box and keep hover inside the button's box
- RBtn's hover overlay and ripple now reach over the 1px border, so a text
  or outlined button's hover area is the same size as a filled button's
  (it read ~2px smaller next to a filled primary action).
- Every text-variant Cancel in v2 is now outlined, so it matches the height
  and weight of the primary action it sits beside.
- ConfirmDialog and the release-session dialog put Cancel on the left and
  the action on the right, like the other v2 dialogs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
2026-09-18 14:52:28 +02:00
zurdi
0f9a1a4c8e review(code-review xhigh --fix): confirm unmatch, reset tab scroll, keep focus rings
- 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
2026-09-18 14:43:21 +02:00