Skip to content

Trader improvements#9691

Merged
LocalIdentity merged 49 commits intoPathOfBuildingCommunity:devfrom
vaisest:trader-improvements
Apr 16, 2026
Merged

Trader improvements#9691
LocalIdentity merged 49 commits intoPathOfBuildingCommunity:devfrom
vaisest:trader-improvements

Conversation

@vaisest
Copy link
Copy Markdown
Contributor

@vaisest vaisest commented Mar 23, 2026

Fixes #9678

Description of the problem being solved:

This solves some annoying steps with the trader tool. Notably it allows for and defaults to filtering out whisper listings, as these are often not actually going to be sold at the listed price. For async trade it also adds a button to show the result page as apparently GGG considers using the direct whisper/travel API to be past the line of breaking TOS.

Steps taken to verify a working solution:

  • A decent amount of testing by finding upgrades for my own build, but no automated tests.

Sample build

https://pobb.in/B2SI3YzPgw93 (just my avatar of fire BV)

Before screenshot:

image

Body Armour:

image Amulet: image image

After screenshot:

Path{space}of{space}Building_2026-04-09_03-19-25

Body Armour:

image

Amulet:

image image

I have also implemented a copy setting that uses the currently equipped eldritch mods, enchants, and anoints. I think it makes sense to do this because it's quite rare for the results to have what you want, and they can be borderline required (as in the sample build gloves, which need fire conversion). It also helps show the true value of e.g. cord belts well.

Included are also fixes for #9678 which resulted in crashes and currency rates (and hence sorting) not working.

Note that this is based on the watcher's eye branch but I may have configured that incorrectly on Github.

@vaisest vaisest force-pushed the trader-improvements branch 3 times, most recently from 1149f4f to 688515e Compare April 6, 2026 17:37
@vaisest vaisest marked this pull request as ready for review April 7, 2026 15:49
@LocalIdentity LocalIdentity added the enhancement New feature, calculation, or mod label Apr 15, 2026
LocalIdentity added 14 commits April 15, 2026 22:37
pbLeagueRealName does not exist. The correct variable is pbLeague
The scourge anchor has a typo in it
The trade site uses floats for the weights internally when sorting but only shows integers to the site and api
Need to use +-1 so that it doesn't accidently miss an item
e.g. before a weight of 100.3 would show as 100 in the api callback and then we'd search for 99.9 - 100.1 so the search would never show the item
Can now properly search for items when the user pastes a weighted sum search
The dropdown checked if the last changed dropdown was set to none instead of checking that both of the dropdowns were set to none. Setting an influence and setting it back to none would make the copy eldritch box become selectable when it shouldn't be
Copy link
Copy Markdown
Contributor

@LocalIdentity LocalIdentity left a comment

Choose a reason for hiding this comment

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

PR looks good now. I found a bunch of small issues with different functions and fixed them

@LocalIdentity LocalIdentity merged commit 12ea1a4 into PathOfBuildingCommunity:dev Apr 16, 2026
2 of 3 checks passed
mcagnion added a commit to mcagnion/PathOfBuilding that referenced this pull request Apr 16, 2026
Port of feature/bench-craft-eval onto current origin/dev.
Adapted to upstream PathOfBuildingCommunity#9691 changes (removed enchantInSort reference,
adjusted popup control anchoring for new layout).
Fix pre-existing space indentation on upstream TradeQuery.lua line 629.

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
…ries

Port of feature/trade-query-required-mod-pins onto current origin/dev.
Adapted to upstream PathOfBuildingCommunity#9691 changes (new popup layout, includeMirrored
guarded for uniques, new control anchoring pattern).

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
Port of bugfix/trade-query-influence-none onto current origin/dev.
Adapted to upstream PathOfBuildingCommunity#9691 changes: combined normalizeInfluenceSelections
with copyEldritch interaction, Watcher's Eye guard, SetSel pattern,
^7 label prefixes. Updated isSpecificInfluenceSelection check for
eldritch weight skip in ExecuteQuery.

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
Port of feature/resistance-swap onto current origin/dev.
Adapted to upstream PathOfBuildingCommunity#9691 changes (removed enchantInSort, new popup
layout, Watcher's Eye support, updated sort algorithm).

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
Port of feature/bench-craft-eval onto current origin/dev.
Adapted to upstream PathOfBuildingCommunity#9691 changes (removed enchantInSort reference,
adjusted popup control anchoring for new layout).
Fix pre-existing space indentation on upstream TradeQuery.lua line 629.

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
…ries

Port of feature/trade-query-required-mod-pins onto current origin/dev.
Adapted to upstream PathOfBuildingCommunity#9691 changes (new popup layout, includeMirrored
guarded for uniques, new control anchoring pattern).

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
Port of bugfix/trade-query-influence-none onto current origin/dev.
Adapted to upstream PathOfBuildingCommunity#9691 changes: combined normalizeInfluenceSelections
with copyEldritch interaction, Watcher's Eye guard, SetSel pattern,
^7 label prefixes. Updated isSpecificInfluenceSelection check for
eldritch weight skip in ExecuteQuery.

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
Port of feature/resistance-swap onto current origin/dev.
Adapted to upstream PathOfBuildingCommunity#9691 changes (removed enchantInSort, new popup
layout, Watcher's Eye support, updated sort algorithm).

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
Port of feature/trade-query-saved-options onto current origin/dev.

Adds SetSavedOptions/save-back plumbing so that the options selected in
the TradeQueryGenerator popup (include Mirrored/Corrupted/Scourge/
Talisman, Eldritch dropdown, influences, jewel type, max price /
currency / max level) survive closing and re-opening the popup via
TradeQuery:PriceItem.

Adapted for upstream PathOfBuildingCommunity#9691 (Trader improvements popup remanie, with
includeMirrored only created when the slot item is not unique and
includeEldritch now being a 3-option dropdown). The original
onlyImplicitWeights / requireUnique / includeSynthesis / includeAttrReqs
fields are dropped as they no longer exist in the upstream generator.

Also fixes a pre-existing space-indented line in TradeQuery.lua that was
blocking the pre-commit tab-indentation check.

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
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

enhancement New feature, calculation, or mod

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error/crash when attempting to re-open trade menu, "Unhandled currency conversion divine" in console

3 participants