Skip to content

The open-source app everyone uses to manage agents at work

Exclude self-comments from queued comment UI

dotta5d6217b70b02
diff --git a/ui/src/lib/optimistic-issue-comments.test.ts b/ui/src/lib/optimistic-issue-comments.test.ts
index bb4ae9ae87..1620d329df 100644
--- a/ui/src/lib/optimistic-issue-comments.test.ts
+++ b/ui/src/lib/optimistic-issue-comments.test.ts
@@ -212,4 +212,18 @@ describe("optimistic issue comments", () => {
}),
).toBe(false);
});
+
+ it("does not mark comments from the active run agent as queued", () => {
+ expect(
+ isQueuedIssueComment({
+ comment: {
+ createdAt: new Date("2026-03-28T16:20:05.000Z"),
+ authorAgentId: "agent-1",
+ },
+ activeRunStartedAt: new Date("2026-03-28T16:20:00.000Z"),
+ activeRunAgentId: "agent-1",
+ runId: null,
+ }),
+ ).toBe(false);
+ });
});
diff --git a/ui/src/lib/optimistic-issue-comments.ts b/ui/src/lib/optimistic-issue-comments.ts
index 44d8533200..1ac6812c8f 100644
--- a/ui/src/lib/optimistic-issue-comments.ts
+++ b/ui/src/lib/optimistic-issue-comments.ts
@@ -59,13 +59,20 @@ export function createOptimisticIssueComment(params: {
}
export function isQueuedIssueComment(params: {
- comment: Pick<IssueTimelineComment, "createdAt"> & Partial<Pick<OptimisticIssueComment, "clientStatus">>;
+ comment: Pick<IssueTimelineComment, "createdAt"> &
+ Partial<Pick<OptimisticIssueComment, "clientStatus">> & {
+ authorAgentId?: string | null;
+ };
activeRunStartedAt?: Date | string | null;
+ activeRunAgentId?: string | null;
runId?: string | null;
interruptedRunId?: string | null;
}) {
if (params.runId) return false;
if (params.interruptedRunId) return false;
+ if (params.comment.authorAgentId && params.activeRunAgentId && params.comment.authorAgentId === params.activeRunAgentId) {
+ return false;
+ }
if (params.comment.clientStatus === "queued") return true;
if (!params.activeRunStartedAt) return false;
return toTimestamp(params.comment.createdAt) >= toTimestamp(params.activeRunStartedAt);
diff --git a/ui/src/pages/IssueDetail.tsx b/ui/src/pages/IssueDetail.tsx
index 966bba182c..84aadbbb68 100644
--- a/ui/src/pages/IssueDetail.tsx
+++ b/ui/src/pages/IssueDetail.tsx
@@ -553,6 +553,7 @@ export function IssueDetail() {
isQueuedIssueComment({
comment: nextComment,
activeRunStartedAt,
+ activeRunAgentId: runningIssueRun?.agentId ?? null,
runId: meta?.runId ?? nextComment.runId ?? null,
interruptedRunId: meta?.interruptedRunId ?? nextComment.interruptedRunId ?? null,
})