You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature: my feature nameScenario: user [verb for user action]Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
I've completed the PR template to the best of my ability
I've included tests if applicable
I've documented my code using JSDoc format if applicable
I've applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
Pre-merge reviewer checklist
I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
Note
Medium Risk
Changes the decision logic for when the Perps stop-loss prompt banner appears by removing time-based ROE debouncing, which can alter user-facing risk prompts and their timing across markets.
Overview
Simplifies useStopLossPrompt so the stop_loss banner shows as soon as ROE breaches the threshold after the minimum position age is met, removing the previous 60s ROE debounce behavior.
Updates position-age handling to allow positionOpenedTimestamp (order fills) to immediately satisfy the age requirement when the position is already old enough, and removes the unused RoeDebounceMs config plus associated unit tests/expectations.
Written by Cursor Bugbot for commit 32d3e84. This will update automatically on new commits. Configure here.
E2E Test Selection:
The changes are isolated to the Perps feature (PerpsMarketDetailsView, perpsConfig constants, and useStopLossPrompt hook with associated test). These directly impact the perpetuals trading UI and related logic. Since SmokePerps validates core Perps flows (including Add Funds and balance updates), it must run to ensure no regression in trading flows. Per the tag dependency rules, selecting SmokePerps requires also selecting SmokeWalletPlatform (Perps section is embedded in Trending and platform activity views) and SmokeConfirmations (Add Funds deposits are on-chain transactions requiring confirmations). No changes were made to controllers, Engine, network stack, swaps, accounts, identity, ramps, snaps, or multi-chain APIs, so other tags are not required. Risk is medium because this affects user-facing trading UI and trading logic but is scoped to a single feature area.
Performance Test Selection:
Changes modify the Perps market details view and related hook logic, which can affect rendering behavior and interaction responsiveness within the Perps trading interface. Running @PerformancePreps ensures no regression in market loading, add funds flow, or perps screen responsiveness.
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
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
Simplifying debounce logic to allow the stop loss banner to be shown predictably.
Changelog
CHANGELOG entry: fix stop loss banner rendering issue
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2323
Manual testing steps
Screenshots/Recordings
Screen.Recording.2026-03-12.at.3.40.10.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes the decision logic for when the Perps stop-loss prompt banner appears by removing time-based ROE debouncing, which can alter user-facing risk prompts and their timing across markets.
Overview
Simplifies
useStopLossPromptso thestop_lossbanner shows as soon as ROE breaches the threshold after the minimum position age is met, removing the previous 60s ROE debounce behavior.Updates position-age handling to allow
positionOpenedTimestamp(order fills) to immediately satisfy the age requirement when the position is already old enough, and removes the unusedRoeDebounceMsconfig plus associated unit tests/expectations.Written by Cursor Bugbot for commit 32d3e84. This will update automatically on new commits. Configure here.