fix: disable send until video is recorded#38731
fix: disable send until video is recorded#38731ScriptShah wants to merge 1 commit intoRocketChat:developfrom
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
No actionable comments were generated in the recent review. 🎉 📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (1)
WalkthroughA single-line logic fix in the Video Message Recorder component corrects the Send button's disabled state. The button now properly remains disabled when the camera is not started, the recording is not idle, or no recording time has been captured, preventing users from sending empty video messages. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #38731 +/- ##
===========================================
- Coverage 70.51% 70.49% -0.02%
===========================================
Files 3176 3176
Lines 111139 111138 -1
Branches 20050 20042 -8
===========================================
- Hits 78367 78351 -16
- Misses 30721 30736 +15
Partials 2051 2051
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Proposed changes (including videos or screenshots)
This PR fixes a UX and data integrity issue in the video message recorder where the Send button is enabled even when no recording has been made. Clicking Send immediately can result in an upload attempt of a 0-byte blob or unexpected message behavior.
File:
apps/meteor/client/views/composer/VideoMessageRecorder/VideoMessageRecorder.tsxPreviously, the disabled state of the Send button only checked whether the camera was started and whether the user was not currently recording. This allowed the initial idle state (before any recording) to still enable Send.
This PR updates the disabled condition to ensure that:
timeas the signal)Code change
📸 Screenshots:
(Will be added) Recorder UI showing Send enabled before recording

(Will be added) Recorder UI showing Send disabled until recording exists

This is a minimal, safe change that prevents empty uploads and improves UX consistency.
Issue
Fixes #38729
Steps to test or reproduce
Open the video message recorder in the message composer.
Do not record anything.
Observe the Send button state.
Before fix:
Send can be enabled even if no recording has been made.
Clicking Send may trigger an empty upload attempt.
After fix:
Send remains disabled until a recording has occurred (time is set).
No empty uploads are possible.
Further comments
This fix prevents unintended empty video uploads and ensures that the Send button reflects actual recording state. It does not introduce new UI behavior and does not require a changeset, as it only corrects incorrect button state logic.
Summary by CodeRabbit