regression: Upload loading state relying on percentage instead of file URL#39780
regression: Upload loading state relying on percentage instead of file URL#39780dionisio-bot[bot] merged 1 commit intorelease-8.3.0from
Conversation
|
Looks like this PR is ready to merge! 🎉 |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (11)📓 Common learnings📚 Learning: 2026-03-11T18:17:53.972ZApplied to files:
📚 Learning: 2026-03-12T17:12:49.121ZApplied to files:
📚 Learning: 2026-02-12T15:39:28.416ZApplied to files:
📚 Learning: 2026-03-19T13:59:40.678ZApplied to files:
📚 Learning: 2026-03-11T18:15:53.272ZApplied to files:
📚 Learning: 2026-03-11T22:04:20.529ZApplied to files:
📚 Learning: 2026-02-25T20:10:16.987ZApplied to files:
📚 Learning: 2026-02-10T16:32:42.586ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
🔇 Additional comments (4)
WalkthroughFixes a race condition where upload progress from XHR events could reach 100% before the server responds with the file URL, causing the UI to prematurely mark uploads as complete. The fix caps progress at 99% during upload and only sets it to 100% upon successful server response, with UI checks updated to verify URL presence instead of percentage completion. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release-8.3.0 #39780 +/- ##
=================================================
+ Coverage 70.48% 70.56% +0.07%
=================================================
Files 3247 3256 +9
Lines 115374 115778 +404
Branches 21005 21081 +76
=================================================
+ Hits 81323 81699 +376
- Misses 31987 32017 +30
+ Partials 2064 2062 -2
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)
Introduced here #39425
The upload loading state was determined by checking percentage < 100 (or percentage !== 100), which is unreliable. The upload progress could reach 100% from the XHR progress event before the server responds with the actual file URL.
So when the user sends the message quickly enough, the message isn't ready and it silently fails. It was caught during tests in E2E rooms but it can happens in every room depending the state of the connection
Issue(s)
Steps to test or reproduce
Further comments
CORE-1991
Summary by CodeRabbit