* chore(deps): update frontend dependencies
* fix(deps): keep rolldown in Vite's range and dedupe Playwright
Addresses Greptile's review on #5608 and the failing CI jobs.
- Pin the rolldown override to 1.2.18, inside vite 8.3.7's ~1.2.18 range.
rolldown 1.3.1 emitted 12 syntactically invalid chunks, which broke the
e2e app boot ("missing ) after argument list").
- Dedupe the lockfile so playwright and playwright-core resolve to a single
1.65.0. The stale hoisted 1.64.1 broke e2e typechecking (two Page types)
and the vitest browser run (missing headless shell for the wrong build).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(deps): keep js-beautify's nested glob at 13.0.6
The dedupe bumped it to 13.0.7, which osv-scanner reports as a new
GHSA-3g3m-2fjr-6pw4 finding. Every glob 13.x is affected and js-beautify
pins ^13, so the bump fixed nothing and only moved the baseline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* chore(coherence): adopt Coherence with specs, invariants and a PR report
Install @posthog/coherence as a frontend dev dependency and wire its
Claude Code hooks into the committed .claude/settings.json, so every
agent session in the repo gets the vocabulary, specs, journal and checks.
The hooks call the binary under frontend/ through $CLAUDE_PROJECT_DIR.
Declare 23 components and the entrances that carry outside trust, and
six invariants, each refuted with a deliberate break before it counted:
- every /api route requires auth and its scopes, except a named public
list (new route sweep in tests/endpoints/test_route_guards.py)
- a hidden rom, platform or firmware answers every id route exactly as
a missing id would (new sweep over every method of every id route)
- the unscoped save, state and screenshot fetches by id are reached only
from their own routers (chokepoints)
- validate_path never resolves outside its base folder
The PR workflow runs in comment mode: one report comment, failing only
when Coherence itself breaks. Trunk skips Prettier and markdownlint on
*.spec.md and *.practice.md, since Prettier escapes their globs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(routes): satisfy mypy in the route guard sweep
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(coherence): record the worktree test database enactment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(roms): answer a hidden rom like a missing one on file routes; tighten route sweeps
Addresses Greptile's review on #5584.
The rom file delete and reading-progress routes answered "File not found"
for a hidden rom but "Rom with id N not found" for a missing one, so a
caller could tell them apart. They now raise the same not-found.
The route sweeps now reach the checks they claim to test: a protected
route with no scopes counts as public (its guard admits anyone), write
requests carry a body and upload name so validation can't answer first,
RomFile-keyed routes get a real file id, error bodies are compared with
the id normalized, and the rom routes are swept with the rom hidden
directly, through its platform, and by the unrated filter.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(coherence): tighten route guard sweeps and isolate oracle test databases (code-review)
- Count a route as protected only when its endpoint is the scope-checking
wrapper with non-empty scopes, not just when it declares the bearer scopes.
- Treat 401 and 403 like 422 as never reaching the visibility check, and
sweep /api/streaming/states/{rom_id}.
- Run pytest oracles with a per-run ROMM_TEST_DB_TAG unless one is set.
- Use the shared setup-frontend action and ubuntu-24.04 in the workflow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(tests): simplify route guard sweeps and path tests (simplify)
- Mark scope-guard wrappers with required_scopes so the auth sweep reads a
public attribute instead of the private closure.
- Derive the entity regex from one segment list, ask each missing id once,
and run the three hide scenarios through one sweep helper.
- Fold the new validate_path inputs into the existing valid, traversal and
absolute path tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(coherence): trim workflow comments (review-polish)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(filesystem): restore the validate_path property test the paths invariant cites
Filesystem.spec.md names test_validate_path_never_escapes_its_base as the
invariant's evidence, and Coherence selects it by name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(coherence): run hooks from the local binary instead of npx
Each hook calls frontend/node_modules/.bin/coherence directly and exits 0
when it isn't installed, so sessions without frontend deps (fresh
worktrees, backend-only setups, cloud setup still installing) don't report
a hook error on every tool call, and no hook pays npx's startup.
Also commits the journal and run records left by earlier sessions, which
.coherence/.gitignore keeps as durable records.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(tests): share the bearer, user token and hide helpers
Tests built the same Authorization headers and HiddenEntity rows in about
40 local copies, and two modules imported private helpers from other test
files. They now use bearer, user_headers and hide from tests/auth_helpers.py.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(endpoints): one 404 for a missing or hidden rom, platform or firmware
Each route wrote the missing-row 404 and the hidden-row 404 separately and
had to keep them identical by hand. visible_rom_or_404,
visible_platform_or_404 and visible_firmware_or_404 take the lookup result
and raise one answer for both, either the standard not-found or a bespoke
detail. Re-reads after a write keep a plain not-found check, so an edit that
hides the row doesn't turn into a 404 after it succeeded.
The RomFile-keyed routes (/roms/{file_id}/files, .../files/content/{name},
/roms/{file_id}/patch) name their path parameter file_id instead of id, so
the route sweep reads which id a route takes from its path and drops its
hand-kept list. URLs are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(setup): develop inside WSL on Windows
@posthog/coherence installs only on Linux and macOS, so npm install in
frontend/ fails on native Windows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(coherence): record the whole-repo chokepoint run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(types): regenerate API types for the file_id patch route
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Adds a toolbar to force :hover, :focus-visible, :active and other states
on any story, so interaction styles can be reviewed in both themes without
a mouse. Dev dependency only.
The lockfile's dropped "dev" flags are npm 11.21.1, the pinned
packageManager, normalizing it: re-locking untouched master produces the
same 87 lines. Nothing installs with --omit=dev, so builds are unaffected.
Written primarily by Claude Code.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): update node.js to v26
* chore(deps): move the Node runtime pins to 26.13
Addresses Greptile's review: the engines and @types/node bump needs
frontend/.nvmrc and both Dockerfiles on Node 26 too, or npm ci fails
with EBADENGINE under engine-strict.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* ci(coverage): measure frontend coverage with v8 and backend branch coverage
The frontend had no coverage measurement, and the backend's line-only
report counts a one-sided `if` as covered when its body never runs.
- Add @vitest/coverage-v8 and `npm run test:coverage`. Its include lists
every source file, so a file no test imports reports 0% instead of
disappearing. Generated types, locales, tokens, test utilities,
stories, fixtures and play helpers are excluded.
- Frontend Checks runs tests with coverage and uploads the cobertura
report to GitHub code coverage as code-coverage/vitest, mirroring
pytest.yml: a separate job holds code-quality: write and fork PRs skip
the upload.
- Turn on branch coverage in backend/.coveragerc.
Baseline on master: 407 test files pass; frontend lines 63.3%, branches
55.3%. The app project alone (no stories) gives 61.4% lines, so stories
add about two points.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4iK9WRvZqdTHiRc9gY
* ci(coverage): include JavaScript sources in the frontend coverage report
The two audio worklets (gmeAudioWorklet.js, pico8AudioWorklet.js) are
production code that the `{ts,vue}` glob left out of the report, so they
now show at 0% instead of being omitted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4iK9WRvZqdTHiRc9gY
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): update frontend dependencies
* chore(deps): dedupe playwright onto 1.64.1
@playwright/test 1.64.1 nested its own playwright and playwright-core
while the root copy used by @vitest/browser-playwright stayed on 1.63.0.
CI installs browsers with a single `npx playwright install`, which only
fetches the revision for one copy, so the other runner could not find
its browser on a clean runner. Bump the root copy so both share one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EQK1bggdH3kndYUDfLfmCG
* fix(frontend): satisfy vue-tsc 3.3.13 and axe-core 4.14 checks
useReducedMotion returned its writable computed typed as read-only, which
vue-tsc now rejects at the v-model in Settings/UserInterface.
axe-core 4.14 runs label-content-name-mismatch by default. The RBtn story
label now includes its visible text. GameCard and LiveSessionCard are
composite cards named by their title/action, so the rule is off for their
stories rather than folding every badge and button into the name.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Sam Dornan <sam@dornan.family>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
- oauthlib 3.3.1 -> 4.0.0 (via apprise/requests-oauthlib)
- OpenTelemetry 1.44.0/0.65b0 -> 1.45.1/0.66b1, moved as a family since
the SDK pins opentelemetry-api exactly
- vitest and @vitest/* 5.0.2 -> 5.0.5
- markdown-it 14.3.2 -> 14.3.3
- undici 8.10.2 -> 8.12.2
Touching uv.lock also makes GitHub rebuild the dependency graph, which
still reports pillow 12.3.0 although #5288 locked 13.0.0.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(deps): update dependency storybook to v10.6.2 [security]
* fix(deps): bump all Storybook packages to 10.6.2 together
storybook 10.6.2 alone left @storybook/addon-vitest on 10.6.0, which
imports reportToolsetTelemetry that core 10.6.2 no longer exports, so
the vitest Storybook preset failed to load. Group Storybook majors in
Renovate so they move together.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(e2e): Update playwright #4772, smaller focus
* chore(e2e) address greptile feedback
* chore(e2e): Add Lighthouse and Axe
* chore(e2e): replace the Lighthouse and axe projects with an axe check per page
- Move PAGES and the page-opening wait into support/pages.ts, so loads.spec.ts
and the new a11y.spec.ts share one list of every route.
- a11y.spec.ts runs axe on each page as the least privileged role allowed on
it, and login.spec.ts on the login page. Critical violations fail; every
violation is attached to the report as JSON. Serious ones (mostly color
contrast) still fire on several pages, so they stay report-only for now.
- Drop the Lighthouse suite and its dependency tree, the separate axe project,
the @smoke tag, the sitemap, and build:e2e.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(e2e): wait for skeletons to clear before checking a page
Addresses Greptile's review: openPage returned once the view mounted, so axe
(and the load check) ran while seven data-backed pages still showed
RSkeletonBlock placeholders. Wait until none are in the viewport; virtualized
grids keep them below the fold.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(e2e): Update playwright #4772, smaller focus
* chore(e2e) address greptile feedback
* chore(e2e): keep static analysis out of e2e/.output
Everything the suites write (reports, traces, saved sessions) lands in
e2e/.output. It was already gitignored and ESLint skipped it, but the
e2e tsconfig included it through ./**/*.ts, so any .ts file written
there was type-checked, and Trunk skipped it only through the
.gitignore default. Exclude it from the tsconfig and list it in
Trunk's ignore paths explicitly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(e2e): run with zero config locally and typecheck the suite in CI
- Every E2E_* variable now falls back to a default matching
seed_e2e_users.py, and the shell wins over e2e/.env, which is optional.
- With E2E_BASE_URL unset, the config starts (or reuses) `npm run dev`
through webServer; CI still sets the URL and serves the static build.
- Drop the migration table for removed variables, the unknown-key checks,
and the gitignore entries for suite versions that never shipped.
- Add e2e/tsconfig.json to the root project references, so
`npm run typecheck` (run by Frontend Checks) covers specs/ and setup/.
- Restore `test:e2e:ui`.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(e2e): make seedUiState win over the user's stored preferences
Preferences are now stored per user (#5098), and the app only adopts an
unscoped value when the user has no `user:<id>:` copy. Saved sessions
carry one, so seedUiState(page, "light") was silently ignored. Drop the
scoped copies before seeding, and assert the light theme in the spec
that relies on it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* build(frontend): add build:preview, which copies frontend/assets into dist
Vite leaves frontend/assets out of the build and only the Docker image
copies it in, so a bare `vite preview` serves the SPA fallback for every
icon, logo, font and default cover. Give that copy one home: the e2e
workflow and the local production-build recipe both use the script. It
copies with fs.cpSync so it also runs from cmd.exe and PowerShell.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* ci(e2e): let the Playwright webServer serve CI again
The suite starts its own server once more, so the workflow no longer
needs its own build, serve, wait and teardown steps, nor the E2E_*
variables that now default to the seeded accounts. In CI the webServer
runs `build:preview` and `vite preview` as it did before this PR; locally
it runs (or reuses) `npm run dev`. The default URL is 127.0.0.1, which
the preview binds, rather than localhost, which can resolve to ::1.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(e2e): simplify the setup files
- auth.setup.ts signs each account in afresh every run, instead of
validating saved sessions in a separate browser context. Two sign-ins
cost about 3s.
- The hand-rolled login retry loop and its CI-specific attempt counts
give way to `retries: 2` on the setup project, and the timeout
arithmetic to `setup.slow()`.
- global-setup.ts folds its four check functions into one, and reads the
library total from the admin's account check instead of fetching it
twice.
- Drop isSessionValid(), login() and the ESLint exception that only the
old setup needed.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(e2e): drop the global-setup preflight
The suite already reports what it checked: a downed backend fails
sign-in through the app-error guard (`GET /api/heartbeat returned 502`),
and a wrong E2E_BASE_URL fails page.goto with the URL. The one case it
explained better, a rejected account, is now an assertion on the
`POST /api/login` status in auth.setup.ts. With no preflight, the suite
never calls the API directly, so its ESLint exception goes too.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(e2e): cover every route for both roles, and stop the theme leaking
loads.spec.ts:
- Key PAGES by RouteName from src/plugins/routeNames.ts, with a `skip`
reason for routes it can't open, so a new route fails the typecheck
until it is listed. That adds devices and conversion-settings, which
had drifted out.
- Load each page as every role allowed on it, not only as admin, so a
viewer-only 403 shows up.
- Drop the wait for in-flight requests, which timed out on pages that
load slowly on a large library.
Tags and folders now use route names (@page:rom, specs/rom/,
specs/user-profile/).
The app syncs UI settings to the account and reapplies them on sign-in,
so a theme a spec wrote leaked into later sessions: admin ended up on
"auto", and every "dark" spec rendered light. seedUiState now always
stores "auto", the config sets `colorScheme: "dark"`, and the light
spec uses emulateMedia. The saved sessions carry the seeded settings, so
specs no longer call seedUiState themselves.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(e2e): keep support/auth.ts to accounts and sign-in
- Navigation helpers (gotoHydrated, gotoFirstRom, gotoOwnProfile) move
to support/navigation.ts, with a gotoFirstPlatform that loads.spec.ts
and gotoFirstRom now share.
- openMoreMenu and menuLabels move into rom/actions-menu.spec.ts, their
only user.
- Role derives from ROLES, and accountFor's return type is inferred, so
the Account interface goes.
- watchAppErrors folds into the app-error guard, its last caller.
- output.ts exports the results and report paths instead of a
suiteOutput() that only ever took "specs".
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(e2e): don't count the page load against gotoHydrated's waits
The /api/permissions/me and login-form waits are armed before page.goto,
so their 5s local action timeout also covered the navigation, and a slow
page timed out before the request was sent. The test's own timeout now
bounds them.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(e2e): replace the environment module with plain reads
With every variable defaulted, the parser, its aggregated error and the
e2eEnv fixture guarded against mistakes that can barely happen, and
Playwright reports the rest itself.
- playwright.config.ts loads e2e/.env with process.loadEnvFile (the
shell still wins) and reads E2E_BASE_URL; support/auth.ts reads the
accounts into ACCOUNTS. Specs that need the URL use the baseURL
fixture.
- E2E_WORKERS goes: `--workers N` already does that.
- Drop the e2eEnv fixture, its ESLint import ban and the empty-pattern
exception it needed, and trim .env.example.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* build(e2e): typecheck the suite with tsconfig.node.json
e2e/tsconfig.json was a looser copy of the Node config: it lacked
noUncheckedIndexedAccess and exactOptionalPropertyTypes, so specs/ and
setup/ escaped flags the rest of the frontend, and the e2e support files
through playwright.config.ts, already obey. The suite runs in Node, so
it joins tsconfig.node.json, and typecheck:e2e goes with its config.
The specs needed no changes under the stricter flags.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(e2e): trim the ESLint config and the app-error guard's opt-out
- Drop the Node globals block: typescript-eslint turns no-undef off for
.ts files, so it changed nothing.
- Drop no-skipped-test's allowConditional: nothing in the suite skips.
- Fold the type-info, floating-promise and no-API blocks into one, and
move the e2e/.output ignore to the base config's generated-output list.
- Remove failOnAppErrors and E2EOptions: nothing opts out of the guard.
Every remaining rule still fires on a probe spec.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* docs(frontend): shorten the test:e2e command note
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* build(frontend): copy assets with cp -R in build:preview
Also puts a comma in the test:e2e command note.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(e2e): one set of timeouts, and treat empty variables as unset
- Local runs used 3-10s timeouts against CI's 10-45s, so slow pages on
a large dev library failed locally while CI passed. Both now use the
CI values; a debugger still turns them off.
- An empty E2E_BASE_URL left baseURL as "" while still starting the
server, and an empty account variable signed in as "". Both fall back
to their defaults now.
- Set the Desktop Chrome device once, point the slow-test comment at
test.slow(), and anchor the setup project's testMatch.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(e2e): apply code-review findings
pr-ready step 2 (code-review xhigh --fix):
- fall back to E2E_PASSWORD, which the seed script uses, for both accounts
- name the cause when the library has no platform or game to click
- read PWDEBUG=0/false as off, as Playwright does
- widen the API-call lint ban to any uncalled `.request` and its import
- compare the signed-in username case-insensitively
- only allow adminOnly with a URL, so the viewer 404 check always runs
- fix the README grep recipe and the recorded-spec location
- Object.hasOwn in seedUiState, ROLES in role.spec, shorter comments
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(e2e): apply simplify findings
pr-ready step 3 (simplify):
- one home for the login-form and signed-in-user locators
- derive ROLES and STORAGE_STATE from ACCOUNTS
- openMediaSubtab returns the panel; upload helpers take a scope
- menuLabels reads the panel openMoreMenu returns
- seed the UI state in login.spec's beforeEach
- one no-restricted-syntax entry for the API-call ban
- one port constant in playwright.config.ts
- drop .gitignore entries for paths nothing writes any more
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* docs(e2e): trim two long comments
pr-ready step 4 (review-polish).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* docs(e2e): plainer README opener and comments
pr-ready step 5 (humanizer).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(e2e): role selectors, one first-game lookup, shared route scopes
- Select by role and label: the account menu's name ("Account menu for
<user>") replaces the user-name span, the Login button the login form's
class, the "Page not found" heading the 404 class, and the subtab rail's
tablist role the subtab button class.
- library.setup.ts clicks through to the first game once per run and saves
its URL; specs open it with gotoFirstRom() instead of clicking through
/platforms in every test. loads.spec keeps the click-through.
- Move the router's route scope table to routeNames.ts as ROUTE_SCOPES, so
loads.spec derives admin-only pages from it: a newly gated route gets the
viewer 404 check unless it is listed in VIEWER_OPENS.
- `vite preview` serves frontend/assets through a sirv middleware, as the
dev server and the Docker image do, so build:preview goes away.
- CI builds the frontend in the background while the backend is set up,
and the Playwright webServer only runs `vite preview` on that build.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(v2): menuitem role on button menu items, tabpanel role on Media panels
- RMenuItem sets role="menuitem" on its button form too, not only on links,
so every item in an RMenu is a menuitem. Stories give the items a
role="menu" parent.
- SubtabNav takes an optional idPrefix that gives each rail tab an id and
aria-controls. MediaTab uses it to make its sections tabpanels labelled
by their tab; the small-screen sheet variant has no tabs, so its sections
stay plain.
- The e2e specs read menu labels by the menuitem role and find a Media
panel by its tabpanel name.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
* feat(player): play RPG Maker 2000/2003 games in the browser with EasyRPG
Embed the EasyRPG web player for extracted game folders on the rpg-maker
platform. The backend generates the player's index.json from the scanned
files and merges in the free EasyRPG RTP under every name the official
and fan RTPs give its assets, so games that lean on the RTP find them.
In-game saves sync with the user's RomM saves through the player's
IndexedDB storage.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(easyrpg): read the free RTP from a fixed path instead of an env var
The full image always keeps the RTP at /var/www/html/assets/easyrpg/rtp,
so the path is a constant beside the web path nginx serves it under. The
dev container links its copy there at startup.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(easyrpg): code-review fixes for the save sync and asset endpoint
- Wait for an in-flight push before the quit push, so the newest save uploads
- Keep Play disabled until the fresh rom (and its saves) is fetched
- Stop onPlay and the rom fetch from acting after the view unmounts
- Leave through usePlayerExit like the other players
- Handle a rejected IDB commit when the run itself fails
- Track uploads by the browser's file name
- Load only visibility and files per asset request, not the full rom
- Serve DEV_MODE files as octet-stream, matching nginx
- Make the traversal test actually reach the endpoint
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(easyrpg): simplify pass over the player and asset endpoint
- Load only file paths per asset request, and look up RTP folders in O(1)
- Reuse RomFile.file_name_for_download and usePlayerFullscreen
- Share one dev/prod serve helper for game and RTP files
- Derive the save sync's game key from the rom
- Have the RTP table tool reuse normalize_name
- Make save-module internals private and tidy the prepare/read loops
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(easyrpg): flag RPG Maker game folders on the rom schemas
Gallery lists carry no files, so the frontend guessed that every multi-file
rom on the rpg-maker platform was playable, including RPG Maker XP/VX/MV
folders. Rom now has a deferred `is_easyrpg_game` subquery (an RPG_RT.ldb at
the folder root), loaded with the other gallery file stats and derived from
loaded files on the with_files path, and the frontend reads it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(easyrpg): drop server save sync, keep saves per user in the browser
Server sync moves to a follow-up that puts the web players on device sync.
Saves now stay in the player's IndexedDB, as js-dos does, with the same note
on the start page. The player is launched as `<rom id>-<user id>` so each
RomM account sharing a browser profile keeps its own saves; nginx and Vite
drop the user id when routing to the backend.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(sync): let a client ask negotiate to restore the saves it lost
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(saves): sync web player saves as a browser device
A shared layer for the in-browser players: each browser profile registers
as a sync device, keeps every account's saves in its own IndexedDB store,
negotiates them with the server at launch (restoring any it lost), and
pushes changes with the device's conflict guard. Hashes match the server's,
including its zip-entry hash.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(emulatorjs): save as the browser's sync device, with the slot guard
EmulatorJS now uploads and downloads as this browser's registered device
instead of the IP-based login device, confirms downloads with their hash, and
lets a write that continues the slot's head be refused when another device
wrote the slot since; that progress is archived and the session keeps
writing to the archive.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(settings): list, rename, pause and remove your devices
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(player): sync EasyRPG, js-dos, PICO-8 and Ruffle saves with RomM
Each player's own storage is restored from the browser's synced copy before
boot and captured back during play and on leave:
- EasyRPG: its IDBFS saves, one slot per in-game slot
- js-dos: its changes zip through fsChanges pull/push, migrating saves it
kept in OPFS before
- PICO-8: cartdata files, flushed by loading a blank cart on leave
- Ruffle: the game's SharedObjects zipped into one save, kept out of
localStorage between plays so accounts don't share them
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(easyrpg): address Greptile review
- Start timing the play session once the player page loads
- Use object-form props in the view test's button mock
- Keep the RTP table tool's docstring to one sentence
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(saves): address Greptile review on web device save sync
- Remove EasyRPG save files that sync deleted, so the game cannot load them
- Keep the stale-device guard on device sync's page-close uploads
- Restore only the Ruffle SharedObjects the current SWF can reach
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(saves): code-review pass on web device save sync
Restore master's EasyRPG RTP table path lost in the merge, serialize
DeviceSaveSync pushes, only mark a no_op synced when the server hash
matches, forget the browser device when it is removed, close a late
EasyRPG IndexedDB connection, send content_hash on unload updates, and
share the IndexedDB helpers and slot-conflict check.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(saves): simplify pass on web device save sync
Archive conflicts through uploadArchivedSave and isSlotConflict, skip
hashing unchanged bytes, share bytesEqual from saveSync/hash, pass
restore_unlisted from DeviceSaveSync, use newest() for the EmulatorJS
slot head, and trim one-off Ruffle and PICO-8 helpers.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(saves): review-polish pass on web device save sync
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* docs(saves): humanizer pass on web device save sync comments
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(saves): open every player IndexedDB through openDb
The save sync store now rejects when another tab blocks its upgrade
instead of waiting forever, as the EasyRPG and pending-asset stores
already did.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(sync): let negotiate scope server saves to the client's emulators
A browser player's saves load only in that player, so a native save in
the same slot must not pair with it or download into it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(saves): register the browser device on each launch
Registration returns the existing device, so calling it every time
brings back a device removed from any browser, which EmulatorJS
otherwise kept sending as a dead id. The cached id now serves only when
offline. DeviceSaveSync also negotiates within its own emulator.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(player): share web player save sync through useDeviceSaveSync
The coalesced polled push, the flush before leaving, the page-close
capture and the discard prompt live in one composable, and the player
suites share one DeviceSaveSync fake from test-utils.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(saves): update one archive per slot after another device takes it
A slot refused mid-session archived every later write as a new save.
Later writes now update that archive in place, page-close sends
included, and the next launch settles the slot.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* perf(ruffle): skip unchanged polls and upload saves every 5 minutes
Polls compare the stored SharedObjects with the last read before zipping
them, and keep what changed in the browser, uploading it at most every
5 minutes. Leaving and page close still upload at once.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* perf(ruffle): sync saves like EmulatorJS, polling every second
Polls compare the raw stored strings, so an idle second decodes,
zips and hashes nothing. A change uploads once two polls agree on it,
and a failing upload backs off from 2 to 30 seconds through the retry
backoff EmulatorJS uses, now shared from saveSync. Leaving still
uploads at once.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
0.30 moved to json-schema-ref-parser 14, whose safe URL resolver
refuses localhost, so `npm run generate` failed in the api-types check.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Vite 8.0.16 pins rolldown 1.0.3, so the rolldown 1.2.11 override broke
the build. Vite 8.3.1 needs rolldown ~1.2.9 and clears min-release-age.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
typescript-eslint moves to 8.70.1, the first release in the npm age
window whose peer range (<6.1.0) admits TypeScript 6. TypeScript 6
enables noUncheckedSideEffectImports by default, so the vuetify/styles
CSS import gets an ambient module declaration.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(deps): bump vue-router to 5.3.1 and vue to 3.5.43
vue-router 5 needs vue ^3.5.34. The runtime API RomM uses is unchanged:
typecheck, the unit suite and the production build pass without code
changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* fix(v2): stop URL query writes from dropping history entries
Query-only router.replace calls resolved against currentRoute, which is
still the page being left while a navigation waits on async guards (the
view-transition capture, the ROM fetch in /rom/:id's beforeEnter). A
write landing in that window cancelled a pending push, so the click was
swallowed, or, on Back/Forward, replaceState'd the entry the browser had
already moved to with the old page's URL, deleting it from history.
patchQuery now binds each write to the path it was made on, waits for an
in-flight navigation to settle (tracked by installQueryNavigationGuard,
installed in AppLayout) and drops the write if the navigation left that
page. The gallery filter sync, the platform, collection, admin, library
management and notification tabs, and the notes selection now write
through it, and the gallery's debounced write is cancelled on unmount.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* style(v2): replace em-dashes in comments of files this PR touches
trunk check reports every no-emdash-in-comment hit in a modified file,
not only on changed lines. Comment text only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* fix(v2): rewrite a ?subtab= the details tab can't show
GameDetails swaps currentRom before a rom-to-rom navigation commits, so a
tab that resets its subtab for the new game writes into the pending
navigation and that write is dropped. The URL then kept a subtab the new
game doesn't have. useSubtabQuery now rewrites an invalid ?subtab= to the
subtab on screen on mount and after every path change, which also fixes
stale deep links.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* refactor(v2): key the details ROM by the route's :rom param
GameDetails read a single currentRom slot that the route guards filled
before the navigation committed, so the page being left briefly
rendered the next game under its own URL, and anything reacting to that
wrote into a navigation still in flight.
stores/roms now keeps a bounded, id-keyed cache of DetailedRoms.
setCurrentRom and update() feed it, so the shared /rom/:rom guard and
every SimpleRom write keep it current, and v1 keeps reading currentRom
unchanged. v2 reads through useRouteRom(), which looks the record up by
the committed route's :rom param: a guard can prefetch the next game
without the current page seeing it. The dialogs, useRomSync, the scan
and pending-asset refreshes, FilesTab and the player seeds all go
through the cache or the route id. useSubtabQuery's rewrite is narrowed
to stale links, the case it still covers.
Also replaces em-dashes in comments of the files this touches, which
trunk check flags per modified file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* style(v2): sort useRomScanRefresh imports for trunk's prettier
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* fix(v2): keep the shown game cached through a burst of rom hops (code-review)
Each superseded rom-to-rom navigation still cached its game, so ten
quick hops could evict the record the committed page renders and blank
it until the last hop landed. Re-cache the shown game before the next.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* refactor(v2): simplify the query-write and ROM cache plumbing (simplify)
- routeQuery: track the in-flight navigation as a single marker and
schedule one flush per router instead of a waiter queue; add
replaceQuery for whole-query writes and route Logs through it, so no
v2 query writer bypasses the guard.
- Tab, subtab and gallery-filter writers use syncQueryParam, which only
writes keys that changed.
- useSubtabQuery shares one owned-subtab helper and drops the route.path
trigger the id-keyed cache made redundant.
- The ROM cache holds 3 records (nothing reads it to skip a fetch) with a
single-step eviction; GameDetails re-caches the shown game via
useRouteRom; FilesTab uses refetchRom's result; Stream parses :rom
with romIdFromRoute.
- Trim comments to the two-line rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* style(v2): trim the roms.update merge comment (review-polish)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* style(v2): tidy comment grammar left by the em-dash pass (humanizer)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* fix(v2): address review findings on query writes and the ROM cache
- syncQueryParam compares against the queued write, so a control
switched back before the first write lands still gets written.
- Only the tracked navigation (or an untracked duplicate) settles the
query guard, so an older navigation aborting after a newer one
started can't release writes into it.
- roms.reset() (run on logout) clears the detailed ROM cache, and
deleting a game drops its record once the page has moved off it.
- Shared makeDetailedRom fixture beside makeRom; the CollectionsIndex
mock carries a route path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* fix(v2): settle query writes only for the tracked redirect chain
- A duplicate navigation settles the query guard only when it began as
the tracked navigation (a guard redirect back onto this page, followed
through redirect chains via redirectedFrom). An unrelated duplicate no
longer releases a held write while the tracked navigation is pending;
that navigation settles itself when vue-router cancels it.
- DeleteRomDialog logs a failed post-delete redirect instead of
reporting the delete as failed, and keeps the record of a game the
page still shows so an aborted redirect can't blank it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
* style(v2): drop the routeQuery header paragraph the guard docs already cover
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CB3a8xbmnmuMeddGnRgVse
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
- Style rules walk a PostCSS AST parsed once per file instead of
hand-rolled declaration, @media and comment regexes. postcss becomes a
direct devDependency at the version already in the lockfile.
- The src/v2/lib boundary uses import-x/no-restricted-paths, so aliases
and relative imports resolve to the same zones. The resolver now knows
.d.ts so the emitter types match.
- typescript-eslint's eslintRecommended applies to .vue in place of a
single no-undef override.
- A reportAt helper replaces the per-rule loc boilerplate, and sfc()
carries the test filename.
- The Trunk no-emdash linter runs batched.
- CLAUDE.md and address-bot-reviews point to review-polish instead of
repeating the encode-a-check guidance.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Trunk already runs ESLint with the same config in CI, scoped to changed files and respecting the v1 ignores.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Bumps vitest and @vitest/ui from 4.1.11 to 5.0.1. No config or test
changes were needed. The full suite (208 files, 2483 tests) and the
Storybook play() suite pass; typecheck is clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GA4rTTBz2roX6zgK9VSBr3
Keep `typecheck` to vue-tsc and move the tsconfig.node.json pass to
`typecheck:scripts`, run as a separate CI step so a failure names the
pass that broke. Drop the JSON-invalid comments from tsconfig.node.json.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>