Context
zaparoo-core #969 (merged) adds a disambiguatingTags field to media.search and media.browse responses: the subset of a result's tags whose values differ across same-named siblings of that title, ordered by display importance. This is the server-side half of solving indistinguishable duplicate cards in the image grid — the client just needs to render it.
Current behaviour
SearchResultGame (src/lib/models.ts) doesn't have the field yet. SearchResults.tsx works around duplicate names by falling back to the raw filename:
// SearchResults.tsx (~lines 172-183)
const isDuplicate = duplicateNames.has(game.name);
... isDuplicate ? filenameFromPath(game.path) || game.name : game.name
That's noisy (full filenames with brackets) and inconsistent.
Proposal
- Add
disambiguatingTags?: TagInfo[] to SearchResultGame (and the browse-entry model) in src/lib/models.ts.
- In
SearchResults.tsx / VirtualSearchResults.tsx, when present, render the disambiguating tags as a compact badge row / subtitle on the card, and prefer this over the filename fallback for distinguishing same-named entries. The existing TagList component (already used for game.tags) could be reused with the disambiguating subset.
Notes:
- Tags are pre-sorted by importance server-side, so render left-to-right and truncate; no client-side ranking needed.
- A type only appears when it actually differs across siblings, so the field is empty for non-duplicated titles.
Acceptance
Regional / multi-disc / revision / arcade build-date variants of the same game show distinct badges (e.g. region:eu, builddate:1996-10-04) instead of identical cards or raw filenames.
Context
zaparoo-core #969 (merged) adds a
disambiguatingTagsfield tomedia.searchandmedia.browseresponses: the subset of a result's tags whose values differ across same-named siblings of that title, ordered by display importance. This is the server-side half of solving indistinguishable duplicate cards in the image grid — the client just needs to render it.Current behaviour
SearchResultGame(src/lib/models.ts) doesn't have the field yet.SearchResults.tsxworks around duplicate names by falling back to the raw filename:That's noisy (full filenames with brackets) and inconsistent.
Proposal
disambiguatingTags?: TagInfo[]toSearchResultGame(and the browse-entry model) insrc/lib/models.ts.SearchResults.tsx/VirtualSearchResults.tsx, when present, render the disambiguating tags as a compact badge row / subtitle on the card, and prefer this over the filename fallback for distinguishing same-named entries. The existingTagListcomponent (already used forgame.tags) could be reused with the disambiguating subset.Notes:
Acceptance
Regional / multi-disc / revision / arcade build-date variants of the same game show distinct badges (e.g.
region:eu,builddate:1996-10-04) instead of identical cards or raw filenames.