Skip to content

Conversation

@qwinndev
Copy link
Contributor

@qwinndev qwinndev commented Dec 4, 2025

Main changes:
Updated Tradebox:

  • leverage, collateral and pool selection moved to the top of tradebox
  • pay and receive changed to margin fields
  • sidecar orders updated to only include one full close TP and SL
  • updated buttons labels

Other changes:

  • Updated buttons in positions list
  • Size in positions list now is toggle between usd and token amount
  • TP/SL column in positions list
  • New TP/SL modal representing position TP/SL orders and buttons to manage them
  • New Add TP/SL modal

@qwinndev qwinndev changed the base branch from master to release-91 December 4, 2025 12:55
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 5, 2025

Deploying gmx-interface-home with  Cloudflare Pages  Cloudflare Pages

Latest commit: b128ae5
Status: ✅  Deploy successful!
Preview URL: https://51619a44.gmx-interface-home.pages.dev
Branch Preview URL: https://tradebox-ux-update.gmx-interface-home.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 5, 2025

Deploying gmx-interface with  Cloudflare Pages  Cloudflare Pages

Latest commit: b128ae5
Status: ✅  Deploy successful!
Preview URL: https://106ec1ef.gmx-interface.pages.dev
Branch Preview URL: https://tradebox-ux-update.gmx-interface.pages.dev

View logs

@divhead
Copy link
Contributor

divhead commented Jan 21, 2026

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

)}

{networkFee && (
{networkFee && isTpSlEnabled && (
Copy link

Choose a reason for hiding this comment

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

Network fee hidden when editing order without TP/SL

High Severity

The network fee row condition networkFee && isTpSlEnabled prevents displaying execution fees when editing an order without adding TP/SL orders. The additionalExecutionFee (shown in the tooltip as "Order update fee") exists independently when gas prices have increased since order creation. Users editing orders won't see the fees they're about to pay unless they also enable TP/SL.

Fix in Cursor Fix in Web

setIsTpSlEnabled(false);
setTpPriceInputValue("");
setSlPriceInputValue("");
}, [p.order.key, setIsTpSlEnabled, setSlPriceInputValue, setTpPriceInputValue]);
Copy link

Choose a reason for hiding this comment

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

Duplicate effect resets TP/SL state twice on order change

Low Severity

Two effects reset the same TP/SL state (setIsTpSlEnabled, setTpPriceInputValue, setSlPriceInputValue) when the order key changes. One is in useOrderEditorTPSL hook and another in OrderEditor.tsx, both calling the same setters from the hook. This duplication causes unnecessary double state resets and makes the code harder to maintain.

Additional Locations (1)

Fix in Cursor Fix in Web

const { fees, executionFee } = useSelector(selectPositionSellerFees);

const triggerPrice = useSelector(selectPositionSellerTriggerPrice);

Copy link

Choose a reason for hiding this comment

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

TWAP acceptable price impact always shows NA after trigger removal

Medium Severity

The AcceptablePriceImpactInputRow condition notAvailable={!triggerPriceInputValue || isStopLoss || !decreaseAmounts} causes the row to always display "NA" for TWAP orders. Since the trigger price input UI was removed from PositionSeller, triggerPriceInputValue is always empty, making !triggerPriceInputValue always true. Users with isSetAcceptablePriceImpactEnabled enabled cannot customize acceptable price impact for TWAP orders even though the UI attempts to show this option.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants