fix: skip loading flow preview history for new flows (#8293)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Guilhem
2026-03-10 11:13:26 +01:00
committed by GitHub
parent cad44365ac
commit ac8c668cb9
2 changed files with 14 additions and 3 deletions
@@ -12,13 +12,15 @@
selected?: string | undefined
selectInitial?: boolean
loading?: boolean
newFlow?: boolean
}
let {
path,
selected = undefined,
selectInitial = false,
loading = $bindable(false)
loading = $bindable(false),
newFlow = false
}: Props = $props()
const dispatch = createEventDispatcher()
@@ -41,7 +43,9 @@
}
$effect(() => {
$workspaceStore && untrack(() => loadInitial())
if ($workspaceStore && !newFlow) {
untrack(() => loadInitial())
}
})
</script>
@@ -588,6 +588,7 @@
{/if}
<FlowHistoryJobPicker
selectInitial={jobId == undefined}
newFlow={$initialPathStore === ''}
on:select={(e) => {
if (!currentJobId) {
currentJobId = jobId
@@ -607,7 +608,9 @@
/>
</div>
<FlowProgressBar {job} bind:this={flowProgressBar} slim textPosition="bottom" showStepId />
{#if jobId}
<FlowProgressBar {job} bind:this={flowProgressBar} slim textPosition="bottom" showStepId />
{/if}
{#if job}
<div class="w-full my-6">
@@ -670,6 +673,10 @@
<div class="italic text-primary h-full grow mx-auto flex flex-row items-center gap-2">
<Loader2 class="animate-spin" /> <span> Loading history... </span>
</div>
{:else}
<div class="italic text-tertiary h-full grow mx-auto flex flex-row items-center">
Flow status will display here
</div>
{/if}
</div>
</div>