Repository navigation
Conversation
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/perps (4 files, +71 -1)
🧪 @MetaMask/qa (4 files, +66 -9)
|
Builds ready [df20e83] [reused from f1790c6]
⚡ Performance Benchmarks (Total: 🟢 0 pass · 🟡 0 warn · 🔴 1 fail)
Bundle size diffs
|
Builds ready [ea9ae88]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 14 warn · 🔴 2 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [7e8aea6] [reused from ea9ae88]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 14 warn · 🔴 2 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 974160b. Configure here.
| } from './mocks/websocketPositionMocks'; | ||
|
|
||
| describe('Perps Take Profit / Stop Loss', function (this: Suite) { | ||
| describe('Perps Take Profit / Stop Loss TEST', function (this: Suite) { |
There was a problem hiding this comment.
Accidental TEST in suite name
Medium Severity
The suite title was renamed to Perps Take Profit / Stop Loss TEST. That looks like a leftover from forcing the E2E quality gate rather than an intentional rename — the file header and PR title still use the original name.
Reviewed by Cursor Bugbot for commit 974160b. Configure here.
|
Builds ready [974160b]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 15 warn · 🔴 1 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [974160b]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 15 warn · 🔴 1 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [d995e63] [reused from bc18c5c]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 11 warn · 🔴 4 fail)
Bundle size diffs
|
| if (await activityPage.isAnyTransactionCardPresent()) { | ||
| return true; | ||
| } | ||
| pushUserFills(); |
There was a problem hiding this comment.
Re-push until the fill lands. A userFills snapshot both replaces the controller's fills cache and notifies live subscribers, but neither helps if it arrives while a view is mid-mount: the cache read happens once, and the live subscriber is not registered yet. The controller then answers perpsGetOrderFills from that initialized-but-empty cache without ever going to the wire, so nothing retries on its own. Pushing again once the view is up is delivered straight to the mounted subscriber. Snapshots replace rather than append, so repeating one is harmless.
Builds ready [5fa1a5b] [reused from d1029ef]
⚡ Performance Benchmarks (Total: 🟢 4 pass · 🟡 12 warn · 🔴 4 fail)
Bundle size diffs
|





Description
The test failed because Perps home rendered "Recent activity — No transactions yet" instead of the populated list.
The Perps close-fill E2E flow could only learn about the simulated fill from a single live WebSocket frame, which is dropped whenever no Perps view is mounted during the back-navigation to Perps home, and nothing recovered it afterwards because userFills POSTs fell through to a catch-all mock returning {} and home's Recent Activity reused a coalesced snapshot taken at startup, so "See All" never rendered and the test timed out.
Fixes:
See artifact:

Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
E2E test and mock-server changes only; no production app behavior is modified.
Overview
Addresses flaky Perps Take Profit / Stop Loss E2E where Activity never showed the simulated close fill because the test relied on a live
userFillsWebSocket frame and navigation through Perps home (empty/stale Recent Activity, no “See All”).The perps WS mock now records fills from
pushUserFillsClosePositionSnapshotand replies touserFillsinfo POSTs with that snapshot (shared across position mock bundles), withresetPushedUserFillson perps WSonCleanupso state does not leak between tests.assertPerpsActivityShowsCloseFilldrops the back-nav → home → “See All” path and opens Perps Activity directly viaPERPS_ACTIVITY_ROUTE, so the assertion uses a freshuserFillsfetch instead of racing the stream against home’s coalesced preview.The suite
describetitle was changed to appendTEST(likely accidental debug naming).Reviewed by Cursor Bugbot for commit 974160b. Bugbot is set up for automated code reviews on this repo. Configure here.