multica/server/internal/handler
Jiayuan 04da4bc3b7 fix(server): improve comment trigger logic for agent execution
- Add thread-aware on_comment suppression: when a member replies in a
  thread started by another member without @mentioning the assignee
  agent, the on_comment trigger is now suppressed. This fixes the bug
  where member-to-member conversations incorrectly triggered the
  assigned agent.

- Add terminal status check to on_mention: enqueueMentionedAgentTasks
  now skips done/cancelled issues, consistent with on_comment behavior.

- Write explicit default triggers on agent creation: new agents get
  [on_assign, on_comment, on_mention] all enabled, instead of relying
  on null/empty = all enabled. Existing agents with empty triggers
  still work via backwards-compat fallback in agentHasTriggerEnabled.

- Consolidate trigger check logic into shared agentHasTriggerEnabled
  helper, fixing inconsistency where empty [] was handled differently
  by isAgentTriggerEnabled (returned false) vs isAgentMentionTriggerEnabled
  (returned true).

- Add documentation comments explaining the intentional status gate
  difference: on_assign fires only for todo (start new work), while
  on_comment fires for any non-terminal status (conversational).
2026-04-01 21:37:33 +08:00
..
activity.go feat(upload): signed URLs for CLI + eager load attachments on comments 2026-03-31 15:42:10 +08:00
activity_test.go feat(activity): unified activity timeline with comment reply support 2026-03-28 21:53:08 +08:00
agent.go fix(server): improve comment trigger logic for agent execution 2026-04-01 21:37:33 +08:00
auth.go feat(upload): add file upload API with S3 + CloudFront signed cookies 2026-03-31 14:41:17 +08:00
comment.go fix(server): improve comment trigger logic for agent execution 2026-04-01 21:37:33 +08:00
daemon.go fix(auth): enforce auth on daemon API routes (#224) 2026-03-31 16:13:58 +08:00
file.go fix(upload): link attachments to comments via client-side ID tracking 2026-03-31 16:47:27 +08:00
handler.go feat(upload): add file upload API with S3 + CloudFront signed cookies 2026-03-31 14:41:17 +08:00
handler_test.go fix(auth): enforce auth on daemon API routes (#224) 2026-03-31 16:13:58 +08:00
inbox.go feat(inbox): scope all inbox queries by workspace_id 2026-03-29 17:42:45 +08:00
issue.go fix(server): improve comment trigger logic for agent execution 2026-04-01 21:37:33 +08:00
issue_reaction.go feat(reactions): add emoji reactions for comments and issue descriptions 2026-03-30 22:37:59 +08:00
personal_access_token.go feat(auth): email verification login and personal access tokens 2026-03-26 14:32:30 +08:00
reaction.go feat(reactions): add emoji reactions for comments and issue descriptions 2026-03-30 22:37:59 +08:00
runtime.go refactor(server): consolidate workspace permission checks into middleware 2026-03-30 03:40:20 +08:00
runtime_ping.go feat(runtimes): add Runtimes tab with usage tracking and connection test 2026-03-26 18:28:36 +08:00
skill.go feat(api): strict workspace isolation + agent parity fixes 2026-03-30 16:49:13 +08:00
subscriber.go feat(api): strict workspace isolation + agent parity fixes 2026-03-30 16:49:13 +08:00
subscriber_test.go feat(notifications): replace hardcoded inbox notifications with subscriber-driven model 2026-03-28 19:33:20 +08:00
workspace.go refactor(server): consolidate workspace permission checks into middleware 2026-03-30 03:40:20 +08:00