Skip to content

Latest commit

 

History

History
110 lines (92 loc) · 3.97 KB

todo.md

File metadata and controls

110 lines (92 loc) · 3.97 KB

Linear MCP Server Improvements

High Priority

Type Safety Improvements

  • Add type assertions for GraphQL responses in issue handler (tested)
  • Replace remaining 'any' types with proper interfaces, particularly in:
    • GraphQL client input parameters (tested)
    • Execute method generic constraints (tested)
    • Project and team operations (tested)
    • Batch issue creation operations (tested)
  • Create input validation schemas for all operations
  • Add proper return types for GraphQL responses in issue operations (tested)
  • Add proper return types for batch operations (tested)
  • Implement runtime type checking

Architecture Improvements

  • Refactor project creation to use atomic operations:
    • Split createProjectWithIssues into atomic methods (tested)
    • Implement proper batch issue creation (tested)
    • Add comprehensive error handling for each step (tested)
    • Update documentation to reflect new patterns

Performance Optimization

  • Implement true batch mutations for bulk operations:
    • Replace Promise.all with single GraphQL mutation for createIssues (tested)
    • Replace Promise.all with single GraphQL mutation for updateIssues (tested)
    • Replace Promise.all with single GraphQL mutation for deleteIssues (tested)
    • Implement proper batch issue creation for projects (tested)
  • Pre-import and cache GraphQL operations instead of dynamic imports
  • Implement query batching for related operations
  • Add proper error handling for GraphQL errors (tested)

Medium Priority

Authentication Refactoring

  • Split LinearAuth into separate classes:
    • Create ILinearAuth interface
    • Implement OAuthLinearAuth class
    • Implement APILinearAuth class
  • Move OAuth-specific logic to OAuthLinearAuth
  • Simplify APILinearAuth implementation

Caching Implementation

  • Add caching layer for frequently accessed data:
    • Team information
    • Project data
    • User data
  • Implement cache invalidation strategy
  • Add memory cache for short-lived data

Rate Limiting

  • Implement rate limiting middleware
  • Add retry logic for rate limited requests
  • Implement backoff strategy for failed requests
  • Add rate limit monitoring

Low Priority

Error Handling Improvements

  • Create domain-specific error types
  • Add proper error logging
  • Implement retry strategies for transient failures
  • Improve error messages and debugging information

OAuth Implementation Completion

  • Implement proper token refresh flow
  • Add state parameter validation
  • Add token storage strategy
  • Improve OAuth error handling

Input Validation

  • Implement JSON schema validation for all inputs
  • Add custom validation rules for domain-specific logic
  • Improve validation error messages
  • Add input sanitization where needed

Handler Architecture Improvements

  • Move common validation logic to base handler
  • Create domain-specific error types
  • Implement proper dependency injection
  • Add handler lifecycle hooks

Technical Debt

Documentation

  • Add JSDoc comments for all public methods
  • Create API documentation
  • Add examples for common operations
  • Document error handling strategies

Testing

  • Add unit tests for new type definitions
  • Create integration tests for bulk operations
  • Add performance benchmarks
  • Implement test coverage requirements

Code Quality

  • Add ESLint rules for type safety
  • Implement automated code formatting
  • Add complexity limits
  • Create contribution guidelines

Completed Improvements

  • Fixed Jest configuration for ESM modules
  • Improved test organization with dedicated config directory
  • Enhanced LinearClient mock implementation
  • Fixed updateIssues implementation in GraphQL client
  • Improved type safety in GraphQL response handling
  • Enhanced error handling in GraphQL client