Show red connectors on a type-erroring node and accurate connector colors upstream of it (#3110)

* Refactor TypeSource

* Add complete valid types

* Add invalid type

* Improve valid/complete types and disconnecting

* Code review

* Return types on error

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Adam Gerhant
2025-11-18 19:00:32 -08:00
committed by GitHub
parent 7d739c4542
commit 06484ef4e0
19 changed files with 543 additions and 448 deletions

View File

@@ -37,7 +37,7 @@ pub struct ExecutionResponse {
#[derive(serde::Serialize, serde::Deserialize)]
pub struct CompilationResponse {
result: Result<ResolvedDocumentNodeTypesDelta, String>,
result: Result<ResolvedDocumentNodeTypesDelta, (ResolvedDocumentNodeTypesDelta, String)>,
node_graph_errors: GraphErrors,
}
@@ -371,7 +371,7 @@ impl NodeGraphExecutor {
NodeGraphUpdate::CompilationResponse(execution_response) => {
let CompilationResponse { node_graph_errors, result } = execution_response;
let type_delta = match result {
Err(e) => {
Err((incomplete_delta, e)) => {
// Clear the click targets while the graph is in an un-renderable state
document.network_interface.update_click_targets(HashMap::new());
@@ -380,7 +380,7 @@ impl NodeGraphExecutor {
log::trace!("{e}");
responses.add(NodeGraphMessage::UpdateTypes {
resolved_types: Default::default(),
resolved_types: incomplete_delta,
node_graph_errors,
});
responses.add(NodeGraphMessage::SendGraph);