Skip to content

Latest commit

Β 

History

History
62 lines (42 loc) Β· 2.56 KB

File metadata and controls

62 lines (42 loc) Β· 2.56 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

This repo contains two versions of an Outlook add-in that attaches emails to work items:

  • TFSIntegration/ β€” Legacy VSTO add-in (.NET 4.0, C#) targeting classic Outlook + TFS. No longer maintained.
  • ADOIntegration/ β€” Modern Office Add-in (TypeScript, React, Fluent UI) targeting new Outlook (Windows, web, Mac) + Azure DevOps. Active development.

ADOIntegration β€” Build Commands

cd ADOIntegration

# Install dependencies
npm install

# Development server (https://localhost:3000)
npm start

# Production build
npm run build

No tests yet. Sideload for manual testing via the Outlook developer tools or npx office-addin-debugging start manifest.json.

ADOIntegration β€” Architecture

Modern Office Add-in using TypeScript + React + Fluent UI + Office.js. Runs as a web app inside Outlook's webview.

Entry points:

  • manifest.json β€” Unified manifest declaring ribbon button on mailRead context
  • src/taskpane/index.tsx β€” React mount point, wraps app in FluentProvider
  • src/commands/commands.ts β€” Ribbon command handler (opens task pane)

Core flow:

  1. User opens email β†’ clicks "Attach to ADO" in ribbon β†’ task pane opens
  2. App.tsx β€” Main component: auth gate β†’ settings gate β†’ work item UI
  3. components/ConnectionSettings.tsx β€” Configure Azure DevOps org URL, project, and auth method (Entra ID or PAT)
  4. components/WorkItemInput.tsx β€” Enter work item ID, fetches title via REST API
  5. components/WorkItemList.tsx β€” Shows added work items with remove option
  6. components/AttachButton.tsx β€” Exports email as EML via getAsFileAsync(), uploads to Azure DevOps (2-step: upload attachment β†’ link to work item)

Services:

  • services/auth.ts β€” MSAL.js Entra ID OAuth (popup flow)
  • services/patAuth.ts β€” PAT-based auth fallback (Basic auth header)
  • services/azureDevOps.ts β€” Azure DevOps REST API v7.1 (getWorkItem, attachFileToWorkItem, validateConnection)
  • services/outlook.ts β€” Office.js email export (getAsFileAsync with fallback EML construction)

Settings: Persisted via Office.context.roamingSettings (roams across devices).

Key deps: @fluentui/react-components, @azure/msal-browser, @azure/msal-react, office-js

TFSIntegration β€” Legacy (archived)

msbuild TFSIntegration.sln /p:Configuration=Debug

VSTO add-in, .NET 4.0, uses Microsoft.TeamFoundation.Client for TFS connectivity. See old code for reference only.