Skip to content

Make node preview no longer mutate the graph - #4588

Open
TrueDoctor wants to merge 11 commits into
masterfrom
previewing-view-state
Open

TrueDoctor wants to merge 11 commits into
masterfrom
previewing-view-state

Conversation

@TrueDoctor

Copy link
Copy Markdown
Member

No description provided.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 18 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread editor/src/messages/portfolio/document_migration.rs
Comment thread editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs Outdated
Comment thread editor/src/messages/portfolio/document/utility_types/network_interface/queries.rs Outdated
Comment thread editor/src/messages/portfolio/document/utility_types/network_interface/queries.rs Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 6 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread editor/src/messages/portfolio/document/utility_types/network_interface/queries.rs Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread editor/src/node_graph_executor/runtime.rs Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files (changes from recent commits).

Confidence score: 3/5

  • In editor/src/node_graph_executor/runtime.rs, monitor_inspect_node rewrites only output-0 edges, so previews of non-primary outputs can bypass the inspection monitor and show incomplete or incorrect inspection results — splice the monitor into the output selected for preview.
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/node_graph_executor/runtime.rs">

<violation number="1" location="editor/src/node_graph_executor/runtime.rs:240">
P2: A preview on a non-primary output still bypasses the inspection monitor: `monitor_inspect_node` rewrites only output-0 edges and connects its monitor to output 0. Make the monitor splice capture the previewed output index too, so the Data panel can read that preview.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

// Previews first, so the monitor below is spliced into the graph as it will be evaluated.
// Inserting it first would leave the preview pointing at the raw node, routing the export
// around the monitor and leaving the Data panel with nothing to read.
apply_previews(&mut network, &previewed);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: A preview on a non-primary output still bypasses the inspection monitor: monitor_inspect_node rewrites only output-0 edges and connects its monitor to output 0. Make the monitor splice capture the previewed output index too, so the Data panel can read that preview.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At editor/src/node_graph_executor/runtime.rs, line 240:

<comment>A preview on a non-primary output still bypasses the inspection monitor: `monitor_inspect_node` rewrites only output-0 edges and connects its monitor to output 0. Make the monitor splice capture the previewed output index too, so the Data panel can read that preview.</comment>

<file context>
@@ -234,9 +234,13 @@ impl NodeRuntime {
+					// Previews first, so the monitor below is spliced into the graph as it will be evaluated.
+					// Inserting it first would leave the preview pointing at the raw node, routing the export
+					// around the monitor and leaving the Data panel with nothing to read.
+					apply_previews(&mut network, &previewed);
+
 					// Insert the monitor node to manage the inspection
</file context>

This branch was successfully deployed

1 active deployment
graphite-dev (Preview) — bab430e9 Deployed Sep 24, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant