Skip to main content

Development Documentation

This directory contains technical documentation for Teams for Linux developers and contributors.

Structure

Active Development Docs

For Contributors

When working on Teams for Linux:

  1. Review token cache architecture for authentication and secure storage patterns
  2. Read the security architecture to understand security trade-offs and requirements
  3. Review DOM access investigation (research) for context on current implementation choices
  4. Check ADR documents for architecture decisions and rationale
  5. Check planning documents for background on feature decisions and research
  6. Run E2E tests before submitting PRs with npm run test:e2e

Key Development Patterns

Token Cache Integration

When working with authentication-related features:

  • Use the existing tokenCache singleton from app/browser/tools/tokenCache.js
  • Follow the established async/await patterns for storage operations
  • Implement graceful fallback mechanisms for storage failures
  • Maintain PII-safe logging practices

Secure Storage Guidelines

  • Prefer the unified token cache over direct localStorage access
  • Let the system handle storage backend selection automatically
  • Don't assume secure storage availability - always implement fallbacks
  • Use the getStorageInfo() method for debugging and diagnostics

Documentation Standards

Follow the project's Copilot Instructions (.github/copilot-instructions.md) for documentation standards, including:

  • Use GitHub's alert syntax for callouts (> [!NOTE], > [!WARNING])
  • Include table of contents with <!-- toc -->
  • Use proper markdown standards and syntax highlighting

Testing

Teams for Linux uses automated end-to-end testing with Playwright to ensure application stability and prevent regressions.

Running Tests

# Run all E2E tests
npm run test:e2e

# Run in debug mode
npx playwright test --debug

Testing Strategy

The project uses a multi-layered testing approach:

  • E2E Tests (Playwright): Full application testing with real Electron runtime
  • Clean State Testing: Each test runs with isolated temporary userData directory
  • Microsoft Authentication: Tests validate redirect to login without requiring credentials

For comprehensive testing documentation, see:

ADR Index