Skip to content

feat: Remote rendering 4.5b: Send the cross-section plane to the server-mode client - #196

Open
LKasianAnsys wants to merge 4 commits into
feat/4.4b-move-viewer-wiring-to-custom-classesfrom
feat/4.5b-publish-cross-section-plane-to-client
Open

LKasianAnsys wants to merge 4 commits into
feat/4.4b-move-viewer-wiring-to-custom-classesfrom
feat/4.5b-publish-cross-section-plane-to-client

Conversation

@LKasianAnsys

Copy link
Copy Markdown
Collaborator

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_state key. Additionally, the client tests are extended to cover the new plane synchronization logic.

Backend cross-section state synchronization:

  • Generalized the publisher interface from CameraPublisher to ViewRecordPublisher, 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:

  • Updated the frontend FakeState test helper and ServerRendererCache tests to handle multiple state keys, including server_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:

  • Improved error handling in the Visordash React 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.

@LKasianAnsys LKasianAnsys self-assigned this Oct 27, 2026
@github-actions github-actions Bot added test Work associated with testing added enhancement New feature or request labels Oct 27, 2026
@LKasianAnsys LKasianAnsys changed the title feat: Send the cross-section plane to the server-mode client feat: [Remote rendering 4.5b] Send the cross-section plane to the server-mode client Oct 27, 2026
@LKasianAnsys
LKasianAnsys force-pushed the feat/4.5b-publish-cross-section-plane-to-client branch from bbf30fa to f8dedad Compare October 28, 2026 14:12
@LKasianAnsys
LKasianAnsys force-pushed the feat/4.5b-publish-cross-section-plane-to-client branch from f8dedad to 5f02614 Compare October 28, 2026 16:18
@LKasianAnsys
LKasianAnsys force-pushed the feat/4.5b-publish-cross-section-plane-to-client branch from 5f02614 to f250a5a Compare October 28, 2026 16:32
@LKasianAnsys
LKasianAnsys added this pull request to stack #197 October 29, 2026 20:54
@LKasianAnsys
LKasianAnsys force-pushed the feat/4.5b-publish-cross-section-plane-to-client branch from f250a5a to 3f97c18 Compare October 29, 2026 22:03
@LKasianAnsys LKasianAnsys changed the title feat: [Remote rendering 4.5b] Send the cross-section plane to the server-mode client feat: Remote rendering 4.5b: Send the cross-section plane to the server-mode client Oct 29, 2026
@LKasianAnsys
LKasianAnsys force-pushed the feat/4.5b-publish-cross-section-plane-to-client branch 2 times, most recently from 496b95e to 5629c8b Compare November 2, 2026 13:57
@LKasianAnsys
LKasianAnsys force-pushed the feat/4.5b-publish-cross-section-plane-to-client branch from 5629c8b to 207d70a Compare November 2, 2026 14:24

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

added enhancement New feature or request test Work associated with testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Remote rendering 4.5] Remote camera interaction end-to-end

2 participants