Skip to content

VideoPress: Remove "Save as new video" from the trim and cut editor - #52857

Merged
vianasw merged 3 commits into
trunkfrom
remove/videopress-edit-save-as-new
Sep 28, 2026
Merged

vianasw merged 3 commits into
trunkfrom
remove/videopress-edit-save-as-new

Conversation

@vianasw

@vianasw vianasw commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes: N/A

Proposed changes

The trim and cut editor added in #52515 lets you save edits to the current video or as a new video. Saving as a new video doesn't work in production: the WordPress.com job that copies the original fails every time, so the request sits at "processing" until it's marked as failed. Saving to the current video uses a different path and works.

Instead of rebuilding the copy job, this PR removes the option. Saving always updates the current video, and the original can still be restored.

  • The save dialog is now a plain confirmation, "Update video?", using the same dialog as Discard changes, Restore original and Reload latest. The text and the "Update video" button are the same as the old "Update existing video" option.
  • Removes the copy request state, status notice, polling hook and request ID helper from the editor.
  • Removes the edits/copy REST proxy routes and the XML-RPC methods WordPress.com called to create the copy's attachment (jetpack.createVideoPressCopy, jetpack.authorizeVideoPressCopy). class-xmlrpc.php is back to what it was before VideoPress: Add trim and cut editor with save destinations #52515.
  • Updates the pending changelog entries from VideoPress: Add trim and cut editor with save destinations #52515 instead of adding new ones, since that feature hasn't been released yet.

The editor is behind the jetpack_videopress_trim_cut filter (off by default), so only testers have seen the option. The WordPress.com side of the copy flow will be removed separately.

Related product discussion/links

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

No.

Testing instructions

On a connected site, enable the editor, for example in an mu-plugin:

add_filter( 'jetpack_videopress_trim_cut', '__return_true' );
  1. Go to Jetpack → VideoPress, open a video, then open the Editor tab.
  2. Add a cut and click Save.
    • Before: "Save video edits" with "Update existing video" and "Save as new video".
    • After: "Update video?" with Cancel and Update video.
  3. Click Update video. The "Applying edits…" notice shows, and the video updates in place when processing finishes.
  4. Check that Discard changes, Restore original and Reload latest still work.

Screenshots

Captured on a local site with the editor enabled and /wp/v2/media and the edits endpoints mocked.

Before (trunk) After
before after

Automated: the copy-flow tests are removed with the code. The save test now also checks the confirmation text.

🤖 Generated with Claude Code

The copy job behind it fails on every production run, so saving now
always updates the current video. The save dialog becomes a plain
confirmation, and the copy REST routes and XML-RPC methods go with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vianasw
vianasw requested a review from a team as a code owner September 28, 2026 09:23
@vianasw vianasw added the [Status] Needs Review This PR is ready for review. label Sep 28, 2026
@vianasw vianasw self-assigned this Sep 28, 2026
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

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 remove/videopress-edit-save-as-new branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack remove/videopress-edit-save-as-new

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 github-actions Bot added [Package] VideoPress [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. [Tests] Includes Tests labels Sep 28, 2026
@github-actions

github-actions Bot commented Sep 28, 2026 •

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!


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: October 6, 2026

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


Videopress plugin:

No scheduled milestone found for this plugin.

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

@vianasw

vianasw commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

@jp-launch-control

jp-launch-control Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 4 files.

File Coverage Δ% Δ Uncovered
projects/packages/videopress/src/class-wpcom-rest-api-v2-endpoint-videopress-edits.php 147/149 (98.66%) -0.34% 0 💚
projects/packages/videopress/src/dashboard/components/editor/use-edit-session.ts 101/105 (96.19%) -0.11% 0 💚
projects/packages/videopress/src/class-xmlrpc.php 40/83 (48.19%) -16.61% -1 💚
projects/packages/videopress/src/dashboard/components/editor/editor-screen.tsx 62/64 (96.88%) 1.58% -2 💚

Full summary · PHP report · JS report

vianasw and others added 2 commits September 28, 2026 12:05
The removed copy tests were the only ones reaching xmlrpc_methods(), the
signed-user branch of create_media_item(), and the missing-owner branch
of the edits permission check. Test that behavior on its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phan flags null against xmlrpc_methods()'s WP_User parameter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vianasw
vianasw merged commit 2a89211 into trunk Sep 28, 2026
83 checks passed
@vianasw
vianasw deleted the remove/videopress-edit-save-as-new branch September 28, 2026 11:05
@github-actions github-actions Bot added [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. and removed [Status] Needs Review This PR is ready for review. labels Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] VideoPress [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant