The #3954 fix is about what a read-only user can SEE, which the Vitest
specs can't reach: visibility depends on grants the backend resolves and
`useCan` projects. These drive a real instance instead.
frontend/e2e/rom-actions.spec.ts ⋯ menu items + divider collapse
frontend/e2e/profile-role.spec.ts no self-editable role control
frontend/e2e/game-media-files.spec.ts Media/Files upload + delete
Every spec asserts both sides -- absent for `e2e_viewer`, present for
`e2e_admin` -- so it can't pass against a page that failed to render, and
notices a fix that over-hides. Verified by reverting the fix: 8 of 15 fail,
and the 6 admin-side guards stay green.
`backend/tools/seed_e2e_users.py` seeds the two fixture users idempotently.
Specs live in e2e/ so Vitest's src/** and test/** globs skip them, and
tsconfig now covers them so they're typechecked.
Not wired into CI: that needs a backend, a database and a library fixture
in the runner.
Replace the hardcoded `build.cssTarget` version list with a single source
of truth. The browser baseline (Tailwind v4's floor) now lives in
`.browserslistrc` as `>=` floors, and vite.config derives the esbuild-style
`cssTarget` Lightning CSS needs from it. Version data comes from
caniuse-lite instead of being pinned in the build config, and any other
tool reads the same file.
No behavior change: the derived targets resolve to the same set, so the
production build still emits both `-webkit-backdrop-filter` and the
standard property for every glass surface.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Wire axe-core into the vitest Storybook runner so every v2 lib story is
scanned for accessibility violations, gated per story by the
@storybook/addon-a11y `a11y.test` parameter (error / todo / off) with a
global default of "error".
Fix the unlabeled-control violations this surfaces (icon-only buttons,
decorative images) and mark the remaining component-level gaps as `todo`
so CI stays green while the backlog stays visible. Add keyboard-operability
play() tests to RSwitch, RTabNav, and RRating.
Refs #1848
Generated-By: PostHog Code
Task-Id: b44aba2c-90c9-407d-8c80-5bbe77ecd6c1
- Move default_category_for_non_nested validator onto RomFileSchema so
top-level files default to category "game" (the v2 patcher's base-file
filter relies on this).
- Use Annotated Body() in the patch endpoint; check patcher output via
anyio async Path.
- Drop the now-unused client-side rom-patcher and vite-plugin-static-copy
(patching is server-side); simplify the Storybook plugin filter.
- Regenerate frontend OpenAPI types.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Added "esbuild" version "^0.28.1" to frontend package overrides.
- Updated "exclude-newer-package" in pyproject.toml to include "vcrpy" with a date of "2026-06-17".
- Modified uv.lock to reflect the new "vcrpy" version "8.2.1" and removed platform-specific markers for dependencies.
- Added new dependencies including @one-ini/wasm and @oxc-parser bindings for various platforms in package-lock.json.
- Updated vitest to version 4.1.8 with its dependencies.
- Removed exclusion of vue-i18n from Vite's optimizeDeps configuration to improve dependency optimization.
Adopt master's ROM schema design (sibling_roms + files, batched
get_files_for_roms / get_siblings_for_roms) while preserving the v2-branch
features master lacks: per-user is_main_sibling on siblings and audio_meta
on rom files.
Conflict resolution:
- responses/rom.py: keep master's sibling_roms/files fields; re-graft
is_main_sibling via SiblingRomSchema.from_rom(rom, is_main_sibling=...);
restore the eager-relationship fallback in
SimpleRomSchema.from_orm_with_request (None sentinel) so the v2
/{id}/simple endpoint still returns siblings/files.
- roms_handler.py: get_siblings_for_roms now left-joins RomUser and returns
(Rom, is_main_sibling) tuples; keep both branch and master file helpers.
- drop the redundant branch-only sibling_ids field and
get_sibling_data_for_roms.
- generated types resolved to match (sibling_roms + files; RomFileSchema
keeps audio_meta and gains archive_members).
- update v2 components and the RelatedGameCard mock to read sibling_roms.
- fix stale exclude={"siblings"} -> "sibling_roms" in scan emit payloads.
- re-chain the audio_meta migration as 0083 (after master's 0082) to keep a
single Alembic head.
- package.json: union of branch tooling + master dependency bumps; lock
regenerated.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Introduced SetupStepper component for visual step indication.
- Created Setup view to orchestrate the three-step setup process: library info loading, admin user creation, and metadata review.
- Updated AuthLayout to center content for better UX.
- Added new route for the setup view in the router configuration.
- Enhanced error handling and user feedback during the setup process.
scripts/build-tokens.ts emits src/v2/styles/tokens.css with explicit
naming overrides for the special cases (--r-row-pad, --r-elev-*,
--r-nav-h, abbreviated layout vars). tsx wired into devDeps;
build:tokens script + predev/prebuild hooks keep the CSS in sync.
Backfill missing tokens that lived only in CSS: --r-color-fav
joins colorBrand, and the focus colors in colorDark / colorLight
match the translucent values components actually consume (not the
unused #ffffff / #111117 they used to declare). Drop the orphan
--r-focus-ring-color (zero references in the codebase).
Adopt --r-radius-card (14px) for RMenuPanel and RDialog instead of
hard-coded 14px; switch a NotesTab badge from 10px to --r-radius-lg.
Closes the "panels use 14px not --r-radius-lg" pitfall — the
constitution no longer needs that footnote.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add Vitest 4 with happy-dom, @vue/test-utils, and a single
test/storybook.test.ts that auto-discovers every story under
src/v2/lib and runs its play() via composeStories — no Playwright,
just composition-based interaction tests. 89 stories now smoke-pass
in CI.
Scripts: lint:fix (auto-fix), lint (now scoped to ./src/v2; v1 is
frozen), lint:all (legacy sweep), test, test:watch, test:ui,
storybook:test.
eslint.config.js gets argsIgnorePattern: "^_" so unused-by-design
parameters can use the underscore convention.
CI: new frontend.yml runs lint, test, build in parallel on
frontend/** changes; typecheck.yml bumped to Node 22 with cached
npm ci. Existing typecheck job preserved for branch protection.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Rewrite frontend/src/views/Patcher.vue around library ROM/patch pickers
(v-autocomplete with debounced search) and call POST /api/roms/{id}/patch
with responseType: blob; download and/or re-upload the patched output.
- Drop the rom-patcher npm dep and vite-plugin-static-copy from the frontend;
remove the now-unused web worker, type decls, and viteStaticCopy plugin.
- Move the Node patcher into a self-contained npm project at
backend/utils/rom_patcher/ (dir uses underscore so it's a valid Python
package). Patcher.js loads RomPatcher.js from its sibling node_modules.
- Extract the heavy subprocess logic into backend/utils/rom_patcher/patcher.py
(apply_patch, PatcherError, SUPPORTED_PATCH_EXTENSIONS); slim patch.py to
HTTP/DB plumbing and fix a stale .parent.parent path.
- Wire up Docker: dev Dockerfile installs the new npm project; prod
Dockerfile adds a backend-node-build stage and copies rom-patcher-js into
the production image; install nodejs at runtime.
- Add new patcher i18n keys to en_US (other locales fall back).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>