Skip to content

feat: feishu_task 成员管理增强 + 创建任务自动加关注者 - #129

Merged
lishuceo merged 1 commit into
mainfrom
feat/task-add-remove-members
Mar 10, 2026
Merged

feat: feishu_task 成员管理增强 + 创建任务自动加关注者#129
lishuceo merged 1 commit into
mainfrom
feat/task-add-remove-members

Conversation

@lishuceo

Copy link
Copy Markdown
Owner

Summary

  • add_members / remove_members: 新增任务成员管理能力,支持创建后动态添加/移除执行者和关注者
  • list_tasklists: 新增列出可用任务清单,create 支持 tasklists 参数指定归属清单
  • 自动关注者: 创建任务时自动将发起请求的用户以 follower 角色加入,确保发起人收到任务通知(已在 members 中的不重复添加)
  • 创建任务后返回正确的 applink URL

Test plan

  • 55 个 task 工具单元测试全部通过
  • 新增 3 个 requesterId 自动关注者测试用例
  • 全量回归测试通过(仅 memory/quality flaky 测试与本次改动无关)

🤖 Generated with Claude Code

创建飞书任务时,自动将当前请求用户以 follower 角色加入 members,
确保发起人能收到任务动态通知。已在 members 中的用户不会重复添加。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lishuceo
lishuceo force-pushed the feat/task-add-remove-members branch from bae2c82 to 4439fe1 Compare March 10, 2026 10:13
@claude

claude Bot commented Mar 10, 2026

Copy link
Copy Markdown

Claude finished @lishuceo's task in 47s —— View job


PR Review: feishu_task 成员管理增强 + 创建任务自动加关注者

  • Check for previous review comments
  • Read changed files and understand context
  • Perform code review
  • Post review summary

Review Summary

Approved — Clean, well-scoped change with good test coverage.

What changed

This PR adds a requesterId parameter to feishuTaskTool() so that when a task is created, the requesting user is automatically added as a follower (unless they're already in the members list). The userId is threaded through from createFeishuToolsMcpServer in index.ts.

Analysis

Correctness: The auto-follower logic (task.ts:203-211) is correct:

  • Handles the case where data.members is undefined (creates new array via ?? [])
  • Deduplication check via .some(m => m.id === requesterId) prevents adding the requester twice
  • Reassigns data.members = members to cover the undefined → new array case

Security: requesterId originates from server-side userId (not user input), so no injection risk.

Tests: 3 new test cases cover the key scenarios well:

  1. No existing members → requester added as follower
  2. Other members present → requester appended as follower
  3. Requester already in members → no duplicate added

Architecture: Follows existing patterns — closure-based parameter passing, consistent with how getUserToken is already threaded through.

No issues found with confidence ≥ 75.

@lishuceo
lishuceo merged commit ae3b059 into main Mar 10, 2026
2 checks passed
@lishuceo
lishuceo deleted the feat/task-add-remove-members branch March 10, 2026 10:15
lishuceo added a commit that referenced this pull request Apr 8, 2026
创建飞书任务时,自动将当前请求用户以 follower 角色加入 members,
确保发起人能收到任务动态通知。已在 members 中的用户不会重复添加。

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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