Skip to content

feat: Clean up Rewards pages and add metrics#27952

Merged
Montoya merged 13 commits into
mainfrom
rewards-views-cleanup
Mar 26, 2026
Merged

feat: Clean up Rewards pages and add metrics#27952
Montoya merged 13 commits into
mainfrom
rewards-views-cleanup

Conversation

@Montoya

@Montoya Montoya commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Description

This PR hides a date field on campaign cards and makes a disclaimer smaller and more brief within the Rewards tab. It also adds metrics for mUSD buttons in the mUSD view.

Changelog

CHANGELOG entry: null

Related issues

Fixes: n/a

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 - iPhone 16e - 2026-03-25 at 18 05 28 Simulator Screenshot - iPhone 16e - 2026-03-25 at 18 05 24

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

Low Risk
Low risk UI/UX adjustments plus new analytics events for mUSD actions; main risk is minor layout/regression around campaign tiles and metrics event wiring.

Overview
Rewards campaign tiles: Removes the top "date" row content from CampaignTile (keeps the campaign-tile-date-label container as an empty placeholder) and updates the tile test to no longer assert specific date text.

mUSD calculator tab: Shortens and visually de-emphasizes the disclaimer (new rewards.musd.disclaimer_brief string, smaller text variant) and adds MetaMetrics tracking for the Buy and Swap buttons using REWARDS_PAGE_BUTTON_CLICKED with button_type values buy_musd/swap_to_musd (new RewardsMetricsButtons enum entries), with tests updated accordingly.

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

@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.

@Montoya Montoya added size-XS team-rewards Rewards team release-7.72.0 Issue or pull request that will be included in release 7.72.0 labels Mar 25, 2026
@github-actions github-actions Bot added size-S and removed size-XS labels Mar 25, 2026
@Montoya Montoya marked this pull request as ready for review March 25, 2026 22:36
@Montoya Montoya requested a review from a team as a code owner March 25, 2026 22:37
Comment thread app/components/UI/Rewards/components/Campaigns/CampaignTile.tsx
@github-actions

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
17 value mismatches detected (expected — fixture represents an existing user).
View details

@github-actions github-actions Bot added the risk-low Low testing needed · Low bug introduction risk label Mar 25, 2026
Comment thread app/components/UI/Rewards/components/Campaigns/CampaignTile.tsx
@Montoya Montoya enabled auto-merge March 26, 2026 01:23
@github-actions github-actions Bot added risk-low Low testing needed · Low bug introduction risk and removed risk-low Low testing needed · Low bug introduction risk labels Mar 26, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

expect(getByTestId('campaign-tile-date-label')).toHaveTextContent(
'Ends Mar 15, 2:30 PM',
);
expect(getByTestId('campaign-tile-date-label')).toBeDefined();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Weak toBeDefined() assertion replaces meaningful text check

Low Severity

The updated test uses toBeDefined() to assert element presence, which is a no-op since getByTestId throws if the element is not found — toBeDefined() can never fail here. The unit testing guidelines explicitly require toBeOnTheScreen() instead of toBeDefined() for element assertions, as toBeDefined() is a weak matcher that doesn't properly verify render state.

Fix in Cursor Fix in Web

Triggered by project rule: Unit Testing Guidelines

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is acceptable. The element is empty for now.

@Montoya Montoya changed the title feat: Rewards views cleanup feat: Clean up Rewards pages and add metrics Mar 26, 2026
@github-actions github-actions Bot added risk-low Low testing needed · Low bug introduction risk and removed risk-low Low testing needed · Low bug introduction risk labels Mar 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The changes are entirely isolated to the Rewards UI component area with no existing E2E test coverage:

  1. CampaignTile.tsx: Minor UI change - commented out date label icon and text from campaign tile header (cosmetic, no logic change)
  2. MusdCalculatorTab.tsx: Added analytics tracking for "Buy mUSD" and "Swap to mUSD" buttons, and updated disclaimer text to a shorter version using a new localization key
  3. utils.ts: Added two new enum values (BUY_MUSD, SWAP_TO_MUSD) to RewardsMetricsButtons - purely additive
  4. en.json: Added a new localization string disclaimer_brief - additive, non-breaking
  5. Test files: Unit test updates only

No E2E tests exist for the Rewards/Campaigns/mUSD features (confirmed by searching e2e/ directory). The changes don't touch any shared infrastructure, navigation, controllers, or components used by other E2E test flows. The analytics additions are purely additive. No performance-sensitive code paths are modified. Risk is low - these are isolated UI/analytics changes with no cross-cutting impact.

Performance Test Selection:
No performance-sensitive code paths are modified. Changes are limited to UI component rendering (removing a small UI element, adding analytics event calls) and localization strings. No list rendering, data loading, state management, or critical user flow performance is impacted.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@Montoya Montoya added this pull request to the merge queue Mar 26, 2026
Merged via the queue into main with commit ec3d218 Mar 26, 2026
70 checks passed
@Montoya Montoya deleted the rewards-views-cleanup branch March 26, 2026 09:10
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.72.0 Issue or pull request that will be included in release 7.72.0 risk-low Low testing needed · Low bug introduction risk size-S team-rewards Rewards team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants