refactor: merge new and recently added lists, add new pill to products#33302
refactor: merge new and recently added lists, add new pill to products#33302gambinish wants to merge 2 commits into
Conversation
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
🧪 Flaky unit test detectionRun history flaky detectionHistorical failure rate is a hint, not proof — review each suggestion in context. See the flaky-test-detection skill for the full pattern reference and manual audit workflow. Failures / runs sampled per window:
AI-detected flaky patterns
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
SmokePerps: Directly impacted - Perps market category filtering, "New" badge/pill visibility, and market list view filtering are all changed. The core logic for what constitutes a "new" market has changed from a boolean flag to a time-based calculation. SmokeWalletPlatform: Per tag description, "changes to Perps views (headers, lists, full views, e.g. PerpsHomeView, PerpsMarketListView) affect Trending." The PerpsProducts component (home pills) and PerpsMarketListView hook are both changed. SmokeConfirmations: Per SmokePerps tag description, "Add Funds deposits are on-chain transactions - when selecting SmokePerps, also select SmokeConfirmations." Test files (.test.tsx/.test.ts) are also changed but these are unit tests, not E2E smoke specs - they don't affect tag selection directly. Performance Test Selection: |
|
⚡ Performance Test Results
✅ All tests passed · 2 tests · 1 device 📱 Devices tested (1)Android: Google Pixel 8 Pro (v14.0) ✅ Passed Tests (2)
Branch: |



Description
The Perps home "Recently Added" rail and the market list "New" pill used two different definitions of "new", which caused discrepancies (e.g. CASHCAT showing on the home rail but not under the "New" tab):
listedAt)isNewMarket)This PR unifies both surfaces on the same "listed within the last 30 days" rule and surfaces "New" more prominently on the home page.
Changes
isRecentlyListed(listedAt)helper inutils/time.tsso the home rail, the market-list filter, and the badge all use one definition.'new'filter and thenewmarket count inusePerpsMarketListView, and the badge visibility inuseHasNewMarkets, fromisNewMarketto the 30-daylistedAtrule.Out of scope
isNewMarketsemantics are untouched — mobile just stops filtering on it.Changelog
CHANGELOG entry: merge recently added and new filter logic for perps markets
CHANGELOG entry: add "new" pill to perps products
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Screen.Recording.2026-07-14.at.3.01.02.PM.mov
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Changes user-visible market filtering and pill visibility across several Perps surfaces; logic is centralized but semantics shift away from
isNewMarket.Overview
Perps “New” is no longer driven by
isNewMarket; home, market list, and badges now shareisRecentlyListed(listedAt)(listed within the last 30 days).utils/time.tsadds that helper and wires it intouseHasNewMarkets, thenewfilter andmarketCounts.newinusePerpsMarketListView, and the home Recently added rail inusePerpsHomeData.NEW_CATEGORYis exported fromusePerpsCategoriesso category badges and products use the same id/label.PerpsProductsprepends a New pill when recent listings exist (viauseHasNewMarkets); tapping navigates to the market list withdefaultMarketTypeFilter: 'new'. Tests cover the new time-based behavior and product pill visibility/navigation.Reviewed by Cursor Bugbot for commit 15a95d5. Bugbot is set up for automated code reviews on this repo. Configure here.