diff --git a/frontend/src/lib/components/apps/components/helpers/InputValue.svelte b/frontend/src/lib/components/apps/components/helpers/InputValue.svelte index 996fcbea72..e599076792 100644 --- a/frontend/src/lib/components/apps/components/helpers/InputValue.svelte +++ b/frontend/src/lib/components/apps/components/helpers/InputValue.svelte @@ -316,10 +316,12 @@ } } - function onValueChange(newValue: any): void { + function onValueChange(newValue: any, force?: boolean): void { if (iterContext && $iterContext.disabled) return - - if (lastInput?.type === 'connected' && newValue !== undefined && newValue !== null) { + if ( + lastInput?.type === 'connected' && + ((newValue !== undefined && newValue !== null) || force) + ) { const { connection } = lastInput if (!connection) { // No connection diff --git a/frontend/src/lib/components/apps/rx.ts b/frontend/src/lib/components/apps/rx.ts index 16b795817a..f958956b91 100644 --- a/frontend/src/lib/components/apps/rx.ts +++ b/frontend/src/lib/components/apps/rx.ts @@ -4,7 +4,7 @@ import { deepEqual } from 'fast-equals' import sum from 'hash-sum' export interface Subscriber { id?: string - next(v: T): void + next(v: T, force?: boolean): void } export interface Observable { @@ -23,7 +23,7 @@ export type World = { outputsById: Record>> connect: ( connection: InputConnectionEval, - next: (x: T) => void, + next: (x: T, force?: boolean) => void, id: string, previousValue: any ) => Input @@ -79,7 +79,7 @@ export function buildObservableWorld() { return { id, peak: () => undefined, - next: () => {} + next: () => { } } } @@ -95,7 +95,7 @@ export function buildObservableWorld() { } return { peak: () => undefined, - next: () => {} + next: () => { } } } @@ -119,16 +119,16 @@ export function buildObservableWorld() { newOutput } } -export function cachedInput(nextParan: (x: T) => void, id?: string): Input { +export function cachedInput(nextParam: (x: T, force?: boolean) => void, id?: string): Input { let value: T | undefined = undefined function peak(): T | undefined { return value } - function next(x: T): void { + function next(x: T, force?: boolean): void { value = x - nextParan(x) + nextParam(x, force) } return { @@ -152,7 +152,7 @@ export function settableOutput(state: Writable, previousValue: T): Ou // Send the current value to the new subscriber if it already exists if (value !== undefined && !deepEqual(value, npreviousValue)) { - x.next(value) + x.next(value, false) } // return a callback to unsubscribe @@ -180,7 +180,7 @@ export function settableOutput(state: Writable, previousValue: T): Ou } else { value = x } - subscribers.forEach((x) => x.next(value!)) + subscribers.forEach((x) => x.next(value!, force)) } } diff --git a/frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte b/frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte index f1c1bd2578..fc05ff7acf 100644 --- a/frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte @@ -89,7 +89,7 @@ let maxTs = $page.url.searchParams.get('max_ts') ?? undefined let schedulePath = $page.url.searchParams.get('schedule_path') ?? undefined let jobKindsCat = $page.url.searchParams.get('job_kinds') ?? 'runs' - let allWorkspaces = $page.url.searchParams.get('all_workspaces') == 'true' ?? false + let allWorkspaces = $page.url.searchParams.get('all_workspaces') == 'true' let lastFetchWentToEnd = false function loadFromQuery() { @@ -135,7 +135,7 @@ maxTs = $page.url.searchParams.get('max_ts') ?? undefined schedulePath = $page.url.searchParams.get('schedule_path') ?? undefined jobKindsCat = $page.url.searchParams.get('job_kinds') ?? 'runs' - allWorkspaces = $page.url.searchParams.get('all_workspaces') == 'true' ?? false + allWorkspaces = $page.url.searchParams.get('all_workspaces') == 'true' } let queue_count: Tweened | undefined = undefined @@ -639,13 +639,12 @@ }} /> -{#if $userStore?.operator && $workspaceStore && !$userWorkspaces.find(_ => _.id === $workspaceStore)?.operator_settings?.runs} - -{:else} -{#if innerWidth > 900} +{#if $userStore?.operator && $workspaceStore && !$userWorkspaces.find((_) => _.id === $workspaceStore)?.operator_settings?.runs} + +{:else if innerWidth > 900}
@@ -1377,4 +1376,3 @@
{/if} -{/if}