Skip to content

Add quantity/copies/singleton filter for cube-list boards - #3025

Open
haganbmj wants to merge 2 commits into
dekkerglen:masterfrom
haganbmj:filter-quantity
Open

haganbmj wants to merge 2 commits into
dekkerglen:masterfrom
haganbmj:filter-quantity

Conversation

@haganbmj

@haganbmj haganbmj commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Per-board name-grouped copy counts are stamped on cards in CubeContext before the filter runs. Adds quantity:, count:, copies: numeric filters plus is:singleton / not:singleton category aliases. Scoped per board to match Collapse Duplicates.

Outside a cube list every card reads as one copy, so quantity>1 returns nothing and is:singleton matches everything (documented in the wiki entry).

Also fixes the isOpValue grammar wrapper that was silently dropping the card argument, so category detectors that need the card object (is:voucher, is:foil / nonfoil / etched / altfoil, and the new singleton) now actually receive it.

EDIT: Removed the generated nearley file because it looks to be out of sync with master.
EDIT2: Bleh.. that causes the tests to fail.
EDIT3: Fixed.

@github-actions

Copy link
Copy Markdown

📊 Server Code Coverage Report

Metric Coverage % Coverage Raw Delta % Delta Raw
Lines 19.8% 3098/15640 +0.00% +0
Statements 19.34% 3201/16543 +0.00% +0
Functions 14.06% 366/2603 +0.00% +0
Branches 13.43% 1280/9530 +0.00% +0

Stamp per-board name-grouped copy counts on cards in CubeContext before the filter runs so quantity/count/copies>=N and is:singleton/not:singleton can filter within a board (matches Collapse Duplicates). Outside a cube list every card reads as one copy, so quantity>1 returns nothing and is:singleton matches everything. Fixes the isOpValue grammar wrapper to forward the card argument so detectors that need it (voucher, finish variants, new singleton) receive it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant