Files
romm/backend/tests/handler/database/test_collections_handler.py
Spinnich 14a0a98661 feat(roms): filter games by custom tags
Adds a "Tag" gallery filter so a library can be narrowed by the custom
tags parsed from filenames (No-Intro / Redump nomenclature, e.g. Proto,
Beta, Demo), mirroring the existing data-derived multi-value filters
(regions, languages). Closes #3546.

Backend:
- New `_filter_by_tags` over `Rom.tags` with any/all/none logic; wired
  through filter_roms, get_roms_scalar, the /roms endpoint (tags +
  tags_logic), and the unscoped cache gate.
- Tags are data-derived, so the selectable list is surfaced via
  filter_values: added to _collect_filter_values, with_filter_values,
  get_rom_filters, and RomFiltersDict.
- Smart collections apply the criterion via get_smart_collection_roms.

Frontend (v1 + v2):
- Wired into the galleryFilter store, rom API service, request cache key,
  both filter drawers, v2 URL persistence, the v2 refetch watcher, and
  smart-collection serialization/summary + create dialog.
- Added the `platform.tag` key to all locales (distinct from the existing
  `platform.tags` section heading).

Tests:
- Backend handler (any/all/none + unknown-value), endpoint, filter_values,
  and smart-collection coverage.
- Frontend smartCollectionCriteria serialization/summary coverage.

AI assistance: implemented with Claude Code (Anthropic).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 11:29:12 +00:00

2.1 KiB