Restore Market Filter with Custom Expression Parser#403
Open
GODrums wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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.
| /** Use the title of the page to get the market hash name */ | ||
| function marketHashName(): string | undefined { | ||
| return document.title.match(/^(.+?) - Steam Community Market$/)?.[1] ?? undefined; | ||
| } |
There was a problem hiding this comment.
English-only title filter key
Medium Severity
Item filter storage keys are parsed from document.title with a suffix fixed to the English string Steam Community Market. Localized Steam clients use different title suffixes, so marketHashName() returns undefined, the filter panel renders nothing, and per-item filters never initialize on the beta market for those users.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 47b0317. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Closes #400
Step 3 of #395
Adds a compatibility layer to support our filter container in the Steam Market Beta.
Due to React's
selfCSP, it also replacesfiltrexwith a custom expression parser supporting the same input syntax. Architected with Opus 4.8, reviewed by Fable 5. Tested all variables and operators manuallyScreenshots
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
gFilterServicehighlighting used on the classic market.filtrexis removed and replaced with an in-treecompile_expressiontokenizer/parser/evaluator so filter syntax still works under React’s stricter CSP.Filternow compiles through that module;isValidReturnValuetreats any non-Errorresult as valid instead of only booleans and0/1.Beta
BetaListingEnhancerderives 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.