feat: Remote rendering 3.1d - route client per-part mutations through the server triggers - #53
Merged
LKasianAnsys merged 25 commits intoSep 3, 2026
Conversation
LKasianAnsys
changed the base branch from
main
to
feat/3.1c-triggers-lock-and-payload-validation
August 28, 2026 20:40
LKasianAnsys
force-pushed
the
feat/3.1c-triggers-lock-and-payload-validation
branch
from
August 31, 2026 14:33
a6b0351 to
d857fc9
Compare
LKasianAnsys
force-pushed
the
feat/3.1d-client-routes-mutations-to-triggers
branch
from
August 31, 2026 15:02
746d7fa to
cacfd07
Compare
LKasianAnsys
changed the base branch from
feat/3.1c-triggers-lock-and-payload-validation
to
main
August 31, 2026 15:24
LKasianAnsys
force-pushed
the
feat/3.1d-client-routes-mutations-to-triggers
branch
from
August 31, 2026 15:30
056a5bc to
5d5530c
Compare
…per-part-apply-logic
…-lock-and-payload-validation
LKasianAnsys
changed the base branch from
main
to
feat/3.1c-triggers-lock-and-payload-validation
August 31, 2026 16:41
…at/3.1d-client-routes-mutations-to-triggers
Collaborator
Author
|
@AnSergioFern Adding you to make sure the regression test update looks OK to you. I included a section on the regression test in the description - let me know if you have feedback/suggestions. |
margalva
previously approved these changes
Sep 2, 2026
Base automatically changed from
feat/3.1c-triggers-lock-and-payload-validation
to
main
September 2, 2026 20:00
Collaborator
Author
|
@margalva thank you for the approval. It needs a reapproval after 3.1c was merged into main. |
margalva
approved these changes
Sep 3, 2026
LKasianAnsys
deleted the
feat/3.1d-client-routes-mutations-to-triggers
branch
September 3, 2026 14:13
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
Addresses #18
Context
This is the 4th of 5 PRs for user story 3.1 (#18) of the phased implementation plan (here) for adding remote rendering in VISOR.
Per-part visual state (visibility, opacity, diffuse color, color variable), is currently held client-side on
VisorPartStateand reaches the server only viagetAppStateAsyncwhen thesave_stateAPI is called. This story inverts that, makingVisorDatasetRegistrythe source of truth for per-part state by the end of 3.1.This PR is the fourth step: adding client-initiated calls to the server-side Trame triggers that apply per-part mutations to the registry and to VTK. This is the PR where the client and server halves are wired together: per-part changes made on the client are sent to the server and applied there. This results in a behaviour change: per-part changes made in the browser now survive a refresh rather than resetting to defaults.
Notes
Regression Test Update
Because this PR results in a viewer behaviour change, a regression test update is required. Any per-part changes within a viewer session now survive a refresh or new connection, and we had a test that relied on a shared fixture resetting to defaults on a new connection; this need updating.
The
TestTensorComponentColoring.test_initial_render_baselinetest now results in ae2e02_tensor_initial_render_current_<date>.pngthat does not match baseline in the failed regression test run. The fixture is used across tests, and the test checks the initial state of the viewer, which used to revert to the default color-by per-part property, but the server now stores the previously-applied value and it survives a refresh/new connection.Made two changes:
TestTensorComponentColoringbeforeTestTensorVariableDropdownin test_variable_components.py, to allowe2e02_tensor_initial_renderto run before other operations.components_to_testfrom["Magnitude", "XX", "YY", "ZZ"]to["XX", "YY", "ZZ", "Magnitude"]to keep the image as expected ine2e01_tensor_component_dropdown. (This was getting set to "ZZ" because the server remembered the last setting from the previous test).Copilot summary
This pull request implements remote per-part mutation support in the rendering pipeline, ensuring that all per-part user actions (such as visibility, opacity, color, and selection changes) are now sent to the server via triggers in addition to being applied locally. The changes introduce a new trigger sender interface, update the renderer implementations to support these triggers, and add comprehensive tests to verify that both local and remote mutations occur as intended.
The most important changes are:
Remote per-part mutation infrastructure:
TrameTriggerSendertype toIRenderer.tsto abstract the transport for sending per-part mutations to the server, and updated theIRendererinterface with six newsendPart*Asyncmethods for visibility, opacity, color, selection, and variable coloring triggers. [1] [2]WasmRendererto accept an optional trigger sender, and implemented all sixsendPart*Asyncmethods to call the appropriate server triggers using the injected sender. Failures are logged but do not affect client-side behavior. [1] [2] [3] [4]NullRendererto provide no-op implementations for the new server trigger methods, ensuring compatibility in environments without a server backend.Scene graph and application integration:
sendPart*Asyncmethods, guaranteeing that server state stays in sync with client actions. [1] [2]Testing and validation:
VisorSceneGraphPartTriggers.test.tsx) that verifies every per-part user action results in both a local renderer mutation and the correct server trigger being sent. Tests also cover group-node fan-out and ensure that no triggers are sent for group nodes themselves.These changes collectively ensure that all relevant client-side mutations are reliably mirrored to the server, supporting consistent collaborative or remote rendering workflows.