Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a tile-update ordering issue by ensuring the “update finished” (FINISH) notification is queued only after all pending tile UPDATE requests have been queued and the changed-tiles set has been cleared, preventing stale highlight/visibility state during large batch operations.
Changes:
- Move
notifyUpdateFinished()to run after all_tilesChangedUPDATE requests are queued. - Ensure
_tilesChangedis cleared before sending the FINISH request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
This PR fixes an ordering issue in the virtual tile update loop that could leave tiles in an inconsistent visual state during large batch updates.
Context
When performing bulk operations such as:
unhighlight all highlighted elements, or
visibility changes over a large number of objects,
some tiles could remain highlighted (or visible) even though the requested state was the opposite.
Root Cause
The update cycle completion notification was being sent before all pending tile UPDATE messages were dispatched for changed tiles.
In heavy batches, this could mark the cycle as finished while there were still tile state changes waiting to be sent/applied, causing stale highlight/visibility data on some tiles.
Fix
The update completion signal is now sent only after:
all changed tiles have been processed and UPDATE requests have been queued, and
the changed-tiles set has been cleared.
This guarantees the FINISH notification reflects the real end of the update batch.
Result
Highlight/visibility operations are now consistent during mass updates.
No more “stuck highlighted” or “stuck visible/invisible” tiles caused by early completion signaling.
Improves reliability of state synchronization between tile controller and mesh processing pipeline.
Validation
Manually verified with bulk highlight/unhighlight and bulk visibility toggles on large models; tile states now converge correctly with no lingering mismatches.
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following:
feat(examples): add hello-world example).fixes #123).