Repository navigation
chore: [Remote rendering 3.6a] Cleanups after moving authority to server - #165
LKasianAnsys wants to merge 4 commits into
Conversation
bcfa019 to
12a0c39
Compare
72ff429 to
edc2803
Compare
a6db32a to
77a32cd
Compare
677b6c0 to
236ff55
Compare
|
@LKasianAnsys ,
The resulting scene looks a bit unusual and the viewer seems to be frozen. I've attached screenshots for reference. |
|
Hi @ansBAkula Thanks so much for testing and sharing your results. Yes let's discuss more tomorrow, as I haven't been able to reproduce on my end so far. At a glance, this looks quite similar to what I've been seeing in separate issue (issue #122, I believe it's an upstream issue, filed with Kitware, but there's a workaround/partial fix pending in #169). If you're using WSL on your Windows machine I believe it also reproduces there, could that be the case? |
68760e5 to
e739f38
Compare
|
@ansBAkula The workaround fix in #169 has been merged, and this PR has been rebased on main, so you should now be unblocked from testing the load_state workflow on this and the other PRs. |


Issue
Addresses #24
Context
Feature #19 is Phase 3 of the remote rendering epic (#15), which moves the viewer state authority from the client to the server. The first 5 user stories in this phase moved ownership of all of the pieces of the viewer state to the server. User story 3.6 is to clean up unused scaffolding and to review the save/load state workflow to ensure it works end to end as expected with the new state authority model.
This PR includes two main cleanups:
save_stateAPI. This includes frontend and backend code that can now be retired, now that the server reads its own records duringsave_state.onServerUpdateAsync. Previously, when the server received an API call and triggered anupdateon the client, the server would push stale viewer state, requiring the client to cache its previous state and reapply it after the server push. This is no longer needed now that the server is the authority on the viewer state.Manual checks:
add_dataset, viewer state looks correct for the pre-existing dataset. Start viewer with a dataset, color a part by a variable, turn on some widgets, change the camera orientation. Runadd_datasetto add a new dataset; check that the first dataset's state, and the state of widgets and camera (and UI panels and tabs) looks as it did.save_stateworks as expected. After the first check above, run thesave_stateAPI. Initialize a new VISOR instance, and start it with no dataset. Runload_stateto load the previously saved state. Check that it produces the same viewer state as the original VISOR instance.Copilot summary
This pull request removes the frontend round-trip for saving viewer state, making the server the sole authority for building and persisting the viewer state. The changes simplify the codebase by eliminating now-unnecessary async calls, models, and handlers related to client-side state retrieval. Saving now works even if no client is connected, improving robustness and maintainability.
Major changes include:
Removal of frontend authority and async state retrieval
save_statemethod inVisorVTKand theget_statemethod inVisorSceneBasehave been refactored to be synchronous and no longer await frontend responses. (F6231c12R364, F738364eR236, F738364eR272)_get_runtime_state_asyncand related frontend round-trip logic have been removed fromVisorSceneBaseand its subclasses. (F738364eR186, F4dfffcdR41)save_state_responsetrigger and handler have been removed fromLocalAppand related classes, since the server no longer expects a response from the frontend. (F0d5e153R206, F0d5e153R234, F0d5e153R242, F0d5e153R306, F6887ffeR42, F738364eR405, F4dfffcdR64)Model and code cleanup
VisorSaveStateRequestandVisorSaveStateResponsemodels, which were used for client-server state exchange, have been deleted as they are no longer needed. [1] [2]