Repository navigation
Conversation
mcagnion
marked this pull request as ready for review
April 28, 2026 21:45
mcagnion
force-pushed
the
feature/attributes-requirements-for-trade-query
branch
from
May 13, 2026 23:17
587c8d2 to
02cf25a
Compare
mcagnion
force-pushed
the
feature/attributes-requirements-for-trade-query
branch
3 times, most recently
from
August 6, 2026 09:26
8d8b185 to
c51431f
Compare
mcagnion
force-pushed
the
feature/attributes-requirements-for-trade-query
branch
2 times, most recently
from
August 22, 2026 10:57
2e59d23 to
80f3ac7
Compare
Adds an "Include unusable" checkbox (off by default) to the Trader pane that hides search results whose Str/Dex/Int (or Omni) requirements the build cannot meet once equipped. Filtering is applied across all sort modes and cached per result to avoid redundant calcFunc calls. When filtering drops every result, the dropdown and total-price state are cleared and a dedicated notice is shown. Adds a matching "Attributes Requirements" checkbox (on by default) to the TradeQueryGenerator popup. When enabled, the shortfall (build requirement minus build attribute) is inserted as pseudo.pseudo_total_* min filters in the generated query so trade search only returns items that cover the missing attributes. Also hardens UI state transitions around filtered results: the result dropdown selection callback guards against stale indices, the section anchor preserves its base Y when the scrollbar offsets it, and empty sorted results no longer crash UpdateDropdownList / UpdateControlsWithItems. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove the obsolete Watcher's Eye fallback, resolve replacement slots from live item state, and share requirement semantics across query generation and result validation.
mcagnion
force-pushed
the
feature/attributes-requirements-for-trade-query
branch
from
August 26, 2026 18:13
80f3ac7 to
f69c788
Compare
Check mixed eligible and ineligible results in every sort mode while preserving the fetched result index. Construct the empty filtered row through UpdateControlsWithItems and verify its controls and total price.
Construct the filtering row directly instead of sharing helpers across test groups. Retain the sort and empty-row assertions while keeping the cumulative test diff smaller.
Keep the sort, empty-row and generated-query checks while removing unused fixture fields, a single-use helper and redundant assertions.
Convert final attribute deficits to raw item minimums using the native modifier database and rounding. Cap the result at the existing deficit because a replacement can increase attribute scaling itself. Cover amplified attributes and candidate scaling with two native cases sharing the same query fixture.
The rows started one row lower than the pane height allows, so with many slots the last visible row covered the Total Price label. Use the same anchor and scroll offset as dev.
Replace the attribute checkbox with the requirement list of the Items tab unique list (Any requirements, Current level, Current attributes, Current useable), placed under Sort By. Current level hides results whose level requirement is above the character level; Current attributes keeps the equipped attribute check. Trade results now keep the listing's level requirement, which includes its mods, so the level check does not fall back to the base level.
Since results can be filtered by requirements, a search returning no compatible item kept an empty result row and no notice. Go back to the search view with "No compatible items found for this slot." as before, and word the filtered-out notice like the other Trader notices.
Restore the original formatting of the whisper button constructor, comment the Pearl of Tsoatha slot choice, drop a guard the sorted results never need, and make the dropdown comment cover the level filter.
Contributor
Author
|
Updated the PR:
The title and description now cover the level filter. |
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:
Trade searches can return items that look like good upgrades but leave the build short of attribute requirements once equipped, or that the character is not yet high enough level to use.
This adds two complementary controls:
Attribute requirementsin Query Options, checked by default, adds total Strength, Dexterity, and Intelligence minimums to the generated trade search when the build is short on attributes. The minimums account for increased or reduced attributes on the build and never ask for more than the build is short by. Flasks and builds using Omniscience get no attribute minimums.Sort Byin the Trader, with the same choices as the requirement filter of the unique list in the Items tab. It defaults toAny requirements, so results stay visible unless the user picks a filter:Current levelhides results whose level requirement is above the character level.Current attributeshides results that, once equipped in the slot they would replace, still leave unmet Strength, Dexterity, Intelligence, or Omniscience requirements. Rows without an equippable slot (the Megalomaniac and Watcher's Eye rows when no jewel socket is allocated) are not filtered by attributes.Current useableapplies both.The Trader now keeps the level requirement shown on the trade listing, which reflects the item's mods, instead of the base item's requirement. Items with socketed gems keep the base requirement.
Steps taken to verify a working solution:
Current levelkept only the listings requiring level 66 or less (42 of them, against 83 if the base item's requirement were used),Current attributeskept the four rings that cover the Dexterity the build would lose, andCurrent useablekept the one ring meeting both.Sort By, all rows stay aboveTotal Price, andCurrent useablekept a ring the build can use.Screenshots:
Query Options
Trader