fix(editors): use savedPath (deployed) as the pen-popover rename baseline

The topbar pen-popover path editor (EditorHeader, shared by flow/script/app/
raw-app) used `snapshotPath ?? path` as the Path widget's `initialPath`.
`snapshotPath` is the path captured when the popover opens (the *renamed* value
for a reopened rename draft) and exists only to freeze the breadcrumb while the
popover is open — it's the wrong rename baseline. Reverting a renamed draft to
its original path in the popover then tripped "path already used" (typed !=
stale baseline → existence check on the deployed path → match).

Use `savedPath` (the deployed/original path every caller already passes) as the
baseline instead; `snapshotPath` still drives the breadcrumb display only. New
items keep their reset-seeding behavior (savedPath is '' for them).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Diego Imbert
2026-06-22 10:34:35 +02:00
co-authored by Claude Opus 4.8
parent 8d9d98c616
commit 8ea764728d
@@ -201,7 +201,7 @@
<Path
autofocus
bind:path
initialPath={snapshotPath ?? path ?? ''}
initialPath={savedPath ?? path ?? ''}
namePlaceholder={kind}
{kind}
size="sm"