Skip to content

CMM-2200: Open new stats from the My Site stats card - #23174

Draft
nbradbury wants to merge 4 commits into
trunkfrom
issue/CMM-2200-my-site-new-stats
Draft

CMM-2200: Open new stats from the My Site stats card#23174
nbradbury wants to merge 4 commits into
trunkfrom
issue/CMM-2200-my-site-new-stats

Conversation

@nbradbury

@nbradbury nbradbury commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

Tapping the Today's Stats card on My Site opened the old Stats screen even when New Stats was enabled. \

Testing instructions

  • Open stats and confirm new stats are enabled
  • Return to "My Site" and tap Today's Stats
  • Verify New Stats opens on the Traffic tab with the period selector reading Today

Injected period does not clobber the saved one:

  • In New Stats, change the period to e.g. Last 30 days, then go back.
  • Open Stats from the Stats menu row.
  • Verify it restores Last 30 days
  • Go back and tap the Today's Stats card.
  • Verify It opens on Today again

The new stats gate lived only in ListItemActionHandler, so the Today's
Stats card always opened legacy stats. Extract the gate into
NewStatsFeatureUtils and apply it to the card and the post-login path.
@nbradbury nbradbury added the Stats label Aug 4, 2026
@dangermattic

Copy link
Copy Markdown
Collaborator
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

The class under test is a single boolean OR with no branching logic, and
the routing it feeds is already covered at both call sites.
@wpmobilebot

wpmobilebot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in WordPress Android by scanning the QR code below to install the corresponding build.

App NameWordPress Android
Build TypeDebug
Versionpr23174-b85d95f
Build Number1498
Application IDorg.wordpress.android.prealpha
Commitb85d95f
Installation URL6fcdga0bfcsog
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in Jetpack Android by scanning the QR code below to install the corresponding build.

App NameJetpack Android
Build TypeDebug
Versionpr23174-b85d95f
Build Number1498
Application IDcom.jetpack.android.prealpha
Commitb85d95f
Installation URL4o4ip1imgjvlo
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

This comment was marked as resolved.

nbradbury and others added 2 commits August 4, 2026 11:26
The lint baseline covers exactly five DoNotMockDataClass hits in this
file, so the three added mocks failed lint. These tests only exercise
the click callbacks, so the nullable model can just be null.
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 54.54545% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.84%. Comparing base (6d9ff29) to head (b85d95f).
⚠️ Report is 2 commits behind head on trunk.

Files with missing lines Patch % Lines
...dpress/android/ui/newstats/NewStatsFeatureUtils.kt 0.00% 4 Missing ⚠️
...ui/stats/refresh/lists/widget/utils/WidgetUtils.kt 0.00% 3 Missing ⚠️
...org/wordpress/android/ui/mysite/MySiteViewModel.kt 50.00% 1 Missing and 1 partial ⚠️
...dashboard/todaysstats/TodaysStatsViewModelSlice.kt 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #23174   +/-   ##
=======================================
  Coverage   37.84%   37.84%           
=======================================
  Files        2345     2346    +1     
  Lines      127530   127538    +8     
  Branches    17716    17718    +2     
=======================================
+ Hits        48258    48264    +6     
- Misses      75313    75315    +2     
  Partials     3959     3959           

☔ View full report in Codecov by Harness.
📢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants