Merged
Conversation
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Contributor
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/perps (27 files, +3232 -13)
|
Contributor
Builds ready [247aa15]
UI Startup Metrics (1335 ± 116 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
…-extension into perps/feat-order-entry
Contributor
Builds ready [e142363]
UI Startup Metrics (1492 ± 102 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Contributor
Builds ready [826ef41]
UI Startup Metrics (1353 ± 75 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
ui/components/app/perps/order-entry/components/leverage-slider/leverage-slider.test.tsx
Outdated
Show resolved
Hide resolved
…-extension into perps/feat-order-entry
Contributor
Builds ready [d9a8679]
UI Startup Metrics (1361 ± 85 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
geositta
approved these changes
Feb 4, 2026
abretonc7s
approved these changes
Feb 4, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Adds the order entry form for perpetuals trading. This is the static UI - no backend integration yet.
Changes:
Set values for new positions: Enter amount, set leverage (1-20x), optionally configure Take Profit / Stop Loss
Modify values for existing positions: Pre-fills current leverage and TP/SL settings
"Close positions": Supports partial closes (25%, 50%, 75%, 100%)
We may want to follow up with another "MockPerpsController" that does some of this state management more dynamically rather than just read from json files.
Changelog
CHANGELOG entry: Add static perps order entry behind ff
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2026-01-29.at.4.50.16.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Adds a sizeable new perps order-entry UI flow (including modify/close modes) and new state/calculation hook wired into the market detail page; while backend-free, it changes key user interactions and displayed trading calculations.
Overview
Adds a static Perps order entry form (no controller/backend wiring yet) supporting open, modify, and close flows, including amount entry with balance-percent presets, leverage selection, TP/SL “auto close”, and an order summary (margin/fees/liquidation estimates).
Integrates this flow into
perps-market-detail-pageby introducing a detail-vs-order view switch, a market/limit dropdown, and new sticky CTAs (Long/Short when no position; Modify/Close when a position exists), with form state managed via the newusePerpsOrderFormhook.Also adds a shared
PerpsSlider, updates perps i18n strings (new labels/buttons and changesperpsAvailableformatting), tightens mockmaxLeveragedefaults to 20x, improves number formatting in a few perps UIs, and introduces extensive unit tests plus baseline console updates.Written by Cursor Bugbot for commit d9a8679. This will update automatically on new commits. Configure here.