Repository navigation
Conversation
Contributor
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Contributor
|
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! |
Code Coverage SummaryCoverage changed in 4 files.
|
enejb
marked this pull request as ready for review
November 16, 2026 18:04
enejb
force-pushed
the
update/forms-notes-hold-status
branch
from
November 25, 2026 18:45
db86dea to
3ea4874
Compare
…f wp-admin Comments
…vacy registration
enejb
force-pushed
the
update/forms-notes-hold-status
branch
from
November 27, 2026 21:51
3ea4874 to
9052ec1
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Response notes (behind the
jetpack_forms_notes_enablefilter, not released yet) are core comments on thefeedbackpost. This changes how they are stored and shown:holdstatus instead of being approved, and moderators no longer get a "comment awaiting moderation" email for them. Only people who can manage responses can leave notes, so a spam verdict from Akismet doesn't apply: notes stay held when they're created, and are put back on hold if Akismet's "Check for Spam" recheck marks them as spam.jetpack_form_note. Like core'snotetype, comment queries leave it out unless they ask for it, so notes no longer show up in wp-admin › Comments, its pending counts, the admin bar, or the Activity dashboard widget.all, so it keeps showing a note even if a moderator approves it.Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
Setup: a site with Jetpack Forms active and notes turned on. The second filter keeps test submissions out of spam, so new responses land in the inbox:
Rehearsals
Run these from Tools → Rehearsal on any JN site, in this order. The first one needs a published page at
/rehearsal-notes-form/containing a form with a Name field:The first rehearsal submits a response, adds a note, reopens the response to check the note is still there, then checks the note isn't listed in wp-admin Comments. The second one, run as an author, checks that the note from the first isn't in the comments the author can read through the REST API. The third adds a note, deletes it from the panel, and checks it isn't in the Trash. The fourth, run as an author after the first, checks that wp-admin Comments filtered to notes lists none of them.
Before this PR (Jetpack 16.5-a.5), the first fails at step 18, because the note shows up in wp-admin Comments, and the second fails at step 3. When Akismet marks the note as spam instead, the first one fails at step 15, because the note is gone after reopening the response. On the previous commit of this PR, which moved deleted notes to the Trash, a deleted note is listed in the Trash view the third one checks. The fourth fails at step 3 on that commit too.
Rehearsal: Forms: A note on a response stays in its notes panel and out of wp-admin Comments (changes the site)
Rehearsal
b22c260· 19 steps · coverspackages/formsLast run: Passed on WordPress 7.1.5 · Theme: Twenty Twenty-Four 1.6 · Akismet Anti-spam: Spam Protection 5.7.2 · Jetpack 16.5-a.5, run #19, 2026-11-27.
View or install this rehearsal · JSON · Playwright test (links work while freely-silky-stork.jurassic.ninja exists)
Rehearsal JSON
{ "format": 2, "requires": [ "jetpack" ], "covers": [ "packages/forms" ], "viewport": "desktop", "timeout": 30000, "steps": [ { "goto": "/rehearsal-notes-form/" }, { "expect": "form.contact-form button[type=submit]", "toBeVisible": true }, { "fill": "form.contact-form input[type=text]", "value": "Rehearsal {{run}}" }, { "click": "form.contact-form button[type=submit]" }, { "expectText": "Thank you for your response." }, { "goto": "/wp-admin/admin.php?page=jetpack-forms-responses-wp-admin&p=%2Fresponses%2Finbox" }, { "click": "[role=checkbox][aria-label=\"Rehearsal {{run}}\"]" }, { "expect": ".jp-forms__feedback-comments-heading", "toContainText": "Notes" }, { "fill": ".jp-forms__feedback-comments-form textarea", "value": "Rehearsal note {{run}}" }, { "click": ".jp-forms__feedback-comments-form button:has-text(\"Add note\")" }, { "expect": ".jp-forms__feedback-comments-list", "toContainText": "Rehearsal note {{run}}" }, { "goto": "/wp-admin/admin.php?page=jetpack-forms-responses-wp-admin&p=%2Fresponses%2Finbox" }, { "click": "[role=checkbox][aria-label=\"Rehearsal {{run}}\"]" }, { "expect": ".jp-forms__feedback-comments-heading", "toContainText": "Notes" }, { "expect": ".jp-forms__feedback-comments-list", "toContainText": "Rehearsal note {{run}}" }, { "goto": "/wp-admin/edit-comments.php?comment_status=all" }, { "expect": "h1", "toContainText": "Comments" }, { "expect": "#the-comment-list", "toContainText": "Rehearsal note {{run}}", "not": true }, { "expectNoConsoleErrors": true } ] }Rehearsal: Forms: Authors cannot read notes on responses
Rehearsal
b946f3b· 3 steps · coverspackages/formsLast run: Passed on WordPress 7.1.5 · Theme: Twenty Twenty-Four 1.6 · Akismet Anti-spam: Spam Protection 5.7.2 · Jetpack 16.5-a.5, run #20, 2026-11-27.
View or install this rehearsal · JSON · Playwright test (links work while freely-silky-stork.jurassic.ninja exists)
Rehearsal JSON
{ "format": 1, "requires": [ "jetpack" ], "covers": [ "packages/forms" ], "role": "author", "steps": [ { "goto": "/wp-json/wp/v2/comments?per_page=100" }, { "expect": "body", "toContainText": "\"author_name\"" }, { "expect": "body", "toContainText": "Rehearsal note", "not": true } ] }Rehearsal: Forms: Deleting a note from a response removes it for good (changes the site)
Rehearsal
4f7da57· 18 steps · coverspackages/formsLast run: Passed on WordPress 7.1.5 · Theme: Twenty Twenty-Four 1.6 · Akismet Anti-spam: Spam Protection 5.7.2 · Jetpack 16.5-a.5, run #26, 2026-11-27.
View or install this rehearsal · JSON · Playwright test (links work while freely-silky-stork.jurassic.ninja exists)
Rehearsal JSON
{ "format": 2, "requires": [ "jetpack" ], "covers": [ "packages/forms" ], "viewport": "desktop", "timeout": 30000, "steps": [ { "goto": "/rehearsal-notes-form/" }, { "expect": "form.contact-form button[type=submit]", "toBeVisible": true }, { "fill": "form.contact-form input[type=text]", "value": "Rehearsal {{run}}" }, { "click": "form.contact-form button[type=submit]" }, { "expectText": "Thank you for your response." }, { "goto": "/wp-admin/admin.php?page=jetpack-forms-responses-wp-admin&p=%2Fresponses%2Finbox" }, { "click": "[role=checkbox][aria-label=\"Rehearsal {{run}}\"]" }, { "expect": ".jp-forms__feedback-comments-heading", "toContainText": "Notes" }, { "fill": ".jp-forms__feedback-comments-form textarea", "value": "Rehearsal deleted note {{run}}" }, { "click": ".jp-forms__feedback-comments-form button:has-text(\"Add note\")" }, { "expect": ".jp-forms__feedback-comments-list", "toContainText": "Rehearsal deleted note {{run}}" }, { "click": ".jp-forms__feedback-comments-comment:has-text(\"Rehearsal deleted note {{run}}\") >> button[aria-label=\"Note options\"]" }, { "click": "[role=menuitem]:has-text(\"Delete\")" }, { "expect": ".jp-forms__feedback-comments", "toContainText": "Rehearsal deleted note {{run}}", "not": true }, { "goto": "/wp-admin/edit-comments.php?comment_status=trash&comment_type=jetpack_form_note" }, { "expect": "h1", "toContainText": "Comments" }, { "expect": "#the-comment-list", "toContainText": "Rehearsal deleted note {{run}}", "not": true }, { "expectNoConsoleErrors": true } ] }Rehearsal: Forms: Authors cannot list notes in wp-admin Comments
Rehearsal
459bbaf· 3 steps · coverspackages/formsLast run: Passed on WordPress 7.1.5 · Theme: Twenty Twenty-Four 1.6 · Akismet Anti-spam: Spam Protection 5.7.2 · Jetpack 16.5-a.5, run #34, 2026-11-27.
View or install this rehearsal · JSON · Playwright test (links work while freely-silky-stork.jurassic.ninja exists)
Rehearsal JSON
{ "format": 1, "requires": [ "jetpack" ], "covers": [ "packages/forms" ], "role": "author", "steps": [ { "goto": "/wp-admin/edit-comments.php?comment_status=all&comment_type=jetpack_form_note" }, { "expect": "h1", "toContainText": "Comments" }, { "expect": "#the-comment-list", "toContainText": "Rehearsal note", "not": true } ] }Manual checks
The rehearsals cover the first half of step 1, step 5 for administrators, and step 3's listing as an author. These steps cover the rest. You'll need at least one form response, plus an editor and an author user.
POST /wp/v2/commentsresponse has"status": "hold"and"type": "jetpack_form_note"./wp-json/wp/v2/comments?post=<response ID>and/wp-json/wp/v2/comments/<note ID>with the REST nonce. Both return 403.Unit tests cover the read check for each role and the stored approval status: