Skip to content

feat: Remote rendering 4.3b: Display the panels in server mode - #187

Open
LKasianAnsys wants to merge 5 commits into
mainfrom
feat/4.3b-show-panels-in-server-mode
Open

LKasianAnsys wants to merge 5 commits into
mainfrom
feat/4.3b-show-panels-in-server-mode

Conversation

@LKasianAnsys

@LKasianAnsys LKasianAnsys commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Issue

Addresses #28

Context

Until now, the server mode visualizer showed the streamed frames but no UI panels. This PR adds the panels on top of the server-mode canvas, and adds a client-side ServerRenderer by sending each panel action to the server as a trigger, so the panel controls work in server mode. See the copilot summary below for a more complete summary of the changes.

Key Changes:

  • Created ServerRenderer which implements IRenderer
  • Triggers are moved into SceneTriggerSends
  • Server mode now builds a VisorFrontnend so the panels appear, and sends set_dark_theme on each build.

Manual check:
Start VISOR in server mode with a dataset. Check that the panels now appear. Test hiding a part, toggling the bounding box, and toggling the cross-section widget. Note that these panels do not yet update after an add_dataset API call from the backend: that is addressed in user story 4.4 (#29).

Copilot summary

This pull request introduces significant improvements to the server-rendering ("remote rendering") mode in the Visor client, focusing on integrating the panel UI in server mode, refactoring the server-rendering frontend construction, and adding robust tests for server-rendering behavior. The changes simplify the code by removing the need to manually mount the server canvas, update type definitions, and enhance test coverage for both the renderer and the React hook responsible for server mode.

Key changes include:

Server Rendering Integration and Refactoring:

  • The panel UI is now displayed in server-rendering mode, aligning the user experience with local rendering. The useServerVtk hook has been refactored to build the full visorFrontend (including UI panels) instead of just exposing a canvas, and the manual canvas mounting logic in App.tsx has been removed. [1] [2] [3] [4]
  • The useServerVtk hook now manages the lifecycle and cleanup of the server renderer and frontend, ensuring proper resource management and error handling for schema mismatches.

Type and Interface Updates:

  • Renderer-related types have been updated: CameraSyncSource now references WasmRenderer instead of the broader IRenderer, and the addCameraSettledListener method has been removed from IRenderer and related implementations, as it is not relevant for server rendering. [1] [2] [3] [4] [5] [6] [7]

Testing Enhancements:

  • New tests verify the correct construction and behavior of the server-rendering frontend, including toolbar actions and theme propagation. These tests ensure that UI actions are correctly sent to the server and that the dark theme is communicated as expected. [1] [2] [3]
  • Additional tests for ServerRenderer confirm the correct caching and toggling of camera and widget states, improving confidence in server-rendering correctness.

Test and Mock Updates:

  • Existing tests have been updated to match the new server-rendering flow, particularly in how triggers are handled and how the frontend is constructed for testing purposes.

@github-actions github-actions Bot added added enhancement New feature or request labels Oct 22, 2026
@LKasianAnsys
LKasianAnsys force-pushed the feat/4.3b-show-panels-in-server-mode branch from 00fea7e to 948253f Compare October 26, 2026 14:16
@LKasianAnsys
LKasianAnsys force-pushed the feat/4.3b-show-panels-in-server-mode branch 2 times, most recently from c69f813 to ed4efab Compare October 26, 2026 19:40
@LKasianAnsys
LKasianAnsys marked this pull request as ready for review October 26, 2026 20:15
@LKasianAnsys LKasianAnsys self-assigned this Oct 26, 2026
@LKasianAnsys
LKasianAnsys force-pushed the feat/4.3b-show-panels-in-server-mode branch from ed4efab to 08edec1 Compare October 28, 2026 14:09
@LKasianAnsys
LKasianAnsys force-pushed the feat/4.3b-show-panels-in-server-mode branch from 08edec1 to 00c79fd Compare October 28, 2026 16:16
@LKasianAnsys
LKasianAnsys force-pushed the feat/4.3b-show-panels-in-server-mode branch from 00c79fd to 0eb7d53 Compare October 28, 2026 16:30
@LKasianAnsys
LKasianAnsys added this pull request to stack #197 October 29, 2026 20:54
@LKasianAnsys
LKasianAnsys force-pushed the feat/4.3b-show-panels-in-server-mode branch from 0eb7d53 to 720cb31 Compare October 29, 2026 21:40
@LKasianAnsys LKasianAnsys changed the title feat: [Remote rendering 4.3b] Display the panels in server mode feat: Remote rendering 4.3b: Display the panels in server mode Oct 29, 2026
@LKasianAnsys
LKasianAnsys force-pushed the feat/4.3b-show-panels-in-server-mode branch 2 times, most recently from 652fbeb to f785a98 Compare November 2, 2026 13:57
Base automatically changed from feat/4.3a-forward-mouse-wheel-input-to-server to main November 2, 2026 14:24
@LKasianAnsys
LKasianAnsys force-pushed the feat/4.3b-show-panels-in-server-mode branch from f785a98 to b4311f6 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants