diff --git a/frontend/src/lib/components/ScriptBuilder.svelte b/frontend/src/lib/components/ScriptBuilder.svelte index c05a69d1d9..a26c0a8cc9 100644 --- a/frontend/src/lib/components/ScriptBuilder.svelte +++ b/frontend/src/lib/components/ScriptBuilder.svelte @@ -559,10 +559,13 @@ try { if (initialPath && initialPath != '') { + // The row's path, not `initialPath`: that is the typed path, where a + // staged rename has nothing deployed, and a missing head would deploy + // on a base that already has a child. actual_parent_hash = ( await ScriptService.getScriptLatestVersion({ workspace: opWorkspace!, - path: initialPath + path: userDraftPath || initialPath }) )?.script_hash } diff --git a/frontend/src/lib/components/common/confirmationModal/StaleDraftModal.svelte b/frontend/src/lib/components/common/confirmationModal/StaleDraftModal.svelte index bf1b3f4c0a..9f4939eb2b 100644 --- a/frontend/src/lib/components/common/confirmationModal/StaleDraftModal.svelte +++ b/frontend/src/lib/components/common/confirmationModal/StaleDraftModal.svelte @@ -58,7 +58,7 @@ // Scripts are versioned by hash, the other kinds by a numeric version id; // the diff picker renders them the same way. function formatVersion(v: string): string { - return itemKind === 'script' ? v.slice(0, 8) : `v${v}` + return itemKind === 'script' ? v.slice(0, 8) : v } async function loadLatestDeploy() {