Repository navigation
fix(msteams): SharePoint file link instead of native file-info card (ENG-14349/ENG-14117) - #59
Conversation
…ard (ENG-14349/ENG-14117) Bot Framework file-info cards render as a broken "chiclet" (HTTP 400 on file.info) in some tenants (observed on arguijo). Replace the native file card attachment with a markdown link to the shared SharePoint item in both send paths (buildActivity in messenger.ts, sendMessageMSTeams in send.ts), dropping the now-unused buildTeamsFileInfoCard / getDriveItemProperties calls. This lands in fork source the host-local dist hot-patch currently applied on arguijo, so a fork-published @openclaw/msteams (ENG-14431) carries it and it stops living as a per-host edit that reinstalls silently wipe. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
The file-info-card send paths were replaced by SharePoint markdown links in the prior commit, leaving graph-chat.ts (sole export buildTeamsFileInfoCard) as unused production code — the check-dependencies CI job (deadcode:unused-files) flagged it. Delete graph-chat.ts and the now-orphaned test references in send.test.ts + graph-upload.test.ts. Verified: tsc --noEmit clean, 30/30 msteams tests pass, scripts/check-deadcode-unused-files.mjs exits 0. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
Approved — clean fix.
Ticket trace: ENG-14349/ENG-14117; clear RCA (Bot Framework file.info chiclet → 400 on arguijo).
Why this is right: Converges the SharePoint send path onto the same 📎 [name](shareUrl) markdown-link pattern the OneDrive fallback already used and that's proven reliable across tenants — reducing divergence, not inventing a new shape. Both send paths (buildActivity reply + sendMessageMSTeams proactive/cron) covered consistently.
Verified:
uploadAndShareSharePointanduploadAndShareOneDriveboth return{ name, shareUrl }, so the template literals are safe — no undefined-in-link risk.graph-chat.tsdeletion is clean: no remaining consumers repo-wide, orphaned tests removed,check-dependencies(deadcode) green.- tsc clean, 30/30 msteams tests, all CI passing.
- No secrets, no new authz surface, sharing-scope logic untouched.
Non-blocking nit (already noted as follow-up): send.test.ts still mocks getDriveItemProperties (lines 22/87/189/228) which prod code no longer calls — dead scaffolding, worth a tidy but harmless.
Ship it.
What
Replaces the native Teams file-info card attachment with a markdown link to the shared SharePoint item (
📎 [name](shareUrl)) in both msteams send paths:buildActivity(messenger.ts) — inbound-reply attachment pathsendMessageMSTeams(send.ts) — proactive/cron send pathDrops the now-unused
buildTeamsFileInfoCard/getDriveItemPropertiescalls and imports.Why
Bot Framework file-info cards render as a broken "chiclet" (HTTP 400 on
file.info) in some tenants — observed live on arguijo (see memory/RCA on the msteams outbound-file 400). A markdown link to the already-shared SharePoint item is reliable across tenants.This change currently exists only as a host-local
dist/hot-patch on arguijo (applied 2026-07-17). Landing it in fork source means a fork-published@openclaw/msteams(ENG-14431) carries it, so it stops being a per-host edit that a plugin reinstall / fresh standup silently wipes.Context — the delivery gap this is part of
While deploying the
topLevelfix (PR #38, already merged toboon) to arguijo for ENG-14117, we hit the structural problem that@openclaw/msteamsis consumed as an external npm package: forkextensions/msteams/srcchanges never reach a running host until the plugin is rebuilt/reinstalled. arguijo was unblocked today via a fork-builtdist/swap carrying both PR #38 and this file-link change. ENG-14431 (fork-publish msteams) is the durable fix; this PR is a prerequisite so that published package includes the file-send fix.Test
tsc --noEmitonextensions/msteams— clean.vitest run extensions/msteams/src/send.test.ts extensions/msteams/src/send-context.test.ts— 21/21 pass.📎link; nofile.info400.Follow-ups
send.test.tsstill mocksbuildTeamsFileInfoCard(now dangling) — can be tidied here or in a follow-up.🤖 Generated with Claude Code
Summary by cubic
Replaced the Teams file-info card with a SharePoint markdown link to avoid the broken “chiclet” (HTTP 400) and make file shares reliable in both replies and proactive/cron sends. This supports proactive delivery for ENG-14117.
Bug Fixes
📎 [name](shareUrl)instead of a file-info card inbuildActivityandsendMessageMSTeams.Refactors
graph-chat.tsand remove allbuildTeamsFileInfoCardusage and tests; dropgetDriveItemPropertiescalls/imports.Written for commit 1ad175b. Summary will update on new commits.