Skip to content

Add Exclude collections in collection - #219

Open
Norphirion wants to merge 2 commits into
SteamClientHomebrew:mainfrom
Norphirion:add-exclude-collections-in-collection
Open

Add Exclude collections in collection#219
Norphirion wants to merge 2 commits into
SteamClientHomebrew:mainfrom
Norphirion:add-exclude-collections-in-collection

Conversation

@Norphirion

Copy link
Copy Markdown

Exclude collections in collection

Adds collection membership as a criterion for dynamic collections. Pick a dynamic collection, then either exclude every game that already belongs to other collections, or keep only those.

Steam's dynamic collections filter on tags, features, platforms and playtime, but not on other collections — so there is no way to express "everything I'm playing, minus everything I've already finished". This fills that gap. Rules are set per dynamic collection, stack on top of that collection's existing Steam criteria rather than replacing them, and refresh on their own when a source collection changes.

Notes for review

The plugin never touches Steam's cloud-synced filter definition. It replaces the collection's in-memory filter object with a stand-in that inherits the same prototype, forwards every own property back to the original (MobX administration symbols included), and overrides only Matches and bIsEmpty. Disabling the plugin restores every collection exactly as it was, and nothing is written to the user's Steam Cloud data.

Only dynamic collections can be targeted: a static collection has no filter of its own, and routing one through the filtering path would discard hand-curated membership. Rules are stored in localStorage.

Task Checklist

Developer

  • I am the original author or an authorized maintainer of this plugin.
  • I have complied with all license requirements for the libraries used, including providing appropriate notices where necessary.
  • My plugin is fully open source and does not depend on any external paid services, except for widely trusted and well-known platforms. Additionally, neither I nor anyone associated with me profits from any such services.

Plugin Functionality

  • I have tested the plugin on both the Stable and Beta Steam update channels.
  • My plugin is unique, or provides additional or alternative functionality to plugins already on the store.
    • The functionality of my plugin exists in the plugin "Collection+", but I wanted to have a standalone version of this options, with a user interface easier to use than adding some commands in the category settings

Backend Configuration

  • No: I use a standard Millennium python backend in my plugin.
  • No: I use custom binaries that or rely on other FOSS projects that aren't written directly using Millennium's python backend.

Community Contribution

  • I have tested and left feedback on two other plugin pull requests.
  • I have added links to those feedback comments in this PR.

Testing Instructions

  • Verified by a third party on Steam Client Stable.
  • Verified by a third party on Steam Client Beta.

@github-actions github-actions Bot changed the title feat: add exclude-collections-in-collection Add Exclude collections in collection Aug 5, 2026
@Norphirion

Copy link
Copy Markdown
Author

Heads up: this plugin was written by the same person, with the same toolchain, as date-added (#218 ), so it shipped with exactly the same defects. Rather than wait for a reviewer to find them a second time, I've applied the same fixes here:

  • Reproducible build. Every devDependency pinned to an exact version, typescript declared explicitly at 5.9.3 with a pnpm.overrides entry, pnpm-lock.yaml committed, and moduleResolution switched from node to bundler so the build survives TypeScript 7. Verified from a clean checkout with pnpm install --frozen-lockfile && pnpm run build.
  • Unload cleanup. The plugin now returns onDismount, which stops the watch timer and restores every collection's original filter object. Previously both were left running after a disable or reload. The async startup is also guarded, so an initialisation still pending when the plugin is dismounted can no longer reinstall filters afterwards.
  • $schema removed. The referenced file no longer exists upstream; see the discussion in the other PR.
  • LICENSE added (MIT), matching the README and package.json.
  • Unused dependencies dropped (@steambrew/api, @steambrew/webkit).
  • Also fixed a bug I found while doing this: the settings panel still displayed the plugin's former name.

For the record on what this plugin touches, since it is more invasive than a display-only plugin: it never writes to Steam's cloud-synced collection data. It substitutes the collection's in-memory filter object with a stand-in that inherits the same prototype, forwards every own property back to the original - MobX administration symbols included - and overrides only Matches and bIsEmpty. onDismount puts the originals back, so disabling the plugin restores every collection exactly as it was.

I'm not a developer and this was written with Claude Code, so I'd rather over-explain the mechanism than have it look like magic. Happy to answer anything or change the approach if it raises concerns.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant