fix(perps): standardize long and short CTA colors - #36472
nikki-p-h-12 wants to merge 7 commits into
Conversation
Co-authored-by: nikki-p-h-12 <nikki-p-h-12@users.noreply.github.com>
Co-authored-by: nikki-p-h-12 <nikki-p-h-12@users.noreply.github.com>
Co-authored-by: nikki-p-h-12 <nikki-p-h-12@users.noreply.github.com>
Co-authored-by: nikki-p-h-12 <nikki-p-h-12@users.noreply.github.com>
|
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. |
|
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 ccdf10e. Configure here.
| testID={PerpsOrderViewSelectorsIDs.PLACE_ORDER_BUTTON} | ||
| > | ||
| {placeOrderLabel} | ||
| </PerpsDirectionButton> |
There was a problem hiding this comment.
Leftover order CTA still rendered
High Severity
PerpsDirectionButton was added as the place-order CTA, but the retired TAT-1937 branch is still below it. That leftover tree still reads buttonColorVariant and deleted BUTTON_COLOR_VARIANTS / PERPS_BUTTON_COLOR_AB_TEST_KEY exports, and it would render a second PLACE_ORDER_BUTTON.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit ccdf10e. Configure here.
Smart E2E Test SelectionSelected E2E tagsSmokePerps Selected Performance tags: @PerformancePreps AI Confidence: 88 E2E reasoningExpand to readThis PR removes the TAT-1937 A/B test (Long/Short Button Color Test) and introduces a new
The A/B test infrastructure changes (removing Performance reasoningExpand to readThe PR modifies the place-order button rendering in multiple Perps views (PerpsOrderView, PerpsOrderBookView, PerpsMarketDetailsView, PerpsProOrderForm, PerpsTradeScreen). The new PerpsDirectionButton replaces ButtonSemantic with a custom component. While the change is primarily cosmetic/behavioral (color hardcoding vs A/B test), the button is rendered in performance-sensitive Perps trading views. The @PerformancePreps tag covers perps market loading, position management, add funds flow, and order execution — all of which involve the modified button component. |
Co-authored-by: nikki-p-h-12 <nikki-p-h-12@users.noreply.github.com>
|
| Platform | Device | Reason | Recording |
|---|---|---|---|
| Android | Google Pixel 8 Pro (v14.0) | no_performance_metrics | 📹 Watch |
🔬 App profiling check · Current run 37206410727 · Baseline (last run on main (scenario also failing)) run 37144708353 @ 8eac44c
⚠️ No green baseline onmain— comparing against the latest usable profiling.
Summary:
ℹ️ API calls unavailable:
Network logs API error: Bad Request
Full metric table (+10% variance rules)
Disclaimer — allowed variance: a +10% margin over the baseline is permitted.
- If
Current <= Baseline + 10%, treated as acceptable noise.- If
Current > Baseline + 10%, Current and variance % are highlighted with⚠️ .
| Metric | Baseline | Current | Δ |
|---|---|---|---|
| CPU avg | 7.28% | 6.16% | -1.12 (-15.4%) |
| CPU max | 23.19% | 25.64% | +2.45 (+10.6%) |
| Memory avg | 785.88 MB | 765.78 MB | -20.1 (-2.6%) |
| Memory max | 1003.62 MB | 977.88 MB | -25.74 (-2.6%) |
| Slow frames | 7.19% | 11.54% | +4.35 (+60.5%) |
| Frozen frames | 0% | 0% | 0 (0%) |
| ANRs | 0 | 0 | 0 (0%) |
| Issues | 2 | 2 | 0 (0%) |
| Critical issues | 2 | 2 | 0 (0%) |
| App size | 403.41 MB | 403.28 MB | -0.13 (0%) |
✅ Passed Tests (1)
| Test | Platform | Device | Duration | Team | Recording |
|---|---|---|---|---|---|
| Perps add funds | Android | Google Pixel 8 Pro (v14.0) | 8.04s | @mm-perps-engineering-team | 📹 Watch |
Branch: cursor/fix-perps-cta-colors-7270 · Build: E2E · Commit: 1b51179 · View full run





Description
Standardizes the Perps directional trade actions so Long always uses
success/defaultwith asuccess/inverselabel and Short always useserror/defaultwith anerror/inverselabel, in both light and dark mode.Previously these CTAs were driven by the concluded TAT-1937 A/B test, which served either white buttons (
control) or pastel muted-tint buttons (colors). The pastel treatment is what was reported. The experiment is now retired so a remote assignment can no longer restore either incorrect treatment.Surfaces updated:
PerpsMarketDetailsView(Lite)PerpsOrderBookViewMarketInsightsView(Perps context)PerpsOrderViewPerpsTradeScreen(trade sheet)PerpsProOrderForm(Pro)A shared
PerpsDirectionButtonnow owns this mapping so the two colors are defined once instead of per screen.The Pro Long / Short direction selector is deliberately left as-is on
main(muted tint on the selected side). It is a segmented selector rather than a CTA, so it is out of scope for this change.Changelog
CHANGELOG entry: Fixed Long and Short button colors across Perps Lite and Pro experiences
Related issues
Refs: User-reported Perps Long/Short CTA color inconsistency
Manual testing steps
Screenshots/Recordings
Each surface is rendered from the real components with
react-native-webin headless Chromium, using the app's bundled Inter fonts, design-system icons, theme tokens, stylesheets, anden.jsoncopy.beforeismainwith the reported pastelcolorsvariant, andafteris this branch. The Pro order form is the actualPerpsProOrderFormcomponent rendered from bothmainand this branch, with its direction selector identical in both. Market data is static sample HYPE values because no live feed runs in the renderer.Perps market details (Lite)
Perps order book
Perps order view, Long and Short
Perps trade bottom sheet — fully rounded design-system pill corners
Market insights (Perps)
Perps Pro order form, Long and Short
Pre-merge author checklist
Performance checks (if applicable)
Pre-merge reviewer checklist