Skip to content

feat: rewards dropdown filter on activity tab#24910

Merged
VGR-GIT merged 8 commits into
mainfrom
RWDS-752-dropdown-filter-on-activity-tab
Jan 29, 2026
Merged

feat: rewards dropdown filter on activity tab#24910
VGR-GIT merged 8 commits into
mainfrom
RWDS-752-dropdown-filter-on-activity-tab

Conversation

@sophieqgu
Copy link
Copy Markdown
Contributor

@sophieqgu sophieqgu commented Jan 19, 2026

Description

Support filter by event types in the Activity Tab

Changelog

CHANGELOG entry: Support filter by event types in the Activity Tab

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Simulator Screenshot - E2E Test  - 2026-01-20 at 17 15 44 Simulator Screenshot - E2E Test  - 2026-01-20 at 17 15 39

Pre-merge author checklist

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
Medium risk because it changes the points-events fetching pipeline (new type query param, caching key changes, and request-cancellation logic), which could impact activity feed freshness/pagination if edge cases were missed.

Overview
Adds an Activity Tab dropdown filter that lets users fetch points activity by earn type, driven by season-provided activityTypes and new i18n strings.

Extends usePointsEvents and the rewards backend to support type-filtered points events: the hook now accepts type and enabled, cancels in-flight first-page/pagination requests when dependencies change, and the RewardsController/DataService include type in API requests and cache keys.

Updates SelectOptionSheet/OptionsSheet UI (design-system icon, sorted options with all pinned, new close header) and tweaks a few Rewards visuals (smaller icons, bonus text color), with substantial test/snapshot updates to cover filtering and new fetch behavior.

Written by Cursor Bugbot for commit 049b910. This will update automatically on new commits. Configure here.

@sophieqgu sophieqgu requested a review from a team as a code owner January 19, 2026 22:12
@github-actions
Copy link
Copy Markdown
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.

@metamaskbot metamaskbot added the team-rewards Rewards team label Jan 19, 2026
@sophieqgu sophieqgu changed the title Rwds 752 dropdown filter on activity tab feat: rewards dropdown filter on activity tab Jan 19, 2026
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

VGR-GIT
VGR-GIT previously approved these changes Jan 20, 2026
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@sophieqgu sophieqgu requested a review from a team as a code owner January 20, 2026 23:05
@sophieqgu sophieqgu force-pushed the RWDS-752-dropdown-filter-on-activity-tab branch from d680da5 to 879c842 Compare January 20, 2026 23:40
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Comment thread app/components/UI/Rewards/hooks/usePointsEvents.ts
Comment thread app/components/UI/Rewards/hooks/usePointsEvents.ts
@sophieqgu sophieqgu force-pushed the RWDS-752-dropdown-filter-on-activity-tab branch from e9d7fde to 2cbe01c Compare January 21, 2026 02:26
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 21, 2026

Codecov Report

❌ Patch coverage is 91.57895% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.06%. Comparing base (0f5817f) to head (d4f6cc0).
⚠️ Report is 160 commits behind head on main.

Files with missing lines Patch % Lines
app/components/UI/Rewards/hooks/usePointsEvents.ts 87.80% 2 Missing and 3 partials ⚠️
...p/components/UI/SelectOptionSheet/OptionsSheet.tsx 85.71% 0 Missing and 2 partials ⚠️
...ontrollers/rewards-controller/RewardsController.ts 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24910      +/-   ##
==========================================
+ Coverage   79.96%   80.06%   +0.09%     
==========================================
  Files        4257     4277      +20     
  Lines      109331   110146     +815     
  Branches    22889    23097     +208     
==========================================
+ Hits        87429    88189     +760     
+ Misses      15835    15821      -14     
- Partials     6067     6136      +69     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sophieqgu sophieqgu force-pushed the RWDS-752-dropdown-filter-on-activity-tab branch from 9c2c1b4 to 9058b4c Compare January 21, 2026 15:50
@georgewrmarshall georgewrmarshall removed the request for review from a team January 21, 2026 16:49
@sophieqgu sophieqgu force-pushed the RWDS-752-dropdown-filter-on-activity-tab branch from 9058b4c to aa53c24 Compare January 26, 2026 19:11
Comment thread app/core/Engine/controllers/rewards-controller/types.ts
Comment thread app/components/UI/Rewards/components/Tabs/ActivityTab/ActivityTab.tsx Outdated
@sophieqgu sophieqgu requested review from a team as code owners January 27, 2026 19:11
@sophieqgu sophieqgu requested review from a team and VGR-GIT and removed request for a team January 27, 2026 19:15
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@VGR-GIT
Copy link
Copy Markdown
Contributor

VGR-GIT commented Jan 28, 2026

@sophieqgu pushed a commit to solve an issue review bot had reported

sophieqgu and others added 8 commits January 28, 2026 15:07
Add test coverage

Fix bug

prettier issue fix

bugbot fix

f

Address comments and update design

Update OriginSpamModal.test.tsx.snap

Fix bug

Fix bug

Fix bug

Update NFTAutoDetectionModal.test.tsx.snap

Revert snapshot

Update index.test.tsx.snap

Update OptionSheet.test.tsx.snap
@sophieqgu sophieqgu force-pushed the RWDS-752-dropdown-filter-on-activity-tab branch from d4f6cc0 to 049b910 Compare January 28, 2026 20:08
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeRewards
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

E2E Test Selection:
This PR adds activity type filtering to the Rewards feature. The changes are primarily focused on:

  1. RewardsController (Critical): Added type-based caching for points events, allowing separate cache entries for different activity types (SWAP, PERPS, CARD, etc.). This is a controller change but isolated to the Rewards domain.

  2. Rewards UI Components: Added ActivityFilter component to ActivityTab, refactored usePointsEvents hook to support type filtering and enabled flag with request cancellation logic.

  3. SelectOptionSheet (Shared Component): Visual/styling updates and alphabetical sorting. This component is used by LedgerConnect and FeatureFlagOverride, but the changes are backward-compatible (same props interface, just visual improvements).

The SmokeRewards tag is the appropriate choice because:

  • All changes are within the Rewards domain (controller, UI components, hooks)
  • The tag description explicitly covers "Activity tab displaying reward-earning actions"
  • The changes add filtering capability to the activity events list

No other tags are needed because:

  • No transaction/confirmation flow changes (SmokeConfirmationsRedesigned not needed)
  • No account management changes (SmokeAccounts not needed)
  • No network/chain changes (SmokeNetworkAbstractions not needed)
  • No trading flow changes (SmokeTrade not needed)
  • The SelectOptionSheet changes are visual only and don't affect Ledger functionality in a breaking way

Note: The SmokeRewards tests are currently skipped pending rewards system stabilization, but selecting this tag ensures the tests will run when they are enabled.

Performance Test Selection:
No performance tests are needed for this PR. The changes are focused on adding filtering functionality to the Rewards activity tab, which involves:

  1. Cache key modifications in RewardsController - no impact on rendering performance
  2. UI filter component addition - simple dropdown, not a performance-critical component
  3. Hook refactoring for request cancellation - improves behavior but doesn't affect measured performance metrics

The changes don't affect:

  • Account list rendering (@PerformanceAccountList)
  • Onboarding flows (@PerformanceOnboarding)
  • Login/unlock (@PerformanceLogin)
  • Swap flows (@PerformanceSwaps)
  • App launch (@PerformanceLaunch)
  • Asset/balance loading (@PerformanceAssetLoading)
  • Predict markets (@PerformancePredict)
  • Perpetuals trading (@PerformancePreps)

The Rewards feature is a separate, isolated feature that doesn't have dedicated performance tests.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

@VGR-GIT VGR-GIT added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit 9d97e2f Jan 29, 2026
82 of 83 checks passed
@VGR-GIT VGR-GIT deleted the RWDS-752-dropdown-filter-on-activity-tab branch January 29, 2026 08:28
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 29, 2026
@metamaskbot metamaskbot added release-7.65.0 Issue or pull request that will be included in release 7.65.0 release-7.64.0 Issue or pull request that will be included in release 7.64.0 and removed release-7.65.0 Issue or pull request that will be included in release 7.65.0 labels Jan 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.64.0 Issue or pull request that will be included in release 7.64.0 size-XL team-rewards Rewards team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants