Skip to content

chore: use overview generatedAt for card timestamp#30461

Merged
joaosantos15 merged 3 commits into
mainfrom
TSA-whats-happening-generated-date
May 20, 2026
Merged

chore: use overview generatedAt for card timestamp#30461
joaosantos15 merged 3 commits into
mainfrom
TSA-whats-happening-generated-date

Conversation

@zone-live

@zone-live zone-live commented May 20, 2026

Copy link
Copy Markdown
Contributor

Description

The "What's Happening" carousel cards were showing article publish dates instead of a "generated" timestamp. The AI digest's overview.generatedAt is a full ISO timestamp (2026-05-20T16:00:03.275Z) that accurately reflects when the content was last generated, giving users a consistent and correct relative time across all cards.

Simulator Screenshot - iPhone 16e - 2026-05-20 at 17 10 45

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

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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: small, localized change to UI data mapping that only affects the displayed timestamp for carousel items, with tests updated to match.

Overview
Updates the useWhatsHappening hook so carousel item timestamps always use the market overview’s generatedAt value instead of per-article publish dates.

Adjusts unit tests to assert the new timestamp behavior (and updates mock article date data accordingly).

Reviewed by Cursor Bugbot for commit 312181f. Bugbot is set up for automated code reviews on this repo. Configure here.

@zone-live zone-live requested a review from a team as a code owner May 20, 2026 16:12
@github-actions github-actions Bot added the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 20, 2026
@metamaskbotv2 metamaskbotv2 Bot added the team-social-ai Social & AI team label May 20, 2026
@zone-live zone-live removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 20, 2026
@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.

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

Reviewed by Cursor Bugbot for commit 467932c. Configure here.

Comment thread app/components/UI/WhatsHappening/hooks/useWhatsHappening.test.ts
@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 PR contains only 2 changed files, both within the WhatsHappening feature:

  1. useWhatsHappening.ts: A single-line change in mapTrendsToItems - removes the article-date-first logic (trend.articles[0]?.date ?? overview.generatedAt) and always uses overview.generatedAt for the date field. This is a minor display logic simplification.

  2. useWhatsHappening.test.ts: Updates unit tests to match the new behavior - replaces two tests (article date and fallback) with a single test confirming generatedAt is always used.

Why no E2E tags are needed:

  • The change is isolated to a single hook within the WhatsHappening/Trending feature
  • It only affects how a date field is populated in trend card items (cosmetic display change)
  • No E2E tests validate this specific date field behavior
  • No shared components (navigation, modals, confirmations, controllers) are affected
  • The WhatsHappening component is part of SmokeWalletPlatform's Trending tab, but this change is too minor and internal to warrant running the full SmokeWalletPlatform suite
  • The unit tests in the PR adequately cover the behavioral change
  • No user flows are broken or altered - users still see the same trend cards, just with a slightly different date source

Performance: No performance impact - this is a simple field assignment change with no rendering, data loading, or state management implications.

Performance Test Selection:
The change is a single-line simplification of date field assignment in a hook. No rendering performance, data loading, list rendering, or state management changes are involved. No performance tests are warranted.

View GitHub Actions results

@joaosantos15 joaosantos15 enabled auto-merge May 20, 2026 16:36
@sonarqubecloud

Copy link
Copy Markdown

@joaosantos15 joaosantos15 added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit 51dc725 May 20, 2026
69 of 89 checks passed
@joaosantos15 joaosantos15 deleted the TSA-whats-happening-generated-date branch May 20, 2026 17:11
@github-actions github-actions Bot locked and limited conversation to collaborators May 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size-S team-social-ai Social & AI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants