Header of process and node ports follow each other both ways: a panel edit rewrites only the def line of edited code, a code save reads the header back into input ports and settings (draft and response); Space types in the node editor again

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
2026-10-15 18:19:19 +02:00
co-authored by Claude Opus 5.5
parent 92c562a7d5
commit 762e7fb1fe
15 changed files with 645 additions and 48 deletions
+7 -1
View File
@@ -172,6 +172,8 @@ export function useAutosave(name: string): {
flush: () => Promise<void>
conflict: boolean
resolveConflict: (mode: "theirs" | "mine") => Promise<void>
/** Take a version the server moved the draft to by itself. */
adopt: (next: number) => void
mutation: UseMutationResult<unknown, unknown, FlowDef_Input, unknown>
} {
const queryClient = useQueryClient()
@@ -283,5 +285,9 @@ export function useAutosave(name: string): {
}
}, [flush])
return { save, flush, conflict, resolveConflict, mutation }
const adopt = useCallback((next: number) => {
version.current = next
}, [])
return { save, flush, conflict, resolveConflict, adopt, mutation }
}