Skip to content

Restore Market Filter with Custom Expression Parser#403

Open
GODrums wants to merge 7 commits into
masterfrom
feat/expression-ast-parser
Open

Restore Market Filter with Custom Expression Parser#403
GODrums wants to merge 7 commits into
masterfrom
feat/expression-ast-parser

Conversation

@GODrums

@GODrums GODrums commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Closes #400

Step 3 of #395

Adds a compatibility layer to support our filter container in the Steam Market Beta.

Due to React's self CSP, it also replaces filtrex with a custom expression parser supporting the same input syntax. Architected with Opus 4.8, reviewed by Fable 5. Tested all variables and operators manually

Screenshots

!https://github.com/user-attachments/assets/1d296ca3-3ec6-4eed-88c5-7ec2f2d5bdef


Note

Medium Risk
Replaces the entire filter expression engine and broadens valid return types, so subtle syntax or truthiness mismatches vs filtrex could affect highlights across classic and beta market pages.

Overview
Brings CSFloat highlight filters back on the Steam Market beta by mounting the existing filter UI above the React listing grid and wiring beta listing cards to the same gFilterService highlighting used on the classic market.

filtrex is removed and replaced with an in-tree compile_expression tokenizer/parser/evaluator so filter syntax still works under React’s stricter CSP. Filter now compiles through that module; isValidReturnValue treats any non-Error result as valid instead of only booleans and 0/1.

Beta BetaListingEnhancer derives price from listing fiber props, subscribes to filter updates, and paints each card’s background/text when a filter matches.

Reviewed by Cursor Bugbot for commit 47b0317. Configure here.

@GODrums GODrums self-assigned this Jun 13, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 47b0317. Configure here.

Comment thread src/lib/components/market/react/listing.ts Outdated
Comment thread src/lib/components/market/react/filter_panel.ts
@GODrums GODrums requested a review from Step7750 July 5, 2026 17:11
Base automatically changed from feat/market-pattern-enhancements to master July 6, 2026 14:38
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.

Restore filtering / highlighting logic by reworking our filter with our own AST parser (circumvent React's CSP default-src 'self')

1 participant