diff --git a/frontend/src/lib/components/FlowPreviewContent.svelte b/frontend/src/lib/components/FlowPreviewContent.svelte index 30edf25691..448e6e89b4 100644 --- a/frontend/src/lib/components/FlowPreviewContent.svelte +++ b/frontend/src/lib/components/FlowPreviewContent.svelte @@ -187,7 +187,7 @@ `path` in module.value ? module.value.path : ($initialPathStore == '' ? $pathStore : $initialPathStore) + '/' + module.id, - jobKinds: ['preview', 'script', 'flowpreview', 'flow'].join(','), + jobKinds: ['preview', 'script', 'flowpreview', 'flow', 'flowscript'].join(','), page: 1, perPage: 1 }) diff --git a/frontend/src/lib/components/flows/map/FlowModuleSchemaItem.svelte b/frontend/src/lib/components/flows/map/FlowModuleSchemaItem.svelte index 84f59161da..745b312a7b 100644 --- a/frontend/src/lib/components/flows/map/FlowModuleSchemaItem.svelte +++ b/frontend/src/lib/components/flows/map/FlowModuleSchemaItem.svelte @@ -338,6 +338,8 @@ {loopStatus} rightMargin bind:derivedHistoryOpen={historyOpen} + historyOffset={{ mainAxis: 12, crossAxis: -9 }} + class="p-1" /> {/if} diff --git a/frontend/src/lib/components/flows/map/VirtualItem.svelte b/frontend/src/lib/components/flows/map/VirtualItem.svelte index 909a02a120..5d61c842bc 100644 --- a/frontend/src/lib/components/flows/map/VirtualItem.svelte +++ b/frontend/src/lib/components/flows/map/VirtualItem.svelte @@ -91,6 +91,8 @@ hideHeaderBar simpleViewer={inputJson} rightMargin + historyOffset={{ mainAxis: 12, crossAxis: -9 }} + class="p-1" /> {/if} diff --git a/frontend/src/lib/components/flows/propPicker/OutputPickerInner.svelte b/frontend/src/lib/components/flows/propPicker/OutputPickerInner.svelte index 4b820e08f9..7f3bdc3b16 100644 --- a/frontend/src/lib/components/flows/propPicker/OutputPickerInner.svelte +++ b/frontend/src/lib/components/flows/propPicker/OutputPickerInner.svelte @@ -57,6 +57,7 @@ export let disableMock: boolean = false export let disableHistory: boolean = false export let derivedHistoryOpen: boolean = false // derived from historyOpen + export let historyOffset = { mainAxis: 8, crossAxis: -4.5 } type SelectedJob = | Job @@ -211,7 +212,7 @@
@@ -234,8 +235,9 @@ { + isLoading = true + }, 200) + + try { + const fullJob = await detail.getFullJob() + if (fullJob) { + selectJob(fullJob) + togglePreview('job') + } + } finally { + // Clear the timeout if operation completed before 200ms + clearTimeout(loadingTimeout) + isLoading = false } - isLoading = false }} mockValue={mock?.return_value} mockEnabled={mock?.enabled} @@ -540,20 +556,20 @@ { - if (mock?.enabled) { - const newMock = { - enabled: true, - return_value: structuredClone(detail) + on:changeValue={({ detail }) => { + if (mock?.enabled) { + const newMock = { + enabled: true, + return_value: structuredClone(detail) + } + tmpMock = newMock } - tmpMock = newMock - } - }} - code={JSON.stringify( - mock?.enabled && mock.return_value ? mock.return_value : '', - null, - 2 - )} + }} + code={JSON.stringify( + mock?.enabled && mock.return_value ? mock.return_value : '', + null, + 2 + )} class="h-full" /> {/await} diff --git a/frontend/src/lib/components/flows/propPicker/StepHistory.svelte b/frontend/src/lib/components/flows/propPicker/StepHistory.svelte index 1fb5448801..c94876d343 100644 --- a/frontend/src/lib/components/flows/propPicker/StepHistory.svelte +++ b/frontend/src/lib/components/flows/propPicker/StepHistory.svelte @@ -27,7 +27,7 @@ const previousJobs = await JobService.listCompletedJobs({ workspace: $workspaceStore!, scriptPathExact: path === '' ? $pathStore + '/' + moduleId : path, - jobKinds: ['preview', 'script', 'flowpreview', 'flow'].join(','), + jobKinds: ['preview', 'script', 'flowpreview', 'flow', 'flowscript'].join(','), page, perPage })