Repository navigation
chore: [Remote rendering 3.6d] Deliver server state to the browser without sending it back - #171
Open
LKasianAnsys wants to merge 6 commits into
Open
LKasianAnsys wants to merge 6 commits into
LKasianAnsys wants to merge 6 commits into
Conversation
LKasianAnsys
force-pushed
the
chore/3.6d-deliver-without-sending
branch
from
October 15, 2026 13:39
73a3a4d to
69f74d2
Compare
LKasianAnsys
changed the base branch from
chore/3.6b-resolve-state-on-server
to
main
October 15, 2026 13:39
LKasianAnsys
changed the base branch from
main
to
chore/3.6b-resolve-state-on-server
October 15, 2026 13:40
LKasianAnsys
marked this pull request as ready for review
October 15, 2026 14:28
LKasianAnsys
force-pushed
the
chore/3.6b-resolve-state-on-server
branch
from
October 15, 2026 15:00
285c16f to
2b40e33
Compare
LKasianAnsys
force-pushed
the
chore/3.6d-deliver-without-sending
branch
from
October 15, 2026 15:02
69f74d2 to
227af31
Compare
LKasianAnsys
force-pushed
the
chore/3.6b-resolve-state-on-server
branch
from
October 16, 2026 17:05
2b40e33 to
a1b3d5d
Compare
LKasianAnsys
force-pushed
the
chore/3.6d-deliver-without-sending
branch
from
October 16, 2026 17:05
227af31 to
029d796
Compare
# Conflicts: # src/ansys/visor/visor-client/src/jest-tests/DeliveredStateApply.test.tsx
LKasianAnsys
force-pushed
the
chore/3.6d-deliver-without-sending
branch
from
October 16, 2026 17:38
029d796 to
3140dee
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
Addresses #24
Context
Until now, when the server sent state to the browser (e.g. on page load, on each rebuild, and when
load_stateAPI is called), the browser applied it through the same methods a user action takes, and those methods also report the change to the server. Every delivery therefore echoed back: the UI panel and widget toggles, plus every changed part field, when a user loaded a saved state withload_state. Equality checks hid some of these echoes, but only when the values happened to match. Separately, changing the part visibility of one part in the tree view sent one trigger per part (hide everything, then re-show the visible parts).In this PR:
Manual check:
Run the VISOR server and monitor logs/visor.log
[trigger] set_part_selected arrived:...
[trigger] set_part_color_variable arrived:...
[trigger] set_part_visibility arrived.:...
[trigger] set_panel_top_left-panel_collapsed arrived: ...
load_statewith a file whose values differ from the scene. The parts and panels are updated to reflect the saved state file's values, and no arrival lines appear in the server log: the values came from the server, so there is nothing to report back.Copilot summary
This pull request refactors the UI panel and scene state management code to use new "apply" methods for updating UI and scene state, replacing the previous "set", "expand", and "collapse" methods. The changes improve clarity, consistency, and separation of concerns between state application and state mutation/reporting, and streamline how UI state is synchronized and updated across the frontend and backend.
Key changes include:
Refactoring UI Panel State Management
expandPanel,collapsePanel,expandLegend, andcollapseLegendmethods with unifiedapplyPanelCollapsedandapplyLegendCollapsedmethods in bothPanel_TopLeftandPanel_TopRightcomponents, making state updates more declarative and reducing code duplication. [1] [2] [3] [4]applyTabIndexmethod instead ofselectTab, centralizing tab state application and reporting. [1] Feafd0f3L25R25, [2] [3]Scene and Renderer State Updates
set*Asyncmethods (e.g.,setCrossSectionVisibilityAsync,setEdgeVisibilityGlobalAsync,setDiffuseColorRgbAsync, etc.) with newapply*Asyncmethods for applying scene and part state, improving naming consistency and making intent clearer. [1] [2] [3]UI State Synchronization
VisorFrontendclass to use the newapply*methods when synchronizing UI state to the panels and scene, ensuring a more consistent and reliable state application process. [1] [2] [3] [4] [5]Minor Logic Improvements
Panel_TopLeftto only update nodes whose state actually changes, reducing unnecessary async calls.These changes collectively make the codebase easier to maintain, improve separation of UI state application from mutation/reporting, and provide a clearer and more consistent API for updating UI and scene state.