diff --git a/apps/web/src/components/chat/ComposerBannerStack.browser.test.tsx b/apps/web/src/components/chat/ComposerBannerStack.browser.test.tsx index e1eeea73a20d8..3e7b219faf7b4 100644 --- a/apps/web/src/components/chat/ComposerBannerStack.browser.test.tsx +++ b/apps/web/src/components/chat/ComposerBannerStack.browser.test.tsx @@ -1,4 +1,5 @@ import { InfoIcon } from "lucide-react"; +import { ThreadId } from "@t3tools/contracts"; import type { ReactNode } from "react"; import { expect, it, vi } from "vite-plus/test"; @@ -11,6 +12,20 @@ import { NoticeText, type ComposerBannerStackItem, } from "./ComposerBannerStack"; +import { goalNowItem } from "./ThreadActivityBanners"; + +it("offers Resume for a paused goal while another turn is working", async () => { + const goal = goalNowItem({ + threadId: ThreadId.make("thread:goal-resume"), + goal: { objective: "Fix the tests", status: "paused" }, + isWorking: true, + onSendCommand: async () => {}, + }); + await using screen = await render( + , + ); + await expect.element(screen.getByRole("button", { name: "Resume", exact: true })).toBeVisible(); +}); function notice(title: string, group?: ComposerBannerStackItem["group"]): ComposerBannerStackItem { return { id: title, variant: "default", icon: , title, ...(group ? { group } : {}) }; diff --git a/apps/web/src/components/chat/ThreadActivityBanners.tsx b/apps/web/src/components/chat/ThreadActivityBanners.tsx index 8bd26e21a04dc..bb151947fd876 100644 --- a/apps/web/src/components/chat/ThreadActivityBanners.tsx +++ b/apps/web/src/components/chat/ThreadActivityBanners.tsx @@ -84,10 +84,9 @@ export function goalNowItem(input: { ? presentation.title : `${presentation.title} ยท ${presentation.usage}`, description: presentation.objective, - // Clear stops goal work; Resume would stop unrelated work, so it waits. actions: ( <> - {presentation.canResume && !isWorking ? ( + {presentation.canResume ? ( <> void onSendCommand("/goal resume", "Failed to resume goal.")}