Skip to content

trader tool: fix different searches overwriting the last query#9767

Merged
LocalIdentity merged 1 commit intoPathOfBuildingCommunity:devfrom
vaisest:trade-filter-fix
Apr 16, 2026
Merged

trader tool: fix different searches overwriting the last query#9767
LocalIdentity merged 1 commit intoPathOfBuildingCommunity:devfrom
vaisest:trade-filter-fix

Conversation

@vaisest
Copy link
Copy Markdown
Contributor

@vaisest vaisest commented Apr 16, 2026

Description of the problem being solved:

Fixes an issue on my previous PR where searching different categories overwrites the last query, and searches the wrong item when clicking the search button.

@Peechey Peechey added the technical Hidden from release notes label Apr 16, 2026
@LocalIdentity LocalIdentity merged commit 6fed99f into PathOfBuildingCommunity:dev Apr 16, 2026
3 checks passed
mcagnion added a commit to mcagnion/PathOfBuilding that referenced this pull request Apr 16, 2026
Display the current step (Search, Search 2..., etc.) and fetch progress
(fetched/total...) directly on the "Find best" and "Price Item" buttons
instead of only showing "Searching...". This gives feedback during the
weighted recursion and during the block-by-block fetch.

- TradeQueryRequests: plumb onSearchStart(step) and onFetchProgress(fetched,
  total) callbacks through SearchWithQuery, SearchWithQueryWeightAdjusted,
  FetchResults and SearchWithURL.
- TradeQuery: each button now drives its own label; bestButton is kept
  disabled while its label is not "Find best", priceButton while its label
  is not "Price Item".
- Add local m_min = math.min in TradeQueryRequests (also fixes an existing
  undefined reference used in the 429 retry backoff).
- Drive-by: convert one pre-existing space-indented line in TradeQuery.lua
  to tabs so the pre-commit hook accepts the staged file.

Ported onto current origin/dev (adapted for PathOfBuildingCommunity#9691 popup/SearchWithURL
query-arg, PathOfBuildingCommunity#9767 lastQueries[row_idx], and the extracted UpdateDropdownList
method).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mcagnion added a commit to mcagnion/PathOfBuilding that referenced this pull request Apr 16, 2026
Adds checkboxes on the Trade tab to reuse the currently equipped item's
Eldritch implicits and amulet anoint when evaluating and displaying
trade results. Also adds an "Include unusable" checkbox (UI only, filter
logic not yet wired -- hence WIP).

Routes result-item construction through a new
TradeQueryClass:BuildResultItemWithOverrides helper used by
GetResultEvaluation, UpdateDropdownList, the result tooltip and the
Import Item button so overrides apply consistently.

Port adapted to upstream changes:
- PathOfBuildingCommunity#9691 removed enchantInSort/sort algorithm rework: dropped the
  conditional enchantModLines stripping; the new useCurrentAmuletEnchant
  checkbox replaces the only remaining meaningful use.
- PathOfBuildingCommunity#9767 lastQueries[row_idx]: already in place, no conflict.
- PathOfBuildingCommunity#9744 dropdown list refactor: plugged BuildResultItemWithOverrides
  into UpdateDropdownList instead of the old inline loop.

Dropped the unused isEldritch helper from the original diff (it was
defined but never called). includeUnusable checkbox state is plumbed
but not yet consumed by any query/filter.

Also fixes one pre-existing space-indented line in the same function
that the pre-commit hook rejected.

WIP -- upstream of feature/trade-query-current-item-overrides marked
WIP (commit 2a7ad4a "WIP Keep implicits").

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

technical Hidden from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants