Skip to content

Conversation

@Mizkii
Copy link
Contributor

@Mizkii Mizkii commented Sep 4, 2025

Fixes #1314

Description of the problem being solved:

This PR introduces two major enhancements to the Trader pane, overhauling the trade interaction workflow and providing more granular search control.

The new functionality includes:

  • Direct In-Game Trade Actions: The trade process is streamlined by sending whispers and hideout teleports directly via the trade API, removing the need to manually copy and paste messages.
    • Direct Hideout Teleport: When an item listing provides a hideout_token, the button changes to "Teleport" and sends the user directly to the seller's hideout.
    • Direct Whisper: For listings with a whisper_token, the button sends the trade whisper directly to the player in-game.
    • Smart Fallback: If a direct action fails or if only a legacy whisper string is available, the system automatically falls back to copying the message to the clipboard and also showing an error on the buttom right.
    • On-Demand Token Refresh: To prevent expired tokens, fresh data is fetched for an item the moment it is selected from the results list.
  • "Trade Mode" Search Filter: A "Trade Mode" dropdown has been added, giving users control over the online status of their item searches instead of using a hardcoded value.
    • Instant Buyout and In Person Trade (available)
    • Instant Buyout Only (securable)
    • In Person Trade Only (online)
    • Any (any)

Steps taken to verify a working solution:

  • Manually tested the new direct trade actions ("Teleport" and "Whisper") against the live trade site and confirmed they were successful.
  • Verified the button UI correctly updates its text and action based on the hideout_token or whisper_token present in the API response.
  • Confirmed that failed API calls correctly trigger the fallback mechanism, copying the whisper to the clipboard.
  • Selected each of the four options from the new "Trade Mode" dropdown and generated weighted searches, verifying that the resulting trade query used the correct status option (available, securable, online, etc.).
  • Successfully ran the entire project test suite in the Docker environment using docker-compose up.
image
  • Successfully ran the Spellchecker
image

Link to a build that showcases this PR:

Not applicable. This is a core feature enhancement for the Trader and is not build-specific.

Before screenshot:

The Trader pane UI before this change, featuring only a static "Whisper" button and no "Trade Mode" filter.

image

After screenshot:

The Trader pane UI with the new dynamic buttons (showing "Teleport" and "Whisper") and the new "Trade Mode" dropdown in the bottom-right corner.

image

@darkdex52
Copy link

Any ETA of this getting approved? This feature would be huge for pob.

@LocalIdentity LocalIdentity added the enhancement New feature, calculation, or mod label Sep 20, 2025
@Alexander3a
Copy link

Alexander3a commented Sep 20, 2025

Could you please fix the trade window losing the content on reopening?

@Mizkii
Copy link
Contributor Author

Mizkii commented Sep 21, 2025

Could you please fix the trade window losing the content on reopening?

yes

@Alexander3a
Copy link

Could you please fix the trade window losing the content on reopening?

yes

Thanks seems to work without issues :)

@Guneshan407
Copy link

This is a very necessary feature for Path of Building 2. I make a lot of progress with Path of Building, but unfortunately, the trader feature only uses the old-fashioned trading system. For this reason, I have to click on the resulting trade link and select the Instant buyout option. However, I can only do Weigh Sum sorting. I cannot perform the stat-priority search normally in the trader of Path of Building 2. When will this feature be added to the main version?

@LocalIdentity
Copy link
Contributor

LocalIdentity commented Oct 10, 2025

@Guneshan407 it'll be included in the next update. I've just been working on optimisation stuff and adding buildup calcs for the past week or so and haven't merged it yet

@fireundubh fireundubh mentioned this pull request Nov 5, 2025
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.

add the new feature of instant buyout at the "trade for these items" search tab

5 participants