From 8c3851e70160cc9e1a1ee48c49ae8c860149d44a Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Thu, 29 Oct 2026 02:08:43 +0000 Subject: [PATCH 1/2] fix(agent): wait for startup tab restore before calling a draft target unavailable (PM-2332) (#22048) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit *PR Created by the Glary-Bot Agent* --- Fixes [PM-2332](https://linear.app/comfyorg/issue/PM-2332). If you refresh while the Agent's target is still an **unsaved** draft, the chat can show "The target workflow is no longer available". The draft hasn't been deleted when this happens. On reload, `resolveRestorationTarget` (`useAgentWorkflowSelection.ts`) decides whether the chat's target still exists: - The cloud listing hides version-less drafts (`latest_version_id IS NULL`, see cloud `common/workflow/repository.go`), so an unsaved Agent draft is always missing from it. - #19873 counts a complete listing that omits the id as proof of deletion **when no local tab owns the id**. It only calls `GET /api/workflows/{id}` when a local tab does own it. That endpoint returns 200 with `latest_version: 0` for drafts. - After a refresh, the only local owner an unsaved draft has is the tab that startup recreates from the local draft store. That happens in `restoreWorkflowTabsState`, called by GraphCanvas after `app.setup()` and `initializeWorkflow()`. - The Agent panel mounts once the app is ready (and from LinearView). It starts hydrating the thread at the same time as the rest of GraphCanvas startup, and nothing orders the two. If the chat restores before startup recreates the draft tab, it sees no owner and marks the target `unavailable`. That state never recovers, even once the tab shows up a moment later. Saved workflows aren't affected, because the listing includes them. - `workflowStore` gets `tabsRestored` and `markTabsRestored()`. `restoreWorkflowTabsState` sets the flag in a `finally`, so it's set however restore ends: success, persistence disabled, load failure, or identity mismatch. GraphCanvas's `finally` also sets it if `initializeWorkflow()` rejects. - `resolveRestorationTarget`: when nothing local owns the id **and** startup hasn't restored tabs yet, it waits for `tabsRestored` plus one tick (`startupTabsRestored`), which lets the binding store adopt the recreated tab. This applies whatever the listing returned (complete, incomplete, or failed), so an incomplete or failed listing no longer opens a null target before the draft tab is back. - The wait is capped at `STARTUP_TAB_RESTORE_TIMEOUT_MS` (15s) so a startup that hangs can't leave the chat restoring forever. - After the wait (and on the fast path) it re-checks `isCurrent()` and looks up the owner again. If the draft tab came back, the existing `GET /api/workflows/{id}` lifecycle check runs. If no tab came back, or the cap was hit, it is treated as `deleted`, the same as on `main`. The wait only runs while startup is still restoring tabs and the target has no local tab. Restores later in the session never wait. - **New:** `PM-2332 waits for a page reload to restore the unsaved draft tab before calling the chat target unavailable`. - Setup: binds a draft for real, then simulates the reload: disposes the binding store so it re-reads persisted bindings, closes the pre-reload tab, and starts restoration before startup recreates the draft tab. - Against `main`'s selection logic it fails: `targetUnavailable` is `true` before the tab is restored. With this change it passes. - **New:** `still calls the target unavailable once a reload restores no tab for it`. Restoration waits, tab restore settles without the draft, and the result is still `deleted`. It also fails against `main`'s selection logic. - **New:** `calls the target unavailable when startup never finishes restoring tabs`. The flag is never set; with fake timers the target is still undecided at 14s and is marked unavailable at 15s. Without the cap, this test times out. - **New:** `waits for the reloaded draft tab even when the listing is incomplete`. Also asserts nothing is synced or warned before the tab comes back. Fails without the change. - `useWorkflowPersistenceV2.test.ts` now asserts the flag is set after a successful restore and after a metadata failure. - The existing harnesses (`setup()` in the selection test, and the root `beforeEach` in `AgentPanelRoot.test.ts`) model a page that has finished startup, so they call `markTabsRestored()`. - Agent composables, `AgentPanelRoot`, workflow persistence and workflow management suites: 1451 passed. - Pre-commit (oxfmt, oxlint, eslint, `typecheck:app`) and pre-push (depcruise, knip, `fallow audit`) hooks pass. - `agentSubgraphDefinitions.test.ts > scans deeply nested definition ids…` (a stack overflow in `lib0` `deepFreeze`) also fails on clean `main`. It is unrelated. - **Browser check:** a local cloud-mode Playwright run (mocked cloud host) where the Agent opens an unsaved draft tab via `agent_active_tab`, followed by a reload. The chat comes back onto the same draft tab with no unavailable notice (screenshot below). I also ran the unsaved-tab (minted draft) flow, with and without a second unsaved tab open. - In that local harness, startup restore finished about 0.5s before the panel hydrated, so `main` also passed there. The race needs startup to be slower than the panel's network round trips. That's why the regression guard is the unit test, not an e2e spec. - After a reload, the unavailable notice for a **truly deleted** target now appears only once startup tab restore finishes, a few hundred ms later. If startup hangs, it appears after the 15s cap. - Not covered here: - If the listing request fails **and** no draft tab comes back, a draft target still gets the "couldn't open" warning. - If startup fails before restoring tabs, or hits the 15s cap, a missing draft is still reported unavailable (same as `main`). - If the local draft is gone (evicted, localStorage quota exceeded, tab closed), the target is still reported unavailable. The server still has the draft (`GET` → 200) and its CRDT document, so a follow-up could rebuild the tab from the server instead. All three are tracked in [FRONT-3665](https://linear.app/comfyorg/issue/FRONT-3665). ![After reload: chat restored onto the unsaved 'Agent draft' tab, no 'target workflow is no longer available' notice](https://pub-1fd11710d4c8405b948c9edc4287a3f2.r2.dev/sessions/ac75176fab1dbe6d4b839cb463ad17df26623523e8a1fec7c0c962938a589ee3/pr-images/1793072335569-4b66c095-4026-4a86-99f7-3583b4295b57.png) --------- Co-authored-by: Glary-Bot (cherry picked from commit dbbd7bb0ff80419144eae30453839a8d383d6c70) --- src/components/graph/GraphCanvas.test.ts | 19 ++- src/components/graph/GraphCanvas.vue | 1 + .../management/stores/workflowStore.ts | 7 + .../management/stores/workflowStoreTypes.ts | 9 ++ .../useWorkflowPersistenceV2.test.ts | 4 + .../composables/useWorkflowPersistenceV2.ts | 8 + .../extensions/agent/AgentPanelRoot.test.ts | 1 + .../agent/useAgentWorkflowSelection.test.ts | 148 +++++++++++++++++- .../agent/useAgentWorkflowSelection.ts | 35 ++++- 9 files changed, 221 insertions(+), 11 deletions(-) diff --git a/src/components/graph/GraphCanvas.test.ts b/src/components/graph/GraphCanvas.test.ts index 788108ea2e3..f3217a47f07 100644 --- a/src/components/graph/GraphCanvas.test.ts +++ b/src/components/graph/GraphCanvas.test.ts @@ -219,7 +219,10 @@ function setRootGraph(graph: LGraph | undefined) { ;(app as unknown as { rootGraph: LGraph | undefined }).rootGraph = graph } -async function mountGraphCanvas(stubs: Record = {}) { +async function mountGraphCanvas( + stubs: Record = {}, + errorHandler?: (error: unknown) => void +) { // Handed to the component rather than left to the active-Pinia fallback, so // the readiness gates below are set on the instance startup actually reads. const pinia = getActivePinia()! @@ -241,7 +244,8 @@ async function mountGraphCanvas(stubs: Record = {}) { pinia, createI18n({ legacy: false, locale: 'en', missingWarn: false }) ], - stubs + stubs, + config: errorHandler ? { errorHandler } : {} } } as RenderOptions) @@ -273,6 +277,17 @@ describe('GraphCanvas first-run tour wiring', () => { ).toBeGreaterThan(mocks.handleStartupOutcome.mock.invocationCallOrder[0]) }) + it('settles tab restoration when startup fails before restoring tabs', async () => { + const failure = new Error('init failed') + mocks.initializeWorkflow.mockRejectedValue(failure) + const errors: unknown[] = [] + + await mountGraphCanvas({}, (error) => errors.push(error)) + + expect(errors).toEqual([failure]) + expect(useWorkflowStore().tabsRestored).toBe(true) + }) + it('offers the tour over a workflow that arrived from the URL', async () => { await mountGraphCanvas() diff --git a/src/components/graph/GraphCanvas.vue b/src/components/graph/GraphCanvas.vue index b459d413b82..60ced0fbfd7 100644 --- a/src/components/graph/GraphCanvas.vue +++ b/src/components/graph/GraphCanvas.vue @@ -636,6 +636,7 @@ onMounted(async () => { bootstrapOutcome = 'completed' } finally { if (!disposed) { + workflowStore.markTabsRestored() finishStartup(bootstrapOutcome) } } diff --git a/src/platform/workflow/management/stores/workflowStore.ts b/src/platform/workflow/management/stores/workflowStore.ts index aa4bd9a621f..0e3afe4ab5e 100644 --- a/src/platform/workflow/management/stores/workflowStore.ts +++ b/src/platform/workflow/management/stores/workflowStore.ts @@ -563,6 +563,11 @@ export const useWorkflowStore = defineStore('workflow', () => { } } + const tabsRestored = ref(false) + const markTabsRestored = () => { + tabsRestored.value = true + } + /** @see WorkflowStore.isSubgraphActive */ const isSubgraphActive = ref(false) @@ -757,6 +762,8 @@ export const useWorkflowStore = defineStore('workflow', () => { isSyncLoading, loadWorkflows, + tabsRestored: computed(() => tabsRestored.value), + markTabsRestored, isSubgraphActive, activeSubgraph, updateActiveGraph, diff --git a/src/platform/workflow/management/stores/workflowStoreTypes.ts b/src/platform/workflow/management/stores/workflowStoreTypes.ts index 6f3ba0b40de..639afa33093 100644 --- a/src/platform/workflow/management/stores/workflowStoreTypes.ts +++ b/src/platform/workflow/management/stores/workflowStoreTypes.ts @@ -43,6 +43,15 @@ export interface WorkflowStore { loadWorkflows: () => Promise reorderWorkflows: (from: number, to: number) => void + /** + * `true` once startup has finished restoring the previous session's open + * tabs, including unsaved drafts recreated from local storage. Until then, + * a workflow with no open tab may simply not have been restored yet. + */ + tabsRestored: boolean + /** Called once startup tab restoration settles, including when startup fails first. */ + markTabsRestored: () => void + /** `true` if any subgraph is currently being viewed. */ isSubgraphActive: boolean activeSubgraph: Subgraph | undefined diff --git a/src/platform/workflow/persistence/composables/useWorkflowPersistenceV2.test.ts b/src/platform/workflow/persistence/composables/useWorkflowPersistenceV2.test.ts index 9aeaa984963..e8e9f1f8181 100644 --- a/src/platform/workflow/persistence/composables/useWorkflowPersistenceV2.test.ts +++ b/src/platform/workflow/persistence/composables/useWorkflowPersistenceV2.test.ts @@ -398,10 +398,13 @@ describe('useWorkflowPersistenceV2', () => { expect(loadWorkflowsSpy).toHaveBeenCalledOnce() expect(openWorkflowMock).not.toHaveBeenCalled() + expect(workflowStore.tabsRestored).toBe(false) + gate.resolve() await pending expect(openWorkflowMock).toHaveBeenCalledWith(workflowB) + expect(workflowStore.tabsRestored).toBe(true) }) it('falls back to the default workflow when metadata loading fails', async () => { @@ -416,6 +419,7 @@ describe('useWorkflowPersistenceV2', () => { expect(loadBlankWorkflowMock).toHaveBeenCalled() expect(openWorkflowMock).not.toHaveBeenCalled() + expect(workflowStore.tabsRestored).toBe(true) }) it('activates the correct workflow at storedActiveIndex', async () => { diff --git a/src/platform/workflow/persistence/composables/useWorkflowPersistenceV2.ts b/src/platform/workflow/persistence/composables/useWorkflowPersistenceV2.ts index f20c497616f..ec0d835379d 100644 --- a/src/platform/workflow/persistence/composables/useWorkflowPersistenceV2.ts +++ b/src/platform/workflow/persistence/composables/useWorkflowPersistenceV2.ts @@ -360,6 +360,14 @@ export function useWorkflowPersistenceV2() { * GraphCanvas must call this during startup when workflow persistence is enabled. */ const restoreWorkflowTabsState = async () => { + try { + await restoreSavedTabs() + } finally { + workflowStore.markTabsRestored() + } + } + + const restoreSavedTabs = async () => { if (!workflowPersistenceEnabled.value) { tabStateRestored = true return diff --git a/src/workbench/extensions/agent/AgentPanelRoot.test.ts b/src/workbench/extensions/agent/AgentPanelRoot.test.ts index be58c5438ed..4aee4cd7512 100644 --- a/src/workbench/extensions/agent/AgentPanelRoot.test.ts +++ b/src/workbench/extensions/agent/AgentPanelRoot.test.ts @@ -305,6 +305,7 @@ function syncFakeSelection() { } beforeEach(() => { + useWorkflowStore().markTabsRestored() let clientMessageIds = 0 nextClientMessageId.mockImplementation( () => `client-message-${++clientMessageIds}` diff --git a/src/workbench/extensions/agent/composables/agent/useAgentWorkflowSelection.test.ts b/src/workbench/extensions/agent/composables/agent/useAgentWorkflowSelection.test.ts index 9b7c7b5d0dc..2106096a661 100644 --- a/src/workbench/extensions/agent/composables/agent/useAgentWorkflowSelection.test.ts +++ b/src/workbench/extensions/agent/composables/agent/useAgentWorkflowSelection.test.ts @@ -1,11 +1,13 @@ import { render, waitFor } from '@testing-library/vue' import type { WorkflowResponse } from '@comfyorg/ingest-types' +import { getActivePinia } from 'pinia' import { assert, beforeEach, describe, expect, it, vi } from 'vitest' -import { defineComponent } from 'vue' +import { defineComponent, nextTick } from 'vue' import { i18n } from '@/i18n' import { useWorkflowService } from '@/platform/workflow/core/services/workflowService' import { useWorkflowStore } from '@/platform/workflow/management/stores/workflowStore' +import { blankGraph } from '@/scripts/defaultGraph' import { createMockLoadedWorkflow } from '@/utils/__tests__/litegraphTestUtils' import type { CloudWorkflowEntry } from '../../schemas/agentApiSchema' @@ -18,8 +20,9 @@ import { useAgentWorkflowSelection } from './useAgentWorkflowSelection' vi.mock(import('@/platform/workflow/core/services/workflowService')) -function setup() { +function setup({ tabsRestored = true }: { tabsRestored?: boolean } = {}) { const workflows = useWorkflowStore() + if (tabsRestored) workflows.markTabsRestored() const bindings = useAgentWorkflowTabBindingStore() const panel = useAgentPanelStore() panel.beginWorkflowRestoration() @@ -654,6 +657,147 @@ describe('historical workflow restoration', () => { expect(warnRestoreFailed).not.toHaveBeenCalled() }) + const draftPath = 'workflows/Agent draft.json' + const draftGraphId = '3d4d7f1e-3c8b-4a0a-9a3c-1d2e3f4a5b6c' + + async function bindDraftThenReload(): Promise { + const beforeReload = useWorkflowStore() + const draft = beforeReload.createTemporary('Agent draft.json', { + ...blankGraph, + id: draftGraphId + }) + beforeReload.openWorkflowsInBackground({ right: [draft.path] }) + const bindingsBeforeReload = useAgentWorkflowTabBindingStore() + bindingsBeforeReload.bind('wf-draft', draft.path) + await nextTick() + bindingsBeforeReload.$dispose() + delete getActivePinia()?.state.value[bindingsBeforeReload.$id] + await beforeReload.closeWorkflow(draft) + } + + function restoreDraftTab(workflows: ReturnType) { + const restored = workflows.createTemporary('Agent draft.json', { + ...blankGraph, + id: draftGraphId + }) + workflows.openWorkflowsInBackground({ right: [restored.path] }) + workflows.markTabsRestored() + return restored + } + + it('PM-2332 waits for a page reload to restore the unsaved draft tab before calling the chat target unavailable', async () => { + await bindDraftThenReload() + const { + selection, + workflows, + panel, + listCloudWorkflows, + getCloudWorkflow, + warnRestoreFailed + } = setup({ tabsRestored: false }) + + const restoration = selection.restoreTarget('wf-draft', () => true) + await vi.waitFor(() => expect(listCloudWorkflows).toHaveBeenCalled()) + await new Promise((resolve) => setTimeout(resolve, 0)) + + expect(panel.targetUnavailable).toBe(false) + + const restored = restoreDraftTab(workflows) + + expect((await restoration).ready).toBe(true) + expect(restored.path).toBe(draftPath) + expect(getCloudWorkflow).toHaveBeenCalledWith('wf-draft') + expect(panel.targetUnavailable).toBe(false) + expect(panel.selectedWorkflow?.path).toBe(draftPath) + expect(workflows.activeWorkflow?.path).toBe(draftPath) + expect(warnRestoreFailed).not.toHaveBeenCalled() + }) + + it('waits for the reloaded draft tab even when the listing is incomplete', async () => { + await bindDraftThenReload() + const { + selection, + workflows, + panel, + listCloudWorkflows, + warnRestoreFailed + } = setup({ tabsRestored: false }) + listCloudWorkflows.mockImplementationOnce(async () => + listing([{ id: 'wf-saved', name: 'saved' }], false) + ) + + const restoration = selection.restoreTarget('wf-draft', () => true) + await vi.waitFor(() => expect(listCloudWorkflows).toHaveBeenCalled()) + await new Promise((resolve) => setTimeout(resolve, 0)) + expect(workflows.syncWorkflows).not.toHaveBeenCalled() + expect(warnRestoreFailed).not.toHaveBeenCalled() + + restoreDraftTab(workflows) + + expect(await restoration).toEqual({ + ready: true, + committedWorkflowId: 'wf-draft' + }) + expect(panel.selectedWorkflow?.path).toBe(draftPath) + expect(panel.targetUnavailable).toBe(false) + expect(warnRestoreFailed).not.toHaveBeenCalled() + }) + + it('calls the target unavailable when startup never finishes restoring tabs', async () => { + vi.useFakeTimers() + try { + const { selection, panel, listCloudWorkflows, getCloudWorkflow } = setup({ + tabsRestored: false + }) + let settled = false + const restoration = selection + .restoreTarget('wf-deleted', () => true) + .finally(() => { + settled = true + }) + await vi.waitFor(() => expect(listCloudWorkflows).toHaveBeenCalled()) + + await vi.advanceTimersByTimeAsync(14_000) + expect(settled).toBe(false) + expect(panel.targetUnavailable).toBe(false) + + await vi.advanceTimersByTimeAsync(1_000) + expect(settled).toBe(true) + expect(await restoration).toEqual({ + ready: true, + committedWorkflowId: null + }) + expect(panel.targetUnavailable).toBe(true) + expect(getCloudWorkflow).not.toHaveBeenCalled() + } finally { + vi.useRealTimers() + } + }) + + it('still calls the target unavailable once a reload restores no tab for it', async () => { + const { + selection, + panel, + getCloudWorkflow, + listCloudWorkflows, + workflows + } = setup({ tabsRestored: false }) + + const restoration = selection.restoreTarget('wf-deleted', () => true) + await vi.waitFor(() => expect(listCloudWorkflows).toHaveBeenCalled()) + await new Promise((resolve) => setTimeout(resolve, 0)) + expect(panel.targetUnavailable).toBe(false) + + workflows.markTabsRestored() + + expect(await restoration).toEqual({ + ready: true, + committedWorkflowId: null + }) + expect(panel.targetUnavailable).toBe(true) + expect(getCloudWorkflow).not.toHaveBeenCalled() + }) + it('does not mark a superseded restoration unavailable when its listing omits the workflow', async () => { const { selection, panel, current, listCloudWorkflows, warnRestoreFailed } = setup() diff --git a/src/workbench/extensions/agent/composables/agent/useAgentWorkflowSelection.ts b/src/workbench/extensions/agent/composables/agent/useAgentWorkflowSelection.ts index ea356acb7b6..86cd6be500a 100644 --- a/src/workbench/extensions/agent/composables/agent/useAgentWorkflowSelection.ts +++ b/src/workbench/extensions/agent/composables/agent/useAgentWorkflowSelection.ts @@ -1,5 +1,6 @@ +import { until } from '@vueuse/core' import { storeToRefs } from 'pinia' -import { computed, onScopeDispose, ref } from 'vue' +import { computed, nextTick, onScopeDispose, ref } from 'vue' import { useI18n } from 'vue-i18n' import { useToast } from '@/components/ui/toast/toastStore' @@ -25,6 +26,8 @@ type RestorationOutcome = | { outcome: 'deleted' } | { outcome: 'superseded' } +const STARTUP_TAB_RESTORE_TIMEOUT_MS = 15_000 + function restorationOutcomeFor( lifecycle: CloudWorkflowLifecycle, target: ComfyWorkflow | null @@ -243,17 +246,35 @@ export function useAgentWorkflowSelection({ ): Promise { const listed = await refreshCloudWorkflowIds() if (!isCurrent()) return { outcome: 'superseded' } - const target = - boundOrOpenWorkflowFor(workflowId) ?? storedWorkflowFor(workflowId) + let target = localOwnerFor(workflowId) + if (target === null) { + if (!(await startupTabsRestored(isCurrent))) + return { outcome: 'superseded' } + target = localOwnerFor(workflowId) + } if (!listed || !cloudListingOmits(workflowId)) return { outcome: 'open', target } if (target === null) return { outcome: 'deleted' } const lifecycle = await cloudWorkflowLifecycle(workflowId) if (!isCurrent()) return { outcome: 'superseded' } - return restorationOutcomeFor( - lifecycle, - boundOrOpenWorkflowFor(workflowId) ?? storedWorkflowFor(workflowId) - ) + return restorationOutcomeFor(lifecycle, localOwnerFor(workflowId)) + } + + function localOwnerFor(workflowId: string): ComfyWorkflow | null { + return boundOrOpenWorkflowFor(workflowId) ?? storedWorkflowFor(workflowId) + } + + async function startupTabsRestored( + isCurrent: () => boolean + ): Promise { + if (!workflowStore.tabsRestored) { + await until(() => workflowStore.tabsRestored).toBe(true, { + timeout: STARTUP_TAB_RESTORE_TIMEOUT_MS, + throwOnTimeout: false + }) + await nextTick() + } + return isCurrent() } async function onWorkflowRestored( From 90ecf0c4e9db27638c0e9b07b44fcd3696185cc4 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Thu, 29 Oct 2026 18:59:13 +0000 Subject: [PATCH 2/2] test: match this branch's boolean restoreTarget result in the PM-2332 tests On this release branch restoreTarget resolves to a boolean, not the { ready, committedWorkflowId } object it returns on main, so the backported assertions failed typecheck. --- .../agent/useAgentWorkflowSelection.test.ts | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/workbench/extensions/agent/composables/agent/useAgentWorkflowSelection.test.ts b/src/workbench/extensions/agent/composables/agent/useAgentWorkflowSelection.test.ts index 2106096a661..959f152301e 100644 --- a/src/workbench/extensions/agent/composables/agent/useAgentWorkflowSelection.test.ts +++ b/src/workbench/extensions/agent/composables/agent/useAgentWorkflowSelection.test.ts @@ -704,7 +704,7 @@ describe('historical workflow restoration', () => { const restored = restoreDraftTab(workflows) - expect((await restoration).ready).toBe(true) + expect(await restoration).toBe(true) expect(restored.path).toBe(draftPath) expect(getCloudWorkflow).toHaveBeenCalledWith('wf-draft') expect(panel.targetUnavailable).toBe(false) @@ -734,10 +734,7 @@ describe('historical workflow restoration', () => { restoreDraftTab(workflows) - expect(await restoration).toEqual({ - ready: true, - committedWorkflowId: 'wf-draft' - }) + expect(await restoration).toBe(true) expect(panel.selectedWorkflow?.path).toBe(draftPath) expect(panel.targetUnavailable).toBe(false) expect(warnRestoreFailed).not.toHaveBeenCalled() @@ -763,10 +760,7 @@ describe('historical workflow restoration', () => { await vi.advanceTimersByTimeAsync(1_000) expect(settled).toBe(true) - expect(await restoration).toEqual({ - ready: true, - committedWorkflowId: null - }) + expect(await restoration).toBe(true) expect(panel.targetUnavailable).toBe(true) expect(getCloudWorkflow).not.toHaveBeenCalled() } finally { @@ -790,10 +784,7 @@ describe('historical workflow restoration', () => { workflows.markTabsRestored() - expect(await restoration).toEqual({ - ready: true, - committedWorkflowId: null - }) + expect(await restoration).toBe(true) expect(panel.targetUnavailable).toBe(true) expect(getCloudWorkflow).not.toHaveBeenCalled() })