Repository navigation
fix(ui): automatically update component editability on connection and deletion changes - #143
Merged
Koyandechirag merged 1 commit intoNov 13, 2026
Conversation
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.
Fixes an issue where components connected downstream of another component remained disabled/read-only even after the upstream component or connection line was deleted following a
simulation.
With this change, component editability dynamically reflects the live graph connection state on the canvas:
previously executed.
Key Changes
Centralized Editability Synchronization (
Container.update_components_editability):update_components_editability()to evaluate every component's incoming connection state on the canvas.MaterialStream, callsdisableInputDataTabwhen fed by an upstream unit, andenableInputDataTabwhen it has no upstream feed.set_read_only(False)).Triggering on Canvas State Changes:
Container.delete): Triggersupdate_components_editability()immediately after removing deleted nodes and lines from the scene.Graphics.mouseReleaseEvent): Recalculates editability as soon as an inlet or outlet line is connected.Graphics.load_canvas_from_snapshot): Recalculates editability after rebuilding components and lines.Graphics.update_input_ports,update_output_ports): Recalculates editability when ports are modified.Container._populate_results): Updates editability preserving connection-based restrictions across all components without permanently lockingdisconnected units.
Stream State Controls (
Streams.enableInputDataTab&Streams.disableInputDataTab):enableInputDataTab()to safely re-enable the flash mode combo box, P/T/flow line edits, composition mole fractions (x_pclist), thermodynamic package dropdown,and Submit button.
disableInputDataTab()with safe attribute checks.Automated Unit Tests (
TestDynamicComponentEditabilityintests/test_container.py):MS1, MS2 -> Mixer -> MS3simulated,Mixerdeleted,MS3verified editable immediately).