fix: close variable, resource and trigger editors during a move too

They keep their edits as drafts like the other editors, so an edit during
the move could save one in the workspace being left. Their state lives in
the draft, so closing them loses nothing; they reopen in the fork.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Guilhem Lemouel
2026-10-26 11:25:44 -07:00
co-authored by Claude Opus 5.5
parent e8a17f42c8
commit 2a420f6a4a
@@ -145,6 +145,12 @@
</p>
<Button variant="default" unifiedSize="sm" onClick={closeTab}>Close tab</Button>
</div>
{:else if permissions.moving}
<!-- Its edits are drafts, kept and shown again once the editor reopens in the fork. -->
<p class="p-4 text-sm text-secondary">
{pageItemKindLabel(item)} <span class="font-mono">{item.path}</span> reopens once the session has
moved to its fork.
</p>
{:else if permissions.readOnly}
<div class="flex flex-col items-start gap-3 p-4 text-sm text-secondary">
<p>