Skip to content

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

Go

MUL-8910: fix(issues): keep reply chip row clear of the placeholder (#10254)

Jiayuan Zhangdf6d6ee8f8d8
diff --git a/packages/views/issues/components/comment-composers.test.tsx b/packages/views/issues/components/comment-composers.test.tsx
index b9e8a3e573..e36557f558 100644
--- a/packages/views/issues/components/comment-composers.test.tsx
+++ b/packages/views/issues/components/comment-composers.test.tsx
@@ -440,6 +440,24 @@ describe("comment composers", () => {
expect(shell.className).not.toContain("h-[60vh]");
});
+ it("makes room for recipients a pending annotation previews while the reply is empty", async () => {
+ apiListTasksByIssue.mockResolvedValue([]);
+ apiPreviewCommentTriggers.mockResolvedValue({
+ agents: [{ id: "agent-1", name: "Lambda", source: "thread_parent", reason: "" }],
+ });
+ const pending = { id: "a", sourceCommentId: "comment-1", sourceActorName: "Lambda", quote: "Selected text",
+ note: "Please revise", start: 0, prefix: "", suffix: "" };
+ renderWithProviders(
+ <ReplyInput issueId="issue-1" parentId="comment-1" avatarType="member" avatarId="user-1"
+ onSubmit={vi.fn()} draftKey="reply:issue-1:comment-1"
+ annotationComposer={{ pending, render: () => null }} />,
+ );
+
+ expect(screen.getByTestId("reply-composer-shell")).toBeInTheDocument();
+ await screen.findByRole("button", { name: /Lambda trigger/ }, { timeout: 5000 });
+ expect(screen.getByTestId("drop-zone").className).toContain("pb-9");
+ });
+
it("keeps main comment submission wired after removing expand", async () => {
const { container, onSubmit } = renderCommentInput();
diff --git a/packages/views/issues/components/reply-input.tsx b/packages/views/issues/components/reply-input.tsx
index 2250c81ff2..61473df3ad 100644
--- a/packages/views/issues/components/reply-input.tsx
+++ b/packages/views/issues/components/reply-input.tsx
@@ -118,6 +118,9 @@ function ReplyInput({
resetKey: `${issueId}:${previewParentId}`,
});
const stopRunsBeforeSend = useStopRunsBeforeSend(issueId);
+ // A pending annotation note previews recipients while the reply itself is
+ // still empty, so the chip row can render under the one-line placeholder.
+ const showsTriggerChips = recipients.length > 0 || triggerPreview.blocked.length > 0 || triggerPreview.hasAllMembersMention;
// Readonly-first: static shell until intent; an unsent draft mounts the
// real editor immediately (see CommentInput). This is also what keeps the
@@ -257,7 +260,7 @@ function ReplyInput({
ref={composerRef}
className={cn(
"relative min-w-0 flex-1 flex flex-col",
- (!isEmpty || annotations.length > 0) && "pb-9",
+ (!isEmpty || annotations.length > 0 || showsTriggerChips) && "pb-9",
)}
>
{attachmentsBlockSteer && <SteerAttachmentNotice />}