Add Exclude collections in collection - #219
Conversation
|
Heads up: this plugin was written by the same person, with the same toolchain, as
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 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. |
…atabase into add-exclude-collections-in-collection # Conflicts: # .gitmodules
|
Applied the same fix about |
Brings in the rules being editable from Steam's own filter UI, and a fix for the filter wrapper being silently discarded when Steam rebuilds a collection's filter object. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Pushed 1.1.0. Two changes, one user-facing and one a bug fix. Rules are now set inside Steam's own filter UIPreviously the rules lived only in the Millennium settings panel, away from the filters they extend. Two buckets : Exclude collections and Include collections are now injected into Steam's filter area, in two places:
Pick collections from a dropdown, click a chip to remove one. A collection already used by one bucket is greyed out in the other. The settings panel is kept — it is the only place that lists every rule at once — and both paths write through the same function. The injection is append-only: no element of Steam's own is modified, moved or restyled, so disabling the plugin leaves the panel exactly as it was. Two layout details turned out to be load-bearing and are documented in the README:
Fix: the filter wrapper could be silently discardedThe engine wrapped a collection's Each poll now re-checks that the wrapper is still in place and reinstalls it otherwise, and the watcher starts as soon as any rule exists rather than only once a wrap has succeeded, so a collection that was not ready at start-up is picked up on a later pass. Verified after a cold restart by comparing, for every rule, the collection's actual contents against what the native filter plus the rule should produce — exact match on all of them. UnchangedNothing about what the plugin touches has changed: the cloud-synced
|
Layout fix: the injected buckets no longer sit inside Steam's filter grid, where their height was multiplied by the grid's `2fr 1fr` row ratio and inflated the whole filter panel. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
1.1.1 — a layout fix on the buckets added in 1.1.0. The bug. The filter panel grew far more than the buckets needed. With seven chips wrapping over a few lines it went from 263px tall to 663px, and it kept growing with each chip added. The cause. Steam's filter area is declared The fix. Steam has the same problem with its own Language and Genre buckets, and solves it by placing them in a sibling container outside the grid. The buckets now go into a container of their own built from that same class, so they inherit its layout and breakpoints and land just after it. Measured on the same collection, the panel stays at 263px with seven chips. Two things fall out of that: the explicit CSS
|
Documentation and source comments only: punctuation cleanup, no behaviour change and no version bump. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Include and exclude lists now apply together instead of replacing one another, and collection names follow Steam's upper-case convention. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Pushed 1.1.2, which addresses the three points raised by @SalvadorCorreia that created the Sortium plugin #231 , in a Discord PM:
Thanks for these. Two are fixed, one I am deliberately leaving alone, and answering the second one turned up a real bug. Collection names are now upper-cased, in the dropdown and on the chips. You were right: A bug your second point uncovered. Rules stored a single mode with one list of sources, so choosing a collection in one bucket silently replaced whatever the other held. The greying-out of collections "already used by the other bucket" could never fire either, since the other bucket was always empty by construction. Rules now hold both lists at once: inclusions narrow the pool, then exclusions are removed from it, and an empty include list means the rule does not narrow anything so exclusions still work on their own. Existing rules are migrated on read. Verified against a real library: identical results before and after the migration. The Save button. This one stays as it is, and I want to explain why rather than leave it looking unfinished. The button's disabled state is React state that Steam derives from its own filter definition being empty. The only ways to light it up are to write into that definition, or to fight Steam's React state from outside. The first is the problem: Steam's filter definition is cloud-synced, it has no notion of collection membership, so we would not be storing our rule there, we would be storing an unrelated decoy option purely to make the filter look non-empty. That option would then appear in Steam's own UI as a filter the user never chose, sync to every machine on the account, and survive uninstalling the plugin. Not worth it for a UI gate. Pick any one native option and the rule saves alongside it. The preview list. I could not reproduce it in the collection editor, where the list and the count do follow our rules. You are right about the creation popup though: there, the preview is computed from a draft filter object that only knows about Steam's own criteria. I looked into hooking it, and it is reachable, but only by walking React's internal fiber tree, and making the preview actually refresh would mean touching the draft filter definition, which is the same object that gets saved. Both add fragility to the most invasive part of the plugin for a preview convenience, so I am leaving it. The rule applies correctly as soon as the collection exists. Worth noting for completeness: a dynamic collection can also contain manually added games, which Steam keeps regardless of any filter. Those are not something this plugin can remove, and it should not.
|
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
MatchesandbIsEmpty. 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
Plugin Functionality
Backend Configuration
Community Contribution
Feedback left after source audits and live Steam Client Stable testing:
Sortium - PR #231
Non-Steam Store Link - PR #223
Recent Chats - PR #221
Steam Wrapped - PR #220
Testing Instructions