{isArchived &&
}
{!isArchived &&
}
- {!isArchived && (
-
- )}
{isRemoteExecutor && (
)}
{showApproveButton && onApprove &&
}
-
+
);
}
diff --git a/apps/web/components/task/task-top-bar-plugin-actions.test.tsx b/apps/web/components/task/task-top-bar-plugin-actions.test.tsx
index 1acbf7a1dd..df70400622 100644
--- a/apps/web/components/task/task-top-bar-plugin-actions.test.tsx
+++ b/apps/web/components/task/task-top-bar-plugin-actions.test.tsx
@@ -1,7 +1,11 @@
-import { cleanup, render, screen } from "@testing-library/react";
+import { act, cleanup, render, screen } from "@testing-library/react";
import { afterEach, describe, expect, it, vi } from "vitest";
import { pluginRegistry } from "@/lib/plugins/registry";
-import { TaskTopBarPluginActions, type ChatTopBarSlotProps } from "./task-top-bar-plugin-actions";
+import {
+ TaskTopBarPluginActions,
+ type ChatTopBarSlotProps,
+ useHasTaskTopBarPluginActions,
+} from "./task-top-bar-plugin-actions";
const SLOT = "chat-top-bar";
@@ -22,13 +26,13 @@ vi.mock("@/components/state-provider", () => ({
useOptionalAppStore: (selector: (s: typeof mockState) => unknown) => selector(mockState),
}));
-describe("TaskTopBarPluginActions", () => {
- afterEach(() => {
- cleanup();
- pluginRegistry.unregisterPlugin("plugin-a");
- mockState.taskSessionsByTask.itemsByTaskId.t1 = originalSessions;
- });
+afterEach(() => {
+ cleanup();
+ pluginRegistry.unregisterPlugin("plugin-a");
+ mockState.taskSessionsByTask.itemsByTaskId.t1 = originalSessions;
+});
+describe("TaskTopBarPluginActions", () => {
it("renders nothing when no plugin registered a chat-top-bar component", () => {
const { container } = render(
- {`${ctx.taskId}|${ctx.workspaceId}|${ctx.activeSessionId}|${ctx.sessionIds.join(",")}`}
+ {`${ctx.taskId}|${ctx.workspaceId}|${ctx.activeSessionId}|${ctx.sessionIds.join(",")}|${ctx.presentation}`}
);
});
@@ -50,7 +54,7 @@ describe("TaskTopBarPluginActions", () => {