Improve the Data panel with type-specific detail pages and nested-layer support#4070
Improve the Data panel with type-specific detail pages and nested-layer support#4070
Conversation
…er to path_of_subgraph
There was a problem hiding this comment.
Code Review
This pull request transitions the editor:layer attribute from a single Option<NodeId> to a Table<NodeId> to support nested subgraphs. It introduces a Refresh message for the Data panel and enhances its layout system to correctly resolve node metadata and display names at any nesting depth. Additionally, the parent_layer node is renamed to path_of_subgraph, and the SetDisplayName message now includes a network_path. Feedback indicates that the newly implemented locking and visibility toggles in the Data panel also require network_path support to correctly target nested layers.
There was a problem hiding this comment.
1 issue found across 19 files
Confidence score: 4/5
- This PR looks safe to merge overall, with only a minor-to-moderate risk area called out (severity 4/10, high confidence).
- In
editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs,Refreshcan skip layout updates whenintrospected_dataisNone, so metadata-only changes may leave the Data panel stale for users. - The issue appears user-facing but limited in scope to Data panel refresh behavior rather than a broad functional break.
- Pay close attention to
editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs- ensureRefreshstill updates layout for metadata-only changes whenintrospected_datais absent.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs">
<violation number="1" location="editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs:56">
P2: `Refresh` incorrectly skips layout updates when `introspected_data` is `None`, so metadata-only changes can leave the Data panel stale.
(Based on your team's feedback about aligning behavior with comments and intended contracts.) [FEEDBACK_USED]</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
3 issues found across 5 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs">
<violation number="1" location="editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:1897">
P1: Lock/visibility toggles use `network_path`, but side effects still evaluate `connected_to_output` in `selection_network_path`, which can miss rerunning the graph for nested-network edits.</violation>
</file>
<file name="frontend/wrapper/src/editor_wrapper.rs">
<violation number="1" location="frontend/wrapper/src/editor_wrapper.rs:916">
P1: Hardcoding `network_path: Vec::new()` makes visibility toggles no-op for nodes in nested networks.</violation>
<violation number="2" location="frontend/wrapper/src/editor_wrapper.rs:937">
P1: Hardcoding `network_path: Vec::new()` breaks lock toggling for nodes outside the root network.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
…er support (#4070) * Improve the Data panel with more type-specific detail pages * Add network_path to SetDisplayName so renames target any network depth * Track nested layers via full editor:layer paths and rename parent_layer to path_of_subgraph * Polish the data panel NodeId leaf page with an editable name field * Make lock and visibility toggles work for layers in nested subgraphs * Fix formatting * Fix connected_to_output running in the wrong network for nested-layer toggles
…er support (GraphiteEditor#4070) * Improve the Data panel with more type-specific detail pages * Add network_path to SetDisplayName so renames target any network depth * Track nested layers via full editor:layer paths and rename parent_layer to path_of_subgraph * Polish the data panel NodeId leaf page with an editable name field * Make lock and visibility toggles work for layers in nested subgraphs * Fix formatting * Fix connected_to_output running in the wrong network for nested-layer toggles
Partly closes #3779.