feat: split company metadata into publishers and developers - #3898
Open
gantoine wants to merge 1 commit into
Open
feat: split company metadata into publishers and developers#3898gantoine wants to merge 1 commit into
gantoine wants to merge 1 commit into
Conversation
Metadata providers (ScreenScraper, RetroAchievements, LaunchBox, Flashpoint, gamelist, IGDB) distinguish the publisher from the developer of a game, but RomM amalgamated both into a single `companies` list at ingestion, so the distinction was unrecoverable. This adds `publishers` and `developers` as new, refined fields end to end while keeping `companies` (the merged union) working exactly as before. Backend: - Handlers now emit publishers/developers alongside the unchanged companies list; IGDB requests the involved_companies developer/ publisher flags to split by role. - Migration 0102 adds generated_publishers/generated_developers columns on roms, projects them through the roms_metadata view, mirrors them into roms_facets, and adds publisher/developer virtual-collection types (triggers/functions rebuilt for MariaDB/MySQL + PostgreSQL). - Filters, facets, endpoints, smart collections and the gamelist/pegasus exporters all carry the new fields; exporters prefer the explicit split and fall back to the companies heuristic for un-rescanned ROMs. Frontend (v2): - Shared filter store + API service, gallery filter drawer, URL persistence, game detail display (Developers/Publishers with a Companies fallback), edit dialog, smart-collection criteria, and a publisher/developer "group virtual collections by" option. - Also relabels the confusing "company"->"Developer" group-by option to "Company" now that a proper Developer option exists. Fixes #3518 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Greptile SummaryAdds distinct publisher and developer metadata throughout the application while preserving the existing merged companies field.
Confidence Score: 5/5The PR appears safe to merge, with the publisher/developer split consistently threaded through persistence, APIs, filtering, exports, and the v2 interface. The new role fields preserve the existing companies contract, use the established metadata precedence and JSON-filter paths, rebuild dependent database synchronization structures for both supported dialect families, and retain explicit compatibility fallbacks for metadata created before this change. Important Files Changed
Reviews (1): Last reviewed commit: "feat: split company metadata into publis..." | Re-trigger Greptile |
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
Metadata providers (ScreenScraper, RetroAchievements, LaunchBox, Flashpoint, gamelist, IGDB) distinguish the publisher from the developer of a game, but RomM amalgamates both into a single
companieslist at ingestion, so the distinction is unrecoverable (which breaks round-tripping to tools like LaunchBox/Pegasus where it matters to collectors).This threads two new refined fields,
publishersanddevelopers, end to end.companiesis kept unchanged as the merged union, so nothing existing breaks; the split is purely additive.Backend
publishers/developersalongside the unchangedcompanieslist (ss, ra, launchbox, flashpoint, gamelist, igdb, hasheous). IGDB requests theinvolved_companies.developer/.publisherflags to split by role.0102addsgenerated_publishers/generated_developersSTORED columns onroms, projects them through theroms_metadataview (appended, so nothing shifts), mirrors them intoroms_facets, and addspublisher/developervirtual-collection types. All triggers/functions rebuilt for MariaDB/MySQL + PostgreSQL;upgrade/downgraderound-trips and live trigger-sync verified.companies[0]/[1]heuristic for ROMs scanned before the split.Frontend (v2)
company→ "Developer" group-by option to "Company" now that a proper Developer option exists.Notes
companiesuntil ROMs are re-scanned (the split reads raw provider blobs that predate the new keys).companiesstays fully populated meanwhile.companiesas-is.AI-assistance disclosure
This PR was implemented with substantial assistance from Claude (Claude Code). AI was used to map the
companiesdata flow, write the migration and the handler/schema/filter/frontend changes, and author the tests. All changes were reviewed and verified locally by the author.Checklist
Testing
alembic upgrade head/downgrade -1round-trip on MariaDB; 906 passed / 2 skipped across handler/database/metadata/utils/endpoints (incl. new generated-column, facets, and exporter tests).vue-tsctypecheck clean, vitest green (incl. new smart-collection criteria tests),npm run generateregenerated types, i18n parity + sorted checks pass.