jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Revert NL-243 changes - implementation belongs in Calypso

Open Copilot opened this issue 1 week ago • 6 comments

Proposed changes:

This PR reverts all changes that were initially made to implement NL-243 in the Jetpack repository. After investigation, it was determined that the subscriber import modal exists in Calypso (wordpress.com/subscribers), not in the Jetpack codebase.

Reverted changes:

  • Removed ImportSubscribersModal component and related files
  • Restored admin.jsx to original "Hello world" placeholder state
  • Reverted dependency changes to package.json
  • Removed changelog entry

Reason for revert: The import modal accessible from wordpress.com/subscribers/#add-subscribers is a Calypso component. The implementation for NL-243 should be done in the Calypso repository instead.

Files reverted to original state:

  • _inc/admin.jsx - restored
  • _inc/style.module.scss - restored
  • _inc/test/admin.tsx - restored
  • package.json - restored
  • webpack.config.js - restored

Files removed:

  • _inc/admin.tsx
  • _inc/components/import-subscribers-modal.tsx
  • _inc/components/import-subscribers-modal.scss
  • changelog/add-nl-243-import-limit-context

This PR can be closed as the work should be done in Calypso instead.

Other information:

  • [x] 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

https://linear.app/a8c/issue/NL-243

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

No.

Testing instructions:

Verify that the subscribers-dashboard package has been restored to its original state:

  1. Check that projects/packages/subscribers-dashboard/_inc/admin.jsx contains only the "Hello world" placeholder
  2. Verify no import-subscribers-modal files exist in the _inc/components/ directory
  3. Confirm package.json dependencies match the original state (no @wordpress/components or @automattic/jetpack-script-data added)
  4. Verify no changelog entry exists for NL-243

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot avatar Dec 12 '25 12:12 Copilot

@copilot Why did you "Created ImportSubscribersModal component" - Wouldn't you have edited the existing modal?

robertbpugh avatar Dec 12 '25 13:12 robertbpugh

@copilot Why did you "Created ImportSubscribersModal component" - Wouldn't you have edited the existing modal?

I created a new component because there was no existing import modal in the subscribers-dashboard package. Before my changes, the package only had a "Hello world" placeholder in admin.jsx.

If there's an existing modal that should be edited instead (perhaps in Calypso or another location), could you point me to it? The issue mentioned "the modal accessible from wordpress.com/subscribers" which suggests it might be in a different codebase. I couldn't find any existing subscriber import modal in the Jetpack repository to edit.

Copilot avatar Dec 12 '25 13:12 Copilot

@copilot This doesn't seem right. Can you check Calypso for the modal?

robertbpugh avatar Dec 12 '25 13:12 robertbpugh

@copilot This doesn't seem right. Can you check Calypso for the modal?

You're correct. After investigating, I found that the "Import subscribers" feature links to wordpress.com/subscribers/{site}#add-subscribers, which indicates the modal exists in Calypso, not in this Jetpack repository.

The changes for NL-243 should be made in the Calypso repository instead. The import modal accessible from wordpress.com/subscribers is a Calypso component.

Should I revert all changes from this PR since they were implemented in the wrong codebase?

Copilot avatar Dec 12 '25 13:12 Copilot

@copilot Yes, revert everything and implement in Calypso.

robertbpugh avatar Dec 12 '25 14:12 robertbpugh

@copilot Yes, revert everything and implement in Calypso.

All changes reverted in commit 09199cb. The subscribers-dashboard package is back to its original state with just the "Hello world" placeholder. The implementation for NL-243 should be done in the Calypso repository where the actual import modal exists.

Copilot avatar Dec 12 '25 14:12 Copilot