Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Note
Re-lands #5363 (
08acaa9ea), which was reverted in #5365. It is the same change, cherry-picked ontomasterwith Sam Dornan kept as the commit author.First step toward better metadata for ROM hacks and homebrew: a fixed release type vocabulary, stored as a list per ROM so a release can sit in several categories at once (a color patch that is also a hack, for example). Provider integrations (Homebrew Hub, Romhack Plaza, ...) are follow-ups that will map their own categories onto this list.
Vocabulary (
utils/release_types.py,ReleaseType):homebrew,hack,color_patch,translation,fan_game,total_conversion,randomizer,demake,port,prototype,utility,tech_demo,unlicensed.Where the values come from
(Hack), GoodTools[h1]→hack[T+Eng]and other translation tags →translation(Beta 2),(Proto),(Alpha)→prototype(Homebrew)→homebrewhack/trad/betadump flags, which already land intags, map the same way.(Unl)→unlicensed. The filename parser files(Unl)under regions (GoodTools listsUNLwith the country codes), so regions are a source too.manual_metadata.release_typeslist replaces the derived types. An empty list falls back to them, the same asgenresand the other manual lists.How it is stored and kept current
roms.release_typesis a plain JSON column, computed in Python likemin_age: mapper events cover ORM writes, andupdate_romrecomputes it for its bulkUPDATE.update_romnow walks one_DERIVED_ROM_COLUMNStable for bothmin_ageandrelease_types, instead of repeating that block.roms_facetsby the existing triggers, so it gets the standard filter treatment:release_types/release_types_logic(any / all / none) onGET /api/roms, filter values, smart collection criteria and URL sync (?releaseTypes=hack).0155_rom_release_types: adds both columns (theromsone through theroms_columnscatalog), rebuilds the facets triggers, and fills every existing row from its tags, regions and any saved manual list. Rows with no type get[], so the "none" operator never meets aNULL.API
RomSchema.release_types: list[ReleaseType]ManualMetadata.release_typesRomFiltersDict.release_typesUI
Gallery filter URLs (all filters)
A URL that names filter values without an operator now means "any", for every multi-select filter. Before, it kept whatever operator the store last held: after a "none" filter, a game-overview chip (
?genres=RPG,?releaseTypes=hack) excluded exactly what it linked to. When the URL names no values for a filter, the stored operator is left alone, so a "none" picked before any values isn't reset when another filter changes the URL. This was raised in review; it predates this PR but affects the new chips too.flowchart LR scan[Scan / edit] -->|tags, regions, manual_metadata| rom[(roms)] rom -->|compute_release_types: mapper event or update_rom| rt[roms.release_types] rt -->|AFTER INSERT/UPDATE trigger| facets[(roms_facets.release_types)] facets -->|release_types filter + filter values| api[GET /api/roms] rt -->|RomSchema.release_types| ui[Game overview / Edit ROM]Tests
update_romtests.none) and for manual overrides, including invalid values being rejected.release_types.releaseTypeshelper tests (every type has an English label).useGalleryFilterUrltests: values without an operator match any, an explicit operator applies, and a pending operator survives another filter's URL change.Notes for reviewers
unldump flag is still dropped (test_ss_handler.pypins that). Mapping it onto theUnlicensedregion would feedunlicensedfrom hash matches too. That's left for a separate change in case the exclusion was deliberate.2099TIMESTAMP. That's unrelated to this change, and CI's newer MariaDB passes them.Checklist
Please check all that apply.
npm run typecheck, app unit tests,npm run build, i18n checks, and a browser pass in both themes with a scanned mock library (filter, filtered gallery, Edit ROM override + save, game overview chips)Screenshots (if applicable)
Screenshots were captured during the browser pass: the filter drawer, a filtered gallery, the Edit ROM field and the game overview, in dark and light. They'll be attached here in a follow-up edit (this session can't upload images to GitHub).
Generated by Claude Code
🤖 Generated with Claude Code