Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(issues): hide unsupported steer action (MUL-7629) (#8745)

Multica Eve56bc00223fa8
diff --git a/packages/views/issues/components/inline-comment-run.test.tsx b/packages/views/issues/components/inline-comment-run.test.tsx
index ef698dc12f..7d4a680b5a 100644
--- a/packages/views/issues/components/inline-comment-run.test.tsx
+++ b/packages/views/issues/components/inline-comment-run.test.tsx
@@ -111,8 +111,14 @@ describe("InlineCommentRun", () => {
expect(api.createTaskSupplement).not.toHaveBeenCalled();
});
- it("disables additional messages without negotiated support", () => {
+ it("hides additional messages without negotiated support", () => {
const { client } = setup(task());
+ expect(screen.queryByRole("button", { name: "Add message" })).not.toBeInTheDocument();
+ client.clear();
+ });
+
+ it("disables additional messages when support is negotiated but permission is denied", () => {
+ const { client } = setup(task({ supplement_capability: "task-supplement-v1", can_supplement: false }));
expect(screen.getByRole("button", { name: "Add message" })).toBeDisabled();
client.clear();
});
diff --git a/packages/views/issues/components/inline-comment-run.tsx b/packages/views/issues/components/inline-comment-run.tsx
index 53180df016..a63fc09593 100644
--- a/packages/views/issues/components/inline-comment-run.tsx
+++ b/packages/views/issues/components/inline-comment-run.tsx
@@ -181,7 +181,9 @@ export function InlineCommentRun({ run, className, viewState, showIdentity = fal
onClick={() => setConfirmStop(true)}>
{cancel.isPending || cancel.isSuccess ? <Loader2 className="size-3.5 animate-spin motion-reduce:animate-none" /> : <Square className="size-3.5" />}
</Button>;
- const supplementButton = active && <Tooltip>
+ const supplementButton = active
+ && task.supplement_capability === "task-supplement-v1"
+ && <Tooltip>
<TooltipTrigger render={<span className="inline-flex">
<Button type="button" size="sm" variant="ghost" className="text-muted-foreground"
aria-label={t(($) => $.inline_run.supplement_action)}