fix: closing the pipeline pane closes its modal instead of leaving it blank

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Diego Imbert
2026-10-01 15:15:41 +02:00
co-authored by Claude Opus 5.5
parent 9e5982769a
commit 346d977c39
3 changed files with 18 additions and 4 deletions
@@ -332,6 +332,11 @@
function openPanelModalFromGraph(e: MouseEvent) {
if (selectableNodeAt(e)) panelModalOpen = true
}
// A button in the pane that ends it closes the modal in the same update: left to
// the effect above, the modal would first render the pane without its selection.
function closePanelModal() {
if (panelMode === 'modal') panelModalOpen = false
}
function handleCanvasSelect(s: AssetGraphSelection | undefined, opts?: { open?: boolean }) {
onSelect(s)
if (opts?.open && s && panelMode === 'modal') panelModalOpen = true
@@ -714,8 +719,15 @@
onAssetsChange={editor.handleAssetsChange}
onContentChange={editor.handleContentChange}
onDraftPersist={editor.handleDraftPersist}
onclose={onClose}
onHide={onTogglePanelHidden}
onclose={() => {
closePanelModal()
onClose()
}}
onHide={onTogglePanelHidden &&
(() => {
closePanelModal()
onTogglePanelHidden()
})}
{onDiscard}
{onDraftSaved}
{onPersistedSaved}
@@ -509,7 +509,8 @@
eventLogEvents={activeRunnables.events}
onRunProducer={runProducer}
onRunByPath={(path, args) => runNode(path, args)}
inputsOnly={uploadInputsPath !== undefined && uploadInputsPath === pe.openScriptPath}
inputsOnly={uploadInputsPath !== undefined &&
(pe.openScriptPath === undefined || uploadInputsPath === pe.openScriptPath)}
onRunInputs={(path, args) => runNode(path, args)}
onShowScript={() => (uploadInputsPath = undefined)}
canRunByPath
@@ -3000,7 +3000,8 @@
readyDataUploadPaths={dataUploads.readyPaths}
runFormInitialArgs={openScriptPath ? dataUploads.argsFor(openScriptPath) : undefined}
onRunFormArgsChange={dataUploads.stage}
inputsOnly={uploadInputsPath !== undefined && uploadInputsPath === openScriptPath}
inputsOnly={uploadInputsPath !== undefined &&
(openScriptPath === undefined || uploadInputsPath === openScriptPath)}
onRunInputs={runUploadInputs}
onShowScript={() => (uploadInputsPath = undefined)}
onSelect={handleCanvasSelect}