Page MenuHomePhabricator

VideoCutTool: Preview/Reset buttons unresponsive after video rotation
Open, Needs TriagePublic

Description

Steps to replicate the issue:

  1. Open VideoCutTool (e.g., at http://localhost:8000/ or https://videocuttool.wmcloud.org/).
  2. Upload a video file.
  3. Navigate to the rotation feature/section.
  4. Apply a rotation (e.g., 90 degrees clockwise).
  5. Observe the "Preview" and "Reset" buttons.

What happens?:
After applying a rotation, the "Preview" and "Reset" buttons become unresponsive. Clicking them has no effect, preventing the user from previewing the rotated video or resetting the rotation.

What should have happened instead?:
The "Preview" button should allow the user to see the video with the applied rotation, and the "Reset" button should revert the video to its original orientation before rotation was applied. Both buttons should be functional and responsive after a rotation is performed.

Software version:
Current prod (VideoCutTool) [https://videocuttool.wmcloud.org/]
(If testing locally, also mention: Local development setup, cloned from [https://gerrit.wikimedia.org/r/labs/tools/VideoCutTool])

Other information (browser name/version, screenshots, etc.):

  • Browser: [Your Browser Name and Version, e.g., Chrome 126.0.6478.126, Firefox 128.0]
  • Operating System: [Your OS, e.g., Windows 10, macOS Sonoma, Ubuntu 22.04]
  • (Optional: Attach a screenshot or short video demonstrating the issue if possible, though you haven't provided one for this specific bug yet.)

Event Timeline

Hey @Bineta removing you as the assignee from here, as no updates on the ticket yet.
Here's the attached screenshot for the above issue. Ideally the buttons should not be in disabled state once any manipulation (in this case rotation) is applied on any video.

Screenshot 2025-11-07 at 16.06.23.png (1×2 px, 190 KB)

Thank you for tagging this task with good first task for Wikimedia newcomers!

Newcomers often may not be aware of things that may seem obvious to seasoned contributors, so please take a moment to reflect on how this task might look to somebody who has never contributed to Wikimedia projects.

A good first task is a self-contained, non-controversial task with a clear approach. It should be well-described with pointers to help a completely new contributor, for example it should clearly point to the codebase URL and provide clear steps to help a contributor get set up for success. We've included some guidelines at https://phabricator.wikimedia.org/tag/good_first_task/ !

Thank you for helping us drive new contributions to our projects <3

@Srilasyapragathi: Hi! This task has been assigned to you a while ago. Could you maybe share an update? Do you still plan to work on this task, or do you need any help?

If this task has been resolved in the meantime: Please update the task status (via Add Action...Change Status in the dropdown menu).
If this task is not resolved and only if you do not plan to work on this task anymore: Please consider removing yourself as assignee (via Add Action...Assign / Claim in the dropdown menu): That would allow others to work on this (in theory), as others won't think that someone is already working on this. Thanks! :)

Pppery added a subscriber: Srilasyapragathi.

Looking over the code, and viewing the state of the Preview and Reset buttons. This looks like it could be a synchronization problem due to the updates being asynchronous.
See the Table Below:
(Enabled (1) or Disabled (0))

RotationPreviewReset
000
9000
18010
27011
001
9010
18011
27011
001
9010
18011
27011
001
9010
18011
27011

I can see a pattern with both Preview and Reset where the Buttons are Enabled twice and then Disabled once, then Enabled three times and Disabled once, which then repeats.

I'm not familiar with this codebase so I'm not sure of the best way of fixing this, maybe react functional updates?