Repository navigation
fix: update_variables no longer rebuilds the frontend and add sim example notebook - #237
Open
LKasianAnsys wants to merge 14 commits into
Open
LKasianAnsys wants to merge 14 commits into
LKasianAnsys wants to merge 14 commits into
Conversation
LKasianAnsys
changed the base branch from
main
to
feat/5.2d-batch-visibility-and-selection
November 19, 2026 20:05
LKasianAnsys
force-pushed
the
fix/no-rebuild-on-update-variables-1
branch
from
November 19, 2026 20:15
4f91c39 to
4817f87
Compare
LKasianAnsys
marked this pull request as ready for review
November 19, 2026 20:23
ansBAkula
force-pushed
the
fix/no-rebuild-on-update-variables-1
branch
from
November 23, 2026 04:47
c20ed80 to
c916e5d
Compare
LKasianAnsys
force-pushed
the
fix/no-rebuild-on-update-variables-1
branch
2 times, most recently
from
November 23, 2026 14:02
50962b9 to
58be561
Compare
…ad of dropping them
LKasianAnsys
force-pushed
the
fix/no-rebuild-on-update-variables-1
branch
from
November 23, 2026 15:51
58be561 to
5e58f85
Compare
ansBAkula
approved these changes
Nov 24, 2026
ansBAkula
left a comment
Collaborator
There was a problem hiding this comment.
Tested with saf-visor-poc and works.
Collaborator
Author
|
Thanks for testing and the approval; I'll hold off on merging until the PR for #227 is in (so they land as separate commits into main). |
This branch has not been deployed
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.
Issue
Resolves #236
Summary
The
update_variablesAPI replaces variable data on an already-loaded VTK dataset in a VISOR scene. However, despite only updating the data, it currently goes down the same update path asstartandadd_dataset, which create or change the scene topology and rebuilds the whole frontend. As a result, the panels visibly reset to their defaults and back on every update, in both CLIENT and SERVER mode.This PR treats a variable update as a data-only change. It also adds an example notebook that drives a live simulation through the
update_variablespath.Changes
update_variablesnow signals a data change instead of a scene change. In CLIENT mode the render is pushed as data only, so the wasm frontend updates in place. In SERVER mode a newdata_versionstate key is bumped alongside the existingscene_version, and the client fetches the updated variable records through a newget_variable_records_jsontrigger instead of rebuilding.FrontendRebuilderis replaced byFrontendUpdateQueue. It runs rebuilds and data refreshes one at a time, and if a rebuild is already waiting, a data refresh is folded into it. Server updates that arrive during a rebuild are now queued instead of dropped.Example
examples/notebooks/warp_fluid_update_variables.ipynbruns a Warp fluid simulation example and streams each step to VISOR throughupdate_variables. It allows for a test of the fix: the panels should stay put while the data animates on the fixed geometry.Illustration
1. Screen capture before this PR (flickering update_variables data streaming)
click to hide
Screen.Recording.2026-11-23.072641.mp4
2. Screen capture after this PR
click to hide
Recording.2026-11-19.145522.mp4
Note
This PR is added to the top of stack #233. It is not related to the rest of that stack (which builds ParaView mode), but as it touches some common code that is likely to result in merge conflicts, it is branched here rather than off main.