Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(server): allow @agent mentions to trigger regardless of issue status (#267)
LinYushen005025b05c15
diff --git a/server/internal/handler/comment.go b/server/internal/handler/comment.goindex 93cf8f3fc2..4815304f91 100644--- a/server/internal/handler/comment.go+++ b/server/internal/handler/comment.go@@ -208,11 +208,6 @@ func (h *Handler) commentMentionsOthersButNotAssignee(content string, issue db.I// are already the issue's assignee (handled by on_comment), and agents with// on_mention trigger disabled.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/service/task.go b/server/internal/service/task.goindex f46d0e143f..fb44e613c9 100644--- a/server/internal/service/task.go+++ b/server/internal/service/task.go@@ -162,8 +162,6 @@ func (s *TaskService) ClaimTask(ctx context.Context, agentID pgtype.UUID) (*db.A// ClaimTaskForRuntime claims the next runnable task for a runtime while// still respecting each agent's max_concurrent_tasks limit.-// Tasks whose issues are in a terminal status (done/cancelled) are-// automatically cancelled and skipped.func (s *TaskService) ClaimTaskForRuntime(ctx context.Context, runtimeID pgtype.UUID) (*db.AgentTaskQueue, error) {tasks, err := s.Queries.ListPendingTasksByRuntime(ctx, runtimeID)if err != nil {@@ -172,15 +170,6 @@ func (s *TaskService) ClaimTaskForRuntime(ctx context.Context, runtimeID pgtype.triedAgents := map[string]struct{}{}for _, candidate := range tasks {- // Skip tasks whose issues have reached a terminal status.- if issue, err := s.Queries.GetIssue(ctx, candidate.IssueID); err == nil {- if issue.Status == "done" || issue.Status == "cancelled" {- slog.Info("skipping task for terminal issue", "task_id", util.UUIDToString(candidate.ID), "issue_status", issue.Status)- _ = s.Queries.CancelAgentTasksByIssue(ctx, candidate.IssueID)- continue- }- }-agentKey := util.UUIDToString(candidate.AgentID)if _, seen := triedAgents[agentKey]; seen {continue