Repository navigation
[4.0 port] fix(whiteboard): add trailing to throttling for cursor updates #25693 - #25951
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughCursor publishing now uses a trailing throttle. While throttled, it retains the latest cursor update and retries after the remaining interval. The wrapper is recreated when the publishing callback, configured interval, or current page changes. Cleanup cancels pending work. Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~15 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The cursor update change is ready to merge after normal checks; no actionable issue remains. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change preserves the existing cursor permission check and does not demonstrate broader access or authority. The remaining risk is limited to cursor lifecycle containment: cleanup clears queued work but does not prevent a later call from restarting an obsolete publisher. Retained concerns
Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
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 |
⏳ Automated tests are running... |
f8d9ebb
into
bigbluebutton:v4.0.x-develop
What does this PR do?
Ports #25693 (merged into
v3.0.x-develop) tov4.0.x-develop.The four commits are cherry-picked unchanged (
git cherry-pick -x, original author kept). They applied without conflicts; no 4.0-specific adaptation was needed.The whiteboard cursor publisher used Radash's
throttle, which is leading-edge only: moves that land inside the throttle window are dropped, so when the presenter stops moving, the last position sent is not the position the pointer rests on. This PR wraps the throttle in athrottleWithTrailinghelper that keeps the latest position and publishes it when the interval expires. The pending update is cancelled on unmount and when the page changes.Only
bigbluebutton-html5/imports/ui/components/whiteboard/container.jsxchanges.Closes Issue(s)
Related to #25690 (cursor position half; the pan half is #25691, still open on 3.0)
Motivation
Viewers on 4.0 see the presenter's cursor resting at a stale position, same as on 3.0 before #25693.
How to test
Before: the viewer's cursor often stops short of the real position.
After: the viewer's cursor ends on the real position.
Results on a local 4.0 server (
cursorInterval: 100), client built fromv4.0.x-developat 420e8ca with and without this branch. A script moved the presenter's pointer in 20 bursts and compared the lastPresentationPublishCursorsent, and the lastpres_page_cursor_streamrow a viewer received, with the true resting position:Also checked:
throttleWithTrailingexercised against Radash 12.1.1: publishes the final position, keeps the rate bounded by the interval, sends a single move once, andcancel()drops the pending publish. PASS (7 of 7 checks).whiteboard/specs on this branch: 27 of 30 passed.PanandShape Options Duplicatefail on the unpatched client as well (screenshot diffs).Redo drawingfailed once in the full run and then passed 16 of 16 on this branch and 2 of 2 on the unpatched client.More
Original PR: #25693 by @hiroshisuga. The follow-up about moving the throttle helper to a shared utility is tracked in #25824.