Skip to content

Premium Analytics: Show report load errors in a notice - #53141

Merged
chihsuan merged 2 commits into
trunkfrom
change/uni-846-report-error-notice
Oct 5, 2026
Merged

chihsuan merged 2 commits into
trunkfrom
change/uni-846-report-error-notice

Conversation

@chihsuan

@chihsuan chihsuan commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Fixes UNI-846

Proposed changes

  • Show a report's load error in the notice the detail pages use, spanning the report instead of sitting at the left edge of the card.
  • Stop offering Retry on reports when access is denied, as the detail pages and cards already do.
  • Show access denied as an error notice on reports and on author, post, and video details, matching the cards. The detail pages have shown it as an info notice since Premium Analytics: Show detail page errors in a notice #53086.

The report message now names the report ("We couldn't load locations. Please try again in a moment.") instead of a heading over a generic line. The detail page notice moved into the widgets toolkit as one shared notice, and the old report error state is removed.

Related product discussion/links

Does this pull request change what data or activity we track or use?

No.

Testing instructions

Setup

  1. Use a connected site with Stats v2 (Premium Analytics) and some location data.
  2. Build this branch: jp build plugins/jetpack --deps.

Load failures

  1. Go to Stats v2 and open Top locations > View all, then the Regions tab.
  2. In the browser's developer tools, block requests whose URL contains location-views/region and reload. Confirm a red notice spans the report and reads "We couldn't load locations. Please try again in a moment." with a Retry button.
  3. Unblock the request and click Retry. Confirm the table loads.
  4. Repeat on a report without tabs, such as Tags & categories (block stats/tags). Confirm the same notice, naming tags and categories.

Access denied

  1. On a site without paid Stats, open the Regions tab, which answers 403. Confirm a red notice reads "You don't have access to this data." with no Retry.
  2. Make an author, post, or video details page answer 403, for example with the mu-plugin from Premium Analytics: Show detail page errors in a notice #53086 and fake_detail_err=403. Confirm the same red notice with no Retry.

Screenshots

The Regions report with its request blocked.

Before After
Before After

Replace the report error state with the notice the detail pages use, so the
message spans the report instead of sitting at the card's left edge. Report
records now pass their error through, so access denied drops Retry there too.
Access denied is an error notice on every page, matching the widgets.
@chihsuan chihsuan added the [Status] Needs Review This PR is ready for review. label Oct 5, 2026
@chihsuan chihsuan self-assigned this Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack or WordPress.com Site Helper), and enable the change/uni-846-report-error-notice branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack change/uni-846-report-error-notice

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: October 6, 2026

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Wpcomsh plugin:

  • Next scheduled release: Atomic deploys happen twice daily on weekdays (p9o2xV-2EN-p2)

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Premium Analytics plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@jp-launch-control

jp-launch-control Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Code Coverage Summary

2 files are newly checked for coverage.

File Coverage
projects/packages/premium-analytics/packages/widgets-toolkit/src/components/page-notice/page-notice.tsx 2/2 (100.00%) 💚
projects/packages/premium-analytics/packages/widgets-toolkit/src/components/page-notice/index.ts 0/0 (—%) 🤷

Full summary · PHP report · JS report

…lt intent

Update six report page tests still asserting the removed 'Unable to load' titles, add a PageNotice test for its assertive default, drop redundant mock assertions, state the intent rule instead of its history, and split the changelog entry into two sentences.
@chihsuan
chihsuan marked this pull request as ready for review October 5, 2026 07:13
@chihsuan
chihsuan requested a review from a team as a code owner October 5, 2026 07:13

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

Thanks @chihsuan, this tested well and code looks good! Tested on a local Docker site, blocking the Regions and Tags requests shows the new notice across the report with Retry, Retry loads the table again once unblocked, and a 403 on Regions shows the error notice without Retry. Nice to see the two error components folded into one PageNotice too.

LGTM 🚀

@chihsuan
chihsuan merged commit d73a37e into trunk Oct 5, 2026
83 checks passed
@chihsuan
chihsuan deleted the change/uni-846-report-error-notice branch October 5, 2026 09:09
@github-actions github-actions Bot added [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. and removed [Status] In Progress [Status] Needs Review This PR is ready for review. labels Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Premium Analytics [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Premium Analytics [Plugin] Wpcomsh [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants