diff --git a/frontend/src/lib/components/FlowBuilder.svelte b/frontend/src/lib/components/FlowBuilder.svelte index e69c61439c..78a1eaf47f 100644 --- a/frontend/src/lib/components/FlowBuilder.svelte +++ b/frontend/src/lib/components/FlowBuilder.svelte @@ -1176,7 +1176,7 @@ versions: await deployedVersionOptions(), onTakeLatest, draftBase: draftBaseVersion, - deployedHead: version != null ? String(version) : undefined, + deployedHead: deployedVersionShown != null ? String(deployedVersionShown) : undefined, loadVersion: async (id) => { const v = await FlowService.getFlowVersion({ workspace: opWorkspace!, diff --git a/frontend/src/lib/components/flow_builder.ts b/frontend/src/lib/components/flow_builder.ts index f9b8e64aa2..f763e92faa 100644 --- a/frontend/src/lib/components/flow_builder.ts +++ b/frontend/src/lib/components/flow_builder.ts @@ -14,9 +14,10 @@ export type FlowBuilderProps = { * draft's `draft_path` so the topbar shows the pending name, so it can't be used * to resolve what is actually deployed. */ userDraftPath?: string - /** Moves the draft's base to the deployed head and keeps its content; offered - * in the diff drawer while the draft is behind. */ - onTakeLatest?: () => void | Promise + /** Moves the draft's base to the head and keeps its content; offered in the diff + * drawer while the draft is behind, and called with the version the drawer shows + * as head. */ + onTakeLatest?: (head?: string) => void | Promise pathStoreInit?: string | undefined newFlow: boolean selectedId: string | undefined