Skip to content

Conversation

@dhasilva
Copy link
Contributor

@dhasilva dhasilva commented Jan 9, 2026

Follow-up to #46509

Proposed changes:

Adds the script to the build script and the build folder to the distributed package, making the dashboard available on CI builds.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

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

Testing instructions:

  • On a simple site, enable the feature flag:
    • add_filter('jetpack_forms_alpha', '__return_true'); in wp-content/mu-plugins/0-sandbox.php
  • Check that the wp build dashboard loads

@dhasilva dhasilva self-assigned this Jan 9, 2026
@dhasilva dhasilva added the [Status] Needs Review This PR is ready for review. label Jan 9, 2026
Copilot AI review requested due to automatic review settings January 9, 2026 20:17
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

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), and enable the update/forms-wp-build-script branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/forms-wp-build-script

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
Copy link
Contributor

github-actions bot commented Jan 9, 2026

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 a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • ✅ 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: February 3, 2026
    • Code freeze: February 3, 2026

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the build:wp-build script to the forms package build process as a follow-up to #46509, making the WP dashboard available in CI builds. The change includes updating both the regular build and production build scripts to incorporate the new wp-build step.

Key Changes

  • Added build:wp-build to the regular build script
  • Added build:wp-build to the build-production script
  • Added a changelog entry documenting the addition

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
projects/packages/forms/package.json Updates build scripts to include build:wp-build in both regular and production builds
projects/packages/forms/changelog/update-forms-wp-build-script Adds changelog entry documenting the new beta build addition

@dhasilva dhasilva force-pushed the update/forms-wp-build-script branch from 07dc489 to c9ecacd Compare January 9, 2026 20:23
@jp-launch-control
Copy link

jp-launch-control bot commented Jan 9, 2026

Code Coverage Summary

This 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. 🤷

Full summary · PHP report · JS report

@lezama
Copy link
Contributor

lezama commented Jan 9, 2026

@claude please review this PR

@claude
Copy link

claude bot commented Jan 9, 2026

Claude finished @lezama's task in 1m 3s —— View job


PR Review

  • Read changed files
  • Analyze package.json changes
  • Review changelog entry
  • Provide comprehensive feedback

Review Summary

This PR successfully adds build:wp-build to the Forms package build process as a follow-up to #46509. The implementation is straightforward and the changelog is properly formatted. The PR looks good to merge - the code change is correct and accomplishes the stated goal.

Analysis

✅ Code Changes (package.json)

The change to projects/packages/forms/package.json:19 correctly adds build:wp-build to the regular build script. This ensures the wp-build dashboard is built during CI builds.

Key observation: The build-production script (line 20) does NOT need modification because it already calls pnpm run build, which will execute the newly added build:wp-build step. The current implementation avoids redundant execution.

"build": "... && pnpm run build:wp-build && ...",
"build-production": "NODE_ENV=production BABEL_ENV=production pnpm run build && pnpm run validate"

This is the correct approach - build-production delegates to build, so the wp-build step runs once during production builds.

✅ Changelog Entry

The changelog file projects/packages/forms/changelog/update-forms-wp-build-script is properly formatted:

  • Significance: patch ✓ (appropriate for build script changes)
  • Type: added ✓ (correct for new build step)
  • Comment: Includes helpful context about this being a beta build under a feature flag ✓

📝 Note on Earlier Review Comment

The Copilot reviewer's comment about duplicate execution appears to have been based on a misunderstanding. Looking at the actual code:

  • Line 19: The build script includes build:wp-build
  • Line 20: The build-production script calls pnpm run build (which will execute the wp-build step once)

There is no redundant execution in the current implementation. The code is correct as-is.

Testing Recommendation

Per the testing instructions, verify that:

  1. On a simple site with the feature flag enabled
  2. The wp-build dashboard loads correctly

Approval

This PR is ready to merge. The implementation correctly adds the wp-build step to both development and production builds without redundancy.


Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 7 changed files in this pull request and generated 1 comment.

@dhasilva
Copy link
Contributor Author

dhasilva commented Jan 9, 2026

There are some build failures only caught by the CI pipeline, they do not happen locally, so I'm attempting fixes directly in this PR:

Error: es/forms] ✘ [ERROR] Could not resolve "@automattic/jetpack-components/tools/jp-redirect"
  [packages/forms] 
  [packages/forms]     routes/responses/inspector.tsx:4:27:
  [packages/forms]       4 │ ...edirectUrl from '@automattic/jetpack-components/tools/jp-redirect';
  [packages/forms]         ╵                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  [packages/forms] 
  [packages/forms]   The module "./build/tools/jp-redirect/index.js" was not found on the file system:
  [packages/forms] 
  [packages/forms]     node_modules/@automattic/jetpack-components/package.json:35:14:
  [packages/forms]       35 │       "default": "./build/tools/jp-redirect/index.js"
  [packages/forms]          ╵                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  [packages/forms] 
  [packages/forms]   You can mark the path "@automattic/jetpack-components/tools/jp-redirect" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
  [packages/forms] 
  Error: es/forms] ✘ [ERROR] Could not resolve "@automattic/jetpack-components/jetpack-logo"
  [packages/forms] 
  [packages/forms]     routes/responses/stage.tsx:4:24:
  [packages/forms]       4 │ import JetpackLogo from '@automattic/jetpack-components/jetpack-logo';
  [packages/forms]         ╵                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  [packages/forms] 
  [packages/forms]   The module "./build/components/jetpack-logo/index.js" was not found on the file system:
  [packages/forms] 
  [packages/forms]     node_modules/@automattic/jetpack-components/package.json:30:14:
  [packages/forms]       30 │       "default": "./build/components/jetpack-logo/index.js"
  [packages/forms]          ╵                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  [packages/forms] 
  [packages/forms]   You can mark the path "@automattic/jetpack-components/jetpack-logo" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
  [packages/forms] 

The first attempt is to rename the .jsx files to tsx so, after transpilation, they end up as .js like the other components and the file is found.

I tried first changing the import statements to something like import { JetpackLogo, getRedirectUrl } from '@automattic/jetpack-components';, but this causes other issues.

@dhasilva dhasilva force-pushed the update/forms-wp-build-script branch from a04b1eb to 8129fd0 Compare January 9, 2026 21:26
Copilot AI review requested due to automatic review settings January 9, 2026 21:31
@dhasilva dhasilva force-pushed the update/forms-wp-build-script branch from 8129fd0 to 974178f Compare January 9, 2026 21:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 11 changed files in this pull request and generated 1 comment.

@dhasilva
Copy link
Contributor Author

dhasilva commented Jan 9, 2026

Converting the components to .tsx did not fix the build issue. Will continue trying solutions by updating the PR as they are not caught in the local environment.

@dhasilva dhasilva marked this pull request as draft January 9, 2026 22:05
@github-actions github-actions bot added [Block] Contact Form Form block (also see Contact Form label) [Status] In Progress labels Jan 9, 2026
@dhasilva dhasilva removed the [Status] Needs Review This PR is ready for review. label Jan 9, 2026
@github-actions github-actions bot added [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ E2E Tests labels Jan 10, 2026
@dhasilva dhasilva force-pushed the update/forms-wp-build-script branch from f103931 to e001cd8 Compare January 12, 2026 20:56
@dhasilva dhasilva force-pushed the update/forms-wp-build-script branch from e001cd8 to 0328cba Compare January 12, 2026 21:29
@dhasilva dhasilva marked this pull request as ready for review January 12, 2026 21:31
Copilot AI review requested due to automatic review settings January 12, 2026 21:31
@dhasilva dhasilva requested a review from a team January 12, 2026 21:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Member

@simison simison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 stays hidden with filter disabled, and filter enabled it appears in the sidebar.

It also loads, although sidebar is always visible:

Image

We can work that out in follow-up PRs.

@dhasilva dhasilva merged commit 7da2beb into trunk Jan 13, 2026
85 of 87 checks passed
@dhasilva dhasilva deleted the update/forms-wp-build-script branch January 13, 2026 17:08
@github-actions github-actions bot removed the [Status] Needs Review This PR is ready for review. label Jan 13, 2026
@github-actions github-actions bot added this to the jetpack/15.5 milestone Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Contact Form Form block (also see Contact Form label) E2E Tests [Feature] Contact Form [Package] Forms [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Tests] Includes Tests [Type] Task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants