Preserve dataflow layout across SQL edits

This commit is contained in:
2026-07-28 18:36:09 +02:00
parent 74f1210a32
commit e54225a86e
8 changed files with 331 additions and 19 deletions
+6 -1
View File
@@ -397,7 +397,12 @@ export default function DataflowPage({ settings, auth }: { settings: ApiSettings
sqlText: response.sql_text ?? draft.sqlText,
editorMode: switchToGraph ? "graph" : "sql"
});
setSelectedNodeId(response.graph.nodes[0]?.id ?? null);
setSelectedNodeId(
selectedNodeId
&& response.graph.nodes.some((node) => node.id === selectedNodeId)
? selectedNodeId
: response.graph.nodes[0]?.id ?? null
);
setSuccess("SQL compiled into the pipeline graph.");
return true;
} catch (compileError) {
+1 -2
View File
@@ -66,8 +66,7 @@
.dataflow-toolbar-actions,
.dataflow-command-bar,
.dataflow-identity-fields,
.dataflow-results-toolbar .segmented-control {
.dataflow-identity-fields {
display: flex;
align-items: center;
gap: 7px;