Premium Analytics: add Stats app dashboard module settings endpoint - #49888
Conversation
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
|
@claude please review this PR. |
|
Claude finished @kangzj's task in 1m 26s —— View job Code Review: Stats app dashboard module settings endpoint
This is a clean, small wiring PR that follows the foundation's patterns well. The query/hook/export plumbing matches the surrounding endpoints, the changelog entry is present, and the exports test is updated for both new hooks. A few observations, none blocking: 1. Query-key drift between the query and its invalidation (maintainability nit)
queryKey: [ 'stats-app', 'dashboard-module-settings' ]The query factory produces a key of 2. Mutation body typed as
|
7397898 to
2984f9c
Compare
|
Claude finished @kangzj's task in 41s —— View job Re-review: Stats app dashboard module settings endpoint
Rebase looks clean — the diff against the now-clean foundation (#49886) is identical to what I reviewed before (58 additions, 7 files, no drift introduced by the rebase). The query factory, hook, mutation, and export wiring still match the surrounding endpoints, and the exports test is updated for both new hooks. Carry-over note (optional, non-blocking)The one item still worth tightening is the duplicated
This works today via TanStack's prefix matching ( The other two prior notes remain foundation-level decisions, fine to defer:
Looks correct
Verdict: Still looks good to merge. Rebase introduced no regressions; the query-key dedup (#1) is the only item I'd consider tightening, and it's optional. |
|
Addressing claude[bot]'s re-review (comment #4787361272): shared the dashboard module-settings query name/version/endpoint constants between read and mutation code, and switched mutation invalidation to |
|
@claude please re-review.\n\n |
|
Claude finished @kangzj's task in 56s —— View job Re-review: Stats app dashboard module settings endpoint
The carry-over item from the last review is fully resolved. ✅ Query-key drift fixed
export const STATS_APP_DASHBOARD_MODULE_SETTINGS_NAME = 'dashboard-module-settings';
export const STATS_APP_DASHBOARD_MODULE_SETTINGS_VERSION = '2';
export const STATS_APP_DASHBOARD_MODULE_SETTINGS_ENDPOINT = 'jetpack-stats-dashboard/module-settings';The mutation ( I confirmed the prefix-match still holds: the factory builds Also good: the mutation now uses Remaining notes (optional, foundation-level — fine to defer)
Looks correct
Verdict: |
2323ba8 to
1ee00c8
Compare
1ee00c8 to
3a8e313
Compare
Fixes #
Proposed changes
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