Skip to content

Premium Analytics: add Stats app publish state endpoint - #49894

Merged
kangzj merged 5 commits into
trunkfrom
endpoint/stats-app-site-published-state-endpoint
Jun 26, 2026
Merged

Premium Analytics: add Stats app publish state endpoint#49894
kangzj merged 5 commits into
trunkfrom
endpoint/stats-app-site-published-state-endpoint

Conversation

@kangzj

@kangzj kangzj commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #

Proposed changes

  • Add Premium Analytics data package support for the Stats app site published state signal.
  • Fetch the published-state boolean from the existing WordPress.com site-has-never-published-post endpoint through the Premium Analytics proxy.
  • Wire the query, hook, public exports, proxy-backed query test, and changelog entry.

Related product discussion/links

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

No. This only adds typed client data/query integration for an existing site-state signal.

Testing instructions

  • CI=true pnpm --dir projects/packages/premium-analytics test -- packages/data/src/queries/__tests__/stats-queries.test.ts packages/data/src/hooks/__tests__/stats-exports.test.ts --runInBand
  • CI=true jp test php packages/premium-analytics -v
  • CI=true pnpm --dir projects/packages/premium-analytics run typecheck
  • CI=true pnpm exec eslint --max-warnings=0 projects/packages/premium-analytics/packages/data/src/queries/stats-app-site-has-never-published-post-query.ts projects/packages/premium-analytics/packages/data/src/queries/__tests__/stats-queries.test.ts projects/packages/premium-analytics/packages/data/src/hooks/use-stats-app-site-has-never-published-post.ts projects/packages/premium-analytics/packages/data/src/hooks/index.ts projects/packages/premium-analytics/packages/data/src/index.ts projects/packages/premium-analytics/packages/data/src/queries/index.ts
  • git diff --check

@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 7db3be9, 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 7db3be9 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-app-site-published-state-endpoint branch from bcad8bd to fcbdf70 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 audit: clean. Latest Claude app re-review is non-blocking, there are no inline review threads, and GitHub reports no required checks for this branch. No code changes were needed; only non-required coverage/label checks remain pending.

Base automatically changed from endpoint/stats-endpoint-foundation to trunk June 24, 2026 21:33
@kangzj
kangzj force-pushed the endpoint/stats-app-site-published-state-endpoint branch 3 times, most recently from 3f03bd3 to ad18ea2 Compare June 25, 2026 00:55
@kangzj
kangzj marked this pull request as draft June 25, 2026 09:02
@kangzj
kangzj force-pushed the endpoint/stats-app-site-published-state-endpoint branch from 52c3056 to fd7b4d7 Compare June 25, 2026 09:09
@kangzj
kangzj force-pushed the endpoint/stats-app-site-published-state-endpoint branch from fd7b4d7 to bef50c9 Compare June 25, 2026 22:25
@kangzj
kangzj marked this pull request as ready for review June 25, 2026 22:36
@kangzj
kangzj force-pushed the endpoint/stats-app-site-published-state-endpoint branch from 6636b86 to 8ca23c3 Compare June 26, 2026 01:57
@kangzj
kangzj merged commit 6a4c939 into trunk Jun 26, 2026
71 of 72 checks passed
@kangzj
kangzj deleted the endpoint/stats-app-site-published-state-endpoint branch June 26, 2026 02:06
@github-actions github-actions Bot removed [Status] In Progress [Status] Needs Team Review Obsolete. Use Needs Review instead. labels Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs 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 [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant