Skip to content

feat(collections): add a collection naming mode to keep same-named types separate#1569

Open
danielcopper wants to merge 2 commits into
mainfrom
feature/1539-collection-naming-mode
Open

feat(collections): add a collection naming mode to keep same-named types separate#1569
danielcopper wants to merge 2 commits into
mainfrom
feature/1539-collection-naming-mode

Conversation

@danielcopper

Copy link
Copy Markdown
Owner

Now that franchise and IGDB-collection virtual types both sync, collections of different types that share a name silently merge into one Steam collection (#1503's by-name union) — two enabled rows collapse into one Steam collection with no way to tell them apart. This adds a user setting to opt out of that merge.

collection_naming_mode

A new setting in Settings → Library, default merge (unchanged behaviour):

  • merge (default) — same-named collections union into one RomM: [<name>] (<host>).
  • by_label — each Steam collection name carries its type label so distinct groupings stay separate: RomM: [<name> (Franchise)] (<host>), RomM: [<name> (IGDB Collection)] (<host>), RomM: [<name> (Smart)] (<host>), RomM: [<name> (Standard)] (<host>). Collections that share both name and type still union.

The label is injected at the reporter's union key, so the frontend create-name and the stale-collection reconcile stay derived from a single key. Switching modes renames every collection on the next normal sync — the existing complete-set reconcile deletes the old-named collections and recreates them under the new scheme; no Force Full Sync is needed.

Toggle copy: "Distinguish collection types in Steam names — Adds the collection type (e.g. Franchise, IGDB Collection) to the Steam collection name so collections that share a name stay separate instead of merging into one. Applies on the next sync."

Docs (syncing guide, Steam-shortcuts architecture) and the glossary are updated in the same change.

Closes #1539.

…team names)

Add a collection_naming_mode setting (default "merge", opt-in "by_label")
controlling how Steam collection names are formed when RomM collections share a
display name across kinds. Under "by_label" the reporter appends the fine
collection-type label (Standard / Smart / Franchise / IGDB Collection) to the
union key, so same-named collections of different types land in separate Steam
collections (RomM: [<name> (Franchise)]) instead of merging; same name AND label
still union.

The label is computed backend-side at the reporter's union key from a new pure
domain/collection_label kernel, whose strings mirror the frontend collection-type
vocabulary. The name->appIds wire payload is unchanged and the frontend reconcile
is untouched — both the create-name and the reconcile activeNames derive from the
same reporter key. WorkUnit.virtual_type and CollectionMembership.kind/virtual_type
thread the collection type through fetcher -> orchestrator -> reporter. The label
is bracket-free so the RomM: [<name>] name-parse stays intact.

The setting mirrors collection_owner_scope end-to-end (persistence default, a
validated setter with the canonical failure shape, main.py callable, backend/type
mirrors) and adds a Settings -> Library toggle with optimistic update + rollback.
A mode flip applies on the next normal sync via the existing complete-set
reconcile; no Force Full Sync or skip-state invalidation is involved.
@github-actions github-actions Bot added area:sync Library sync engine area:ui Frontend UI, game detail page area:architecture Code structure, refactoring labels Jul 23, 2026
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:architecture Code structure, refactoring area:sync Library sync engine area:ui Frontend UI, game detail page

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(ui): redesign the overloaded collection-settings QAM

1 participant