diff --git a/ui/storybook/fixtures/workFolders.test.ts b/ui/storybook/fixtures/workFolders.test.ts index b286ad521a..d0d702e3a2 100644 --- a/ui/storybook/fixtures/workFolders.test.ts +++ b/ui/storybook/fixtures/workFolders.test.ts @@ -23,6 +23,17 @@ function operation( } describe("work-folder Storybook fixtures", () => { + it("handles the project page's workspace query without a backend", async () => { + const fixture = createWorkFolderFixture(); + const response = await fixture.handle( + new Request( + "http://storybook.test/api/companies/company-storybook/execution-workspaces?projectId=project-board-ui", + ), + ); + expect(response!.status).toBe(200); + expect(await response!.json()).toEqual([]); + }); + it("keeps uploads within one owner and resets them for the next story", async () => { const fixture = createWorkFolderFixture("empty"); const bytes = new Uint8Array([0, 255, 128, 10]); diff --git a/ui/storybook/fixtures/workFolders.ts b/ui/storybook/fixtures/workFolders.ts index 7949c39ea9..5f8d5e183a 100644 --- a/ui/storybook/fixtures/workFolders.ts +++ b/ui/storybook/fixtures/workFolders.ts @@ -128,6 +128,14 @@ export function createWorkFolderFixture( } async function handle(request: Request): Promise { const url = new URL(request.url); + // ProjectDetail loads this list even when its Files dialog is the review focus. + if ( + request.method === "GET" && + url.pathname === + `/api/companies/${WORK_FOLDER_COMPANY}/execution-workspaces` + ) { + return Response.json([]); + } const match = url.pathname.match( /^\/api\/companies\/company-storybook\/work-folders\/(task|agent|user|project)\/([^/]+)(?:\/(content|operations|sync|refresh))?$/, );