Allow negative values in trade filters and add Max filter support - #10248
Open
ikidoncc wants to merge 1 commit into
Open
Allow negative values in trade filters and add Max filter support#10248ikidoncc wants to merge 1 commit into
ikidoncc wants to merge 1 commit into
Conversation
ikidoncc
force-pushed
the
fix/trade-negatives-max
branch
from
August 19, 2026 05:23
354e4fa to
f3018e9
Compare
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.
Description of the problem being solved:
Negative Value Input Restriction in Trade UI
Many modifiers in Path of Exile have negative values (e.g.,
-# to Total Mana Cost of Skills,-#% to Nearby Enemies' Cold Resistance).When players used the PoB Trader pane to search for item upgrades, the UI stripped out the minus sign (
-), preventing users from entering negative values in custom mod filters.Missing Max Filter in Required Modifiers
The Trade Query Generator pop-up only had a
Minfield for required modifiers. Users could not specify aMaxlimit, which is often necessary when searching for items within a specific range or when capping certain stats.Solution implemented
Allow Negative Numbers
Updated
TradeHelpers.lua:550to include%-in the sanitization filter patterns.^%d.to^%-%d.%Dto^%-%dAdd Max Input Field to the UI
Modified
TradeQueryGenerator.luato add a newmaximumBoxusing thenewPlainNumericEdithelper.fieldWidthfrom60to50andauxControlWidth, so bothMinandMaxfields fit next to the dropdown in the pop-up.Maxfield to save changes to themaxValuefield of the selected modifier.Include Max Value in PoE Trade API Query
Updated the query serialization logic in
TradeQueryGenerator.luato include themaxfield inside thevalueobject whenmaxValueis set.Verification / Testing performed
Unit Tests Added
Added tests to
TestTradeHelpers_spec.luavalidating thatnewPlainNumericEditgenerates the correct filter patterns for decimal and integer fields, allowing the-sign.Added tests to
TestTradeQueryGenerator_spec.luaverifying that the query serializer correctly handlesvalue.minandvalue.maxfor:Full Test Suite
Ran the entire test suite using Docker:
525 tests passed, with 0 failures and 0 errors.
Before screenshot:
After screenshot: