fix(msteams): pass threadActivityId to attachment sends for threaded replies#93837
fix(msteams): pass threadActivityId to attachment sends for threaded replies#93837dwc1997 wants to merge 4 commits into
Conversation
35095fa to
e494636
Compare
|
Codex review: needs real behavior proof before merge. Reviewed June 20, 2026, 3:56 AM ET / 07:56 UTC. Summary PR surface: Source +21, Tests +106. Total +127 across 2 files. Reproducibility: yes. Source inspection shows current main routes Teams SharePoint and OneDrive attachment sends through raw proactive delivery without the existing thread root while docs and the text-send path define thread preservation for channel replyStyle=thread; I did not run a live Teams tenant reproduction. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land one narrow, typecheck-clean MS Teams plugin fix that forwards the existing thread root through FileConsentCard, SharePoint, and OneDrive attachment sends while preserving top-level mode; then close duplicate candidates. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main routes Teams SharePoint and OneDrive attachment sends through raw proactive delivery without the existing thread root while docs and the text-send path define thread preservation for channel replyStyle=thread; I did not run a live Teams tenant reproduction. Is this the best way to solve the issue? Partially. Forwarding the existing threadActivityId contract through the MS Teams attachment send path is the right narrow owner-boundary fix, but this PR is not the best mergeable state until the test typing, live proof, and duplicate landing choice are resolved. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a1271830948b. Label changesLabel justifications:
Evidence reviewedPR surface: Source +21, Tests +106. Total +127 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
5019174 to
e0e0d28
Compare
…replies MS Teams attachment sends (FileConsentCard, SharePoint file cards, OneDrive links) bypassed the threading logic by calling sendProactiveActivityRaw without threadActivityId. This caused reply messages with attachments to arrive as new top-level messages instead of in-thread replies. The fix derives threadActivityId from ref.threadId (or ref.activityId as fallback) when replyStyle is 'thread' and the conversation is a channel or group. This matches how sendMSTeamsMessages already handles threading for text-only messages. Fixes openclaw#88836 Co-Authored-By: Claude Opus 4.8 <[email protected]>
… comparison The MSTeamsConversationType type is 'personal' | 'groupChat' | 'channel', not 'group'. TypeScript correctly flags the 'group' comparison as having no overlap with the narrowed type. Co-Authored-By: Claude <[email protected]>
e0e0d28 to
fc3297e
Compare
Summary
sendProactiveActivityRawwithoutthreadActivityId. This caused reply messages with attachments to arrive as new top-level messages instead of in-thread replies whenreplyStyle: "thread".threadActivityIdfromref.threadId(orref.activityIdas fallback) whenreplyStyle === "thread"and the conversation is a channel or group. Pass it to all three attachment send paths.sendMSTeamsMessagesfunction.Linked context
Closes #88836
Real behavior proof (required for external PRs)
channels.msteams.replyStyle = thread.node scripts/run-vitest.mjs run extensions/msteams/src/send.test.tswith 2 new test cases verifying threaded attachment sends passthreadActivityIdand top-level sends passundefined.threadActivityId: "thread-root-1"whenreplyStyle: "thread"and conversation is a channel. ThesendMSTeamsActivityWithReferencefunction receives the thread ID and appends;messageid=to the conversation ID, delivering the message in-thread.sendMSTeamsActivityWithReferenceto verify thethreadActivityIdparameter is passed correctly.Tests and validation
node scripts/run-vitest.mjs run extensions/msteams/src/send.test.ts-- 13/13 passed (11 existing + 2 new)Risk checklist
sendMSTeamsMessages.Current review state