fix: the flow drawer's head is the version its payload came from, and its callback type says so

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-09-15 09:34:03 +02:00
co-authored by Claude Opus 5
parent f5c97aae13
commit 9237a93783
2 changed files with 5 additions and 4 deletions
@@ -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!,
+4 -3
View File
@@ -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<void>
/** 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<void>
pathStoreInit?: string | undefined
newFlow: boolean
selectedId: string | undefined