Skip to content

Premium Analytics: add Stats archives endpoint - #49895

Merged
kangzj merged 3 commits into
trunkfrom
endpoint/stats-archives-endpoint
Jun 24, 2026
Merged

Premium Analytics: add Stats archives endpoint#49895
kangzj merged 3 commits into
trunkfrom
endpoint/stats-archives-endpoint

Conversation

@kangzj

@kangzj kangzj commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #

Proposed changes

  • Add the Stats archives endpoint query/hook/export wiring.
  • Keep endpoint-owned processing, sanitizer, fixtures, and tests in this PR where this endpoint introduces them.
  • Build on the shared foundation from Premium Analytics: add Stats endpoint foundation #49886, now merged to trunk.

Related product discussion/links

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

No. This adds client-side wrappers and normalization for existing Stats API responses.

Testing instructions

  • Run pnpm --dir projects/packages/premium-analytics typecheck.
  • For endpoints with processing changes, run pnpm --dir projects/packages/premium-analytics test --runInBand.
  • Build coverage was checked on the foundation plus representative resource/app endpoint branches with pnpm --dir projects/packages/premium-analytics build.

Fixture coverage note

The local fixture covers the days-bucket response shape used by the archives normalizer. The summary-path behavior is typed and normalized conservatively, but there was no original endpoint fixture available to mirror that response shape in this PR.

@kangzj
kangzj requested review from a team as code owners June 24, 2026 07:55
@kangzj kangzj added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Stats Data Feature that enables users to track their site's traffic and gain insights on popular content. [Status] Needs Team Review Obsolete. Use Needs Review instead. [Package] Premium Analytics labels Jun 24, 2026
@kangzj kangzj self-assigned this Jun 24, 2026
@jp-launch-control

jp-launch-control Bot commented Jun 24, 2026

Copy link
Copy Markdown

Code Coverage Summary

No summary data is available for parent commit 189c92f, so cannot calculate coverage changes. 😴

If that commit is a feature branch rather than a trunk commit, this is expected. Otherwise, this should be updated once coverage for 189c92f is available.

Full summary · PHP report

@kangzj

This comment has been minimized.

@claude

This comment has been minimized.

@github-actions

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!

@kangzj
kangzj force-pushed the endpoint/stats-archives-endpoint branch from 2d8bc84 to cb5ed7c Compare June 24, 2026 08:26
@kangzj

This comment has been minimized.

@claude

This comment has been minimized.

@kangzj

kangzj commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Review-cycle summary — cb5ed7c085f2 → cb5ed7c085f2

1 audit round; no code changes; no actionable blocking feedback remains.

Audit details

Branch: endpoint/stats-archives-endpoint

Base: endpoint/stats-endpoint-foundation

Commits added during this audit: None.

Review feedback: Latest invited-reviewer notes are explicitly non-blocking; no inline review threads are open.

Checks: gh pr checks --required reports no required checks for this branch. The full check rollup has no failures; non-required code coverage and gardening statuses are still pending.

Unaddressed human comments: None.

Base automatically changed from endpoint/stats-endpoint-foundation to trunk June 24, 2026 21:33
@kangzj
kangzj force-pushed the endpoint/stats-archives-endpoint branch 2 times, most recently from d24a771 to 14cf85b Compare June 24, 2026 22:44
@kangzj
kangzj force-pushed the endpoint/stats-archives-endpoint branch from 826ac1e to 7c58755 Compare June 24, 2026 23:37
@kangzj
kangzj merged commit 3ea1a36 into trunk Jun 24, 2026
70 of 72 checks passed
@kangzj
kangzj deleted the endpoint/stats-archives-endpoint branch June 24, 2026 23:44
@github-actions github-actions Bot removed the [Status] Needs Team Review Obsolete. Use Needs Review instead. label Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Stats Data Feature that enables users to track their site's traffic and gain insights on popular content. [Package] Premium Analytics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant