VuMartin opened a new pull request, #6489:
URL: https://github.com/apache/texera/pull/6489

   ### What changes were proposed in this PR?
   
   This PR fixes an issue where a missing position entry could break the 
position synchronization stream during collaborative editing.
   
   Instead of allowing an `undefined` old position to propagate, the position 
change event is filtered out so the stream continues processing future valid 
events.
   
   Before (simulated missing position scenario):
   If a position change event was received for an operator whose position was 
missing from `elementPositions`, the stream could error out and stop processing 
future position updates, breaking synchronization.
   
   <img width="2866" height="1110" alt="image" 
src="https://github.com/user-attachments/assets/3c782b1d-c740-4a36-9438-16cff8ea8386";
 />
   
   After:
   Position change events with missing position information are ignored, 
allowing the stream to continue processing subsequent valid position updates 
and preserving synchronization.
   
   <img width="1433" height="718" alt="Screenshot 2026-07-17 at 1 23 31 AM" 
src="https://github.com/user-attachments/assets/0ce72c41-49a6-4517-b0a1-80abc86d38f1";
 />
   
   ### Any related issues, documentation, discussions?
   
   Closes #6420
   
   ### How was this PR tested?
   
   Manual test:
   - Opened two browser tabs with two different users
   - Simulated the missing-position scenario by removing the position entry
   - Verified that position sync continued after the bad event
   - Confirmed add/delete operations still worked independently
   
   Added a unit test that simulates a missing position entry by removing an 
operator's position from the internal position map before triggering a position 
change. The test verifies that the invalid event is ignored and that subsequent 
valid position change events are still emitted correctly.
   
   Ran:
   
   ```bash
   yarn test 
--include=src/app/workspace/service/workflow-graph/model/joint-graph-wrapper.spec.ts
   ```
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: ChatGPT (GPT-5.5 mini)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to