Skip to content

feat: Remote rendering 3.1a - add per-part write path to the dataset registry - #50

Merged
LKasianAnsys merged 5 commits into
mainfrom
feat/3.1a-registry-per-part-write-path
Sep 1, 2026
Merged

LKasianAnsys merged 5 commits into
mainfrom
feat/3.1a-registry-per-part-write-path

Conversation

@LKasianAnsys

@LKasianAnsys LKasianAnsys commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

Issue

Addresses #18

Context

This is the first of 5 PRs for user story 3.1 (#18) of the phased implementation plan (here) for adding remote rendering in VISOR.

Per-part visual state (visibility, opacity, diffuse color, color variable), is currently held client-side on VisorPartState and reaches the server only via getAppStateAsync when the save_state API is called. This story inverts that, making VisorDatasetRegistry the source of truth for per-part state by the end of 3.1. This PR is the first step: adding registry-side storage and a write path, with no callers yet. The VTK operations that apply the state land in PR 2, the trigger handlers in PR 3, the client-initiated triggers in PR 4, and save/load state in PR 5.

Notes:

  • The per-part visual state lives on the dataset registry, alongside the rest of the per-part metadata get_scene_details builds its payload from.
  • When calling the setters (set_part_visibility, set_part_opacity, etc), if a part record is not found, one is created.

Summary

This pull request adds a new per-part write path to the VisorDatasetRegistry, enabling fine-grained control and mutation of individual part states within datasets at runtime. It introduces a set of methods for getting and setting properties (such as visibility, opacity, color, and selection) on a per-part basis, along with unit tests to ensure correct behavior. The changes also clarify the distinction between name-keyed and id-keyed state management paths.

Per-part state management enhancements:

  • Added multiple methods to VisorDatasetRegistry for per-part state mutation and retrieval, including set_part_visibility, set_part_opacity, set_part_diffuse_color, set_part_selected, set_part_color_variable, clear_part_color_variable, and replace_part_states. These methods allow direct manipulation of runtime state for individual parts, with robust handling for unknown part IDs and upsert logic for missing state records.
  • Introduced find_dataset_id_for_part and get_part_state methods to locate the owning dataset for a part and retrieve its current state, supporting the new per-part write path.

Tests:

  • Added a suite of unit tests to cover all new per-part write path methods, including edge cases for unknown parts, upsert behavior, and atomic state updates. Also introduced a make_part_dataset helper for building test datasets with real runtime state. [1] [2]

@github-actions github-actions Bot added test Work associated with testing added enhancement New feature or request labels Aug 28, 2026
@LKasianAnsys LKasianAnsys changed the title add per-part write path to the dataset registry feat: Remote rendering 3.1 - add per-part write path to the dataset registry Aug 28, 2026
@LKasianAnsys LKasianAnsys self-assigned this Aug 28, 2026
@LKasianAnsys LKasianAnsys changed the title feat: Remote rendering 3.1 - add per-part write path to the dataset registry feat: Remote rendering 3.1a - add per-part write path to the dataset registry Aug 28, 2026
@LKasianAnsys
LKasianAnsys force-pushed the feat/3.1a-registry-per-part-write-path branch from 029c950 to ff688aa Compare August 31, 2026 15:29
@LKasianAnsys
LKasianAnsys marked this pull request as ready for review August 31, 2026 16:37
@margalva
margalva self-requested a review September 1, 2026 19:51
@LKasianAnsys
LKasianAnsys merged commit 874d7cb into main Sep 1, 2026
15 checks passed
@LKasianAnsys
LKasianAnsys deleted the feat/3.1a-registry-per-part-write-path branch September 1, 2026 21:42
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.

3 participants