Repository navigation
feat: Remote rendering 4.5b: Send the cross-section plane to the server-mode client - #196
Open
LKasianAnsys wants to merge 4 commits into
Conversation
LKasianAnsys
force-pushed
the
feat/4.5b-publish-cross-section-plane-to-client
branch
from
October 28, 2026 14:12
bbf30fa to
f8dedad
Compare
LKasianAnsys
force-pushed
the
feat/4.5b-publish-cross-section-plane-to-client
branch
from
October 28, 2026 16:18
f8dedad to
5f02614
Compare
LKasianAnsys
force-pushed
the
feat/4.5b-publish-cross-section-plane-to-client
branch
from
October 28, 2026 16:32
5f02614 to
f250a5a
Compare
LKasianAnsys
force-pushed
the
feat/4.5b-publish-cross-section-plane-to-client
branch
from
October 29, 2026 22:03
f250a5a to
3f97c18
Compare
LKasianAnsys
force-pushed
the
feat/4.5b-publish-cross-section-plane-to-client
branch
2 times, most recently
from
November 2, 2026 13:57
496b95e to
5629c8b
Compare
LKasianAnsys
force-pushed
the
feat/4.5b-publish-cross-section-plane-to-client
branch
from
November 2, 2026 14:24
5629c8b to
207d70a
Compare
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 #30
Context
In server mode, the client never received the cross-section plane state. The server recorded it, but nothing wrote it to the trame state, so it was not sent to the client over the websocket. The server now publishes the plane under a serer_cross_section_state key, the same way it publishes server_camera_state, and the client caches it as it caches the camera. CameraPublisher is widened and renamed ViewRecordPublisher, since it now publishes both. A snapshot that still fails is caught nad logged in the Dash component instead of being left uncaught.
Manual check: Start a Visor instance in SERVER mode with a dataset, open it with Dash, and generate a Dash snapshot. The data should be printed, and it should reflect the live viewer at the time it was generated.
Copilot summary
This pull request introduces support for synchronizing the cross-section plane state between the server and client, alongside the existing camera state, in the Ansys Visor application. The changes generalize the publisher interface and update both the backend and frontend to handle the new
server_cross_section_statekey. Additionally, the client tests are extended to cover the new plane synchronization logic.Backend cross-section state synchronization:
CameraPublishertoViewRecordPublisher, allowing the server to publish both camera and cross-section plane records to the frontend. (src/ansys/visor/viewer/renderer/server_renderer.py,src/ansys/visor/viewer/app/trame/server_state_publisher.py,src/ansys/visor/viewer/vtk/scene/server_scene.py,src/ansys/visor/viewer/app/visor_vtk_server.py) [1] [2] [3] [4] [5] [6] [7] [8] [9]Frontend test and state handling improvements:
FakeStatetest helper andServerRendererCachetests to handle multiple state keys, includingserver_cross_section_state, and added new tests for cross-section plane cache behavior. (src/ansys/visor/visor-client/src/jest-tests/ServerRendererCache.test.ts) [1] [2] [3] [4] [5] [6] [7]Error handling and documentation:
VisordashReact component for snapshot failures and updated the prop documentation to clarify behavior when a snapshot fails. (src/ansys/visor/dash/src/lib/components/Visordash.react.js) [1] [2]These changes collectively enable robust, bi-directional synchronization of both camera and cross-section plane states between the server and client, and ensure the frontend is properly tested for these scenarios.