Skip to content

chore: market insights, adds filled state and persist ability to the feedback buttons#27849

Merged
zone-live merged 3 commits into
mainfrom
TSA-298-market-insights-persist-feedback-state
Mar 26, 2026
Merged

chore: market insights, adds filled state and persist ability to the feedback buttons#27849
zone-live merged 3 commits into
mainfrom
TSA-298-market-insights-persist-feedback-state

Conversation

@zone-live

@zone-live zone-live commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

Description

The Market Insights thumbs up/down feedback buttons previously didn't give a clear indication that they were selected, meaning the icons always appeared as outlines. To improve this we added the filled state and persist it until a new digest comes or the app is killed.

  • Swaps the outline icon for the filled variant after the user gives feedback, to highlight the selected button
  • For thumbs down, the filled state is only applied after the user submits their reason (not when the sheet opens)
  • Both buttons remain tappable, since the user can switch their vote, which fires a new analytics event and updates the filled state
  • Feedback state is stored in a simple but persisted Map keyed by report.generatedAt, so that it survives navigating out of the view (component unmount/remount) but resets when a new digest arrives (new generatedAt)... or the app restarts.
Simulator Screenshot - iPhone 17 Pro - 2026-03-24 at 10 17 33

Changelog

CHANGELOG entry: null

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

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-state change: adds local in-memory caching of feedback selection keyed by report.generatedAt and updates icon rendering; no sensitive data or auth flows touched.

Overview
Market Insights feedback buttons now show a filled thumbs up/down icon after the user submits feedback, and that selection is persisted across MarketInsightsView unmount/remount for the same digest via an in-module Map keyed by report.generatedAt.

The view resets the filled state when a new digest arrives, and tests were expanded to cover filled-state rendering, switching votes, dismissing the thumbs-down sheet without submitting, and persistence/reset behavior. Separately, the repo-skill-authoring doc fixes markdown code-fence formatting in the minimal examples.

Written by Cursor Bugbot for commit 51641f1. 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.

@metamaskbot metamaskbot added the team-social-ai Social & AI team label Mar 24, 2026
@github-actions github-actions Bot added size-M risk-low Low testing needed · Low bug introduction risk labels Mar 24, 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 2 potential issues.

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.

@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 24, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.51%. Comparing base (c56e9d0) to head (2dc3bf3).
⚠️ Report is 27 commits behind head on main.

Files with missing lines Patch % Lines
...ts/Views/MarketInsightsView/MarketInsightsView.tsx 88.23% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #27849      +/-   ##
==========================================
+ Coverage   82.46%   82.51%   +0.05%     
==========================================
  Files        4801     4804       +3     
  Lines      123807   123956     +149     
  Branches    27602    27633      +31     
==========================================
+ Hits       102101   102286     +185     
+ Misses      14634    14605      -29     
+ Partials     7072     7065       -7     

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

@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 limited to the MarketInsightsView component, adding feedback state persistence (thumbs up/down filled icon state) using a module-level Map keyed by report digest. This is a purely cosmetic UI enhancement with no impact on:

  • Navigation or shared components
  • Controllers or Engine
  • Transaction/confirmation flows
  • Account management
  • Network management
  • Any other feature area covered by E2E tags

No E2E tests exist for MarketInsights functionality (confirmed by searching for e2e/spec files). The unit test file adds coverage for the new behavior. The .agents/skills/SKILL.md change is documentation only. There is no risk to existing E2E test flows from these changes.

Performance Test Selection:
The changes are limited to icon state management (filled vs unfilled thumbs icons) using a simple Map lookup. No rendering performance impact, no list rendering changes, no data loading changes, no state management changes that would affect performance metrics.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@zone-live zone-live added this pull request to the merge queue Mar 26, 2026
Merged via the queue into main with commit 99ac87f Mar 26, 2026
62 checks passed
@zone-live zone-live deleted the TSA-298-market-insights-persist-feedback-state branch March 26, 2026 10:40
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 26, 2026
@metamaskbot metamaskbot added the release-7.72.0 Issue or pull request that will be included in release 7.72.0 label 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-M team-social-ai Social & AI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants