Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(server): remove status gates from on_assign and on_mention triggers
Jiayuaneb5aaf003c03
diff --git a/server/internal/handler/comment.go b/server/internal/handler/comment.goindex 8392984507..a21bb61ce4 100644--- a/server/internal/handler/comment.go+++ b/server/internal/handler/comment.go@@ -239,12 +239,9 @@ func (h *Handler) isReplyToMemberThread(parent *db.Comment, content string, issu// enqueues a task for each mentioned agent. Skips self-mentions, agents that// are already the issue's assignee (handled by on_comment), and agents with// on_mention trigger disabled.+// Note: no status gate here — @mention is an explicit action and should work+// even on done/cancelled issues (the agent can reopen the issue if needed).func (h *Handler) enqueueMentionedAgentTasks(ctx context.Context, issue db.Issue, comment db.Comment, authorType, authorID string) {- // Don't trigger on terminal statuses.- if issue.Status == "done" || issue.Status == "cancelled" {- return- }-mentions := util.ParseMentions(comment.Content)for _, m := range mentions {if m.Type != "agent" {diff --git a/server/internal/handler/issue.go b/server/internal/handler/issue.goindex cd38e33892..71da2edd87 100644--- a/server/internal/handler/issue.go+++ b/server/internal/handler/issue.go@@ -471,20 +471,16 @@ func (h *Handler) canAssignAgent(ctx context.Context, r *http.Request, agentID,}// shouldEnqueueAgentTask returns true when an issue assignment should trigger-// the assigned agent. Only fires for "todo" status — assignment means "start-// fresh work", so the agent shouldn't be triggered on issues already in-// progress, blocked, or done.+// the assigned agent. No status gate — assignment is an explicit human action,+// so it should trigger regardless of issue status (e.g. assigning an agent to+// a done issue to fix a discovered problem).func (h *Handler) shouldEnqueueAgentTask(ctx context.Context, issue db.Issue) bool {- if issue.Status != "todo" {- return false- }return h.isAgentTriggerEnabled(ctx, issue, "on_assign")}// shouldEnqueueOnComment returns true if a member comment on this issue should-// trigger the assigned agent. Unlike on_assign (todo only), on_comment fires-// for any non-terminal status — comments are conversational and can happen at-// any stage of active work (todo, in_progress, in_review, blocked).+// trigger the assigned agent. Fires for any non-terminal status — comments are+// conversational and can happen at any stage of active work.func (h *Handler) shouldEnqueueOnComment(ctx context.Context, issue db.Issue) bool {// Don't trigger on terminal statuses (done, cancelled).if issue.Status == "done" || issue.Status == "cancelled" {