Skip to content

feat(server): trigger agent when issue moves out of backlog#1006

Merged
forrestchang merged 9 commits intomainfrom
feat/backlog-trigger-agent
Apr 15, 2026
Merged

feat(server): trigger agent when issue moves out of backlog#1006
forrestchang merged 9 commits intomainfrom
feat/backlog-trigger-agent

Conversation

@forrestchang
Copy link
Copy Markdown
Collaborator

Summary

  • When a member moves an agent-assigned issue from "backlog" to an active status (todo, in_progress, etc.), the assigned agent is now triggered automatically
  • Backlog acts as a parking lot — issues can be assigned to agents without immediately triggering execution, then activated by moving to an active status
  • Applies to both single and batch issue updates
  • Fixes stale comments that incorrectly stated only "todo" issues trigger agents

Closes MUL-813

Test plan

  • Added TestBacklogToTodoTriggersAgent integration test
  • Verify moving a backlog issue to "todo" with an agent assigned enqueues an agent task
  • Verify moving a backlog issue to "done" or "cancelled" does NOT trigger the agent
  • Verify agent-initiated status changes do NOT re-trigger (only member actions)
  • Verify batch status updates from backlog also trigger agents

When a member moves an agent-assigned issue from "backlog" to an active
status (e.g. "todo", "in_progress"), enqueue an agent task so the agent
starts working. This lets backlog act as a parking lot where issues can
be assigned to agents without immediately triggering execution.

Applies to both single and batch issue updates.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
multica-web Ignored Ignored Apr 15, 2026 11:05am
multica-web-production Ignored Ignored Apr 15, 2026 11:05am

Request Review

Address review feedback: creating or assigning an agent to a backlog
issue no longer triggers immediate execution. Only moving out of backlog
to an active status triggers the agent, producing exactly one task.

- shouldEnqueueAgentTask now gates on backlog status
- backlog→active trigger uses isAgentAssigneeReady directly
- Added TestBacklogNoTriggerOnCreate test
- Updated TestBacklogToTodoTriggersAgent to assert exactly 1 task
  across the full create→move path (no manual cleanup)
Users may not know that backlog issues won't trigger agent execution
until moved to an active status. Show an actionable toast with a
"Move to Todo" button when:

- Assigning an agent to a backlog issue in the detail page
- Creating a backlog issue with an agent assignee
Users who understand the backlog parking lot behavior can dismiss the
hint permanently. Uses localStorage to persist the preference.
Use a modal dialog instead of a toast notification so users must
explicitly acknowledge the hint. The dialog offers three options:
- "Move to Todo" — changes status and triggers the agent
- "Keep in Backlog" — dismisses without action
- "Don't show again" — persists dismissal in localStorage
…-again

1. Create Issue dialog now closes when the backlog agent hint appears,
   so only the hint dialog is visible (not stacked behind).
2. "Don't show again" is now a checkbox instead of a separate button.
   When checked, clicking either "Keep in Backlog" or "Move to Todo"
   persists the preference.
The test mock for @multica/core/issues/mutations was missing the
useUpdateIssue export that create-issue.tsx now imports, causing
CI failure.
@forrestchang forrestchang merged commit d930bca into main Apr 15, 2026
5 checks passed
@forrestchang forrestchang deleted the feat/backlog-trigger-agent branch April 15, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant