Repository navigation
[Remote rendering 3.5] Server-authoritative color variable lookup tables聽#23
Description
Activity
- added a parent issue
on Aug 25, 2026 - addedtechnicalA User Story internal to development that identifies non-functional work such as a refactoringA User Story internal to development that identifies non-functional work such as a refactoring
on Aug 25, 2026 Note: The known risk (the lookup table sync issue) mentioned in the user story description has been resolved. On the round-trip spike branch (in the internal repo) the issue was fixed by adding two lines of code, to serialize the state of the LUT and its dependent table object, using:
self._object_manager.UpdateStatesFromObjects( [self._object_manager.GetId(lut)] )and
_tbl = lut.GetTable() self._object_manager.UpdateStatesFromObjects( [self._object_manager.GetId(_tbl)] )Note:
local_view.update()contains bothUpdateStatesFromObjectsand ajs_callto push the serialized state to the client. Here, we only apply the serialize step at this point, so that when the server state is flushed to the client later, it has the LUT and table serialized correctly.Two main pieces of work here:
- Move variable ownership itself to the backend. Currently the client aggregates the data arrays across all parts in the scene, defines the application's 'variables' as unique triplets of dataArray name, type (field association POINT or CELL) and number of components, and assigns the IDs. This will move to the server in this user story.
- Making the variable ranges and component application server-authoritative.
As a first step in this user story, will consolidate the naming between frontend and backend. Currently the server uses the name 'variable' and the frontend uses 'spectrum'. Since the product naming has used 'variable', will update the frontend to use that naming as well.
Update:
The cleanup pass to align the variable naming across frontend and backend has been approved and merged #150.
Server-authoritative variables and their associated states have been implemented and tested in these two PRs, which will be ready for review once :
One substantive PRs is still pending for this user story:
- [work done, needs PR] Attach a fixed LUT to each dataset part on the server, and remove its creation from the client
Two smaller PRs will be added to clean up loose ends around this work:
- [pre-existing small bug] Fix pre-existing issue switching to a scalar component after coloring by a vector component (rather than magnitude)
- [simple cleanup] Two cleanups: Remove round trip on save_state (now that all state is server-authoritative); and remove client-side re-application of cached state in App.tsx in
onServerUpdateAsync
馃摑 Description of the feature
Intent: The lookup table backing each color variable, the color mapping itself rather than a part's reference to it, becomes server-owned. This is the last piece of the state to invert.
Context: Story 3.1 makes each part's reference server-authoritative: which color variable it uses, which component, over what range. the lookup table that reference resolves against still lives client-side on the wasm path, so the server cannot reconstruct what a scene actually looks like, and a user-modiifed color mapping is lost on reload.
RuntimeAppStatereserves a slot for this; this story fills it.Also move component selection from the mapper to the lookup table (
SelectColorArray(name)plusVectorMode/VectorComponent), which is required for magnitude coloring of vector variables. The serialized reference can stay as it is, sincecomponent: -1already means magnitude, but decide whether to keep that sentinel or mirror VTK's two-field shape.Known risk: the lookup table sync issue: On the round-trip spike branch, the LUT state failed to reach the renderer correctly: the framework's client-side cache applied a stale snapshot instead of the state the server delivered. It was diagnosed as a framework-level issue, with no viable local workaround, and has not been retested since.
What kept this from being an issue on
mainis that the client rebuilds its own LUT on every color change, which creates a fresh object (and object ID) every time, and the framework's stale cache is keyed on object ID. This story removes that, so this is the story that creates that condition; it is therefore expected here. See the first comment below for more details on diagnosing the issue.If we do encounter a similar issue in this user story, it can be deferred until 6.2 [to add link to user story once it's created] - where we retest after bumping the vtk-wasm and trame-vtklocal versions to be current (we are currently a major version behind on both dependencies). Defer by leaving the client owning its own LUT on the wasm path, which is what
maindoes today. The spike branch tried making the server own the LUT state and adding a client-side reapply to compensate; this did not reliably work, so is not a recommended stop-gap.The remote rendering work that follows in Phase 4 and Phase 5 is not dependent on the present user story.
Acceptance Criteria
馃挼 Business Value
No response
馃敆 Useful links and references
No response