Skip to content

[feat]: Add CodeRabbit AI code review integration #1423

@yashdev9274

Description

@yashdev9274

Feature Summary

Add CodeRabbit AI code review integration to Emdash, enabling AI-powered code reviews directly within the application, similar to how Cursor integrates CodeRabbit for inline code reviews.

Problem or Use Case

Currently, Emdash orchestrates multiple coding agents but lacks built-in AI code review capabilities. Users need to:

  • Manually run CodeRabbit CLI outside of Emdash
  • Or rely solely on GitHub App PR reviews (which only work after code is pushed)

It would be helpful if Emdash could trigger CodeRabbit reviews locally within worktrees before commits/PRs, displaying results directly in the UI.

Proposed Solution

Implement CLI-based CodeRabbit integration that allows running local code reviews on worktrees:

Phase 1: Service & IPC

  • Create CodeRabbitService.ts to wrap the cr CLI
  • Handle CLI detection, authentication, and review execution
  • Create IPC handlers for: coderabbit:checkInstalled, coderabbit:runReview, coderabbit:auth

Phase 2: UI Integration

  • Add "Review with CodeRabbit" button to Changes panel and Command Palette
  • Create review panel to display findings categorized by: Security, Performance, Best Practices, etc.
  • Click comments to navigate to file/line

Phase 3: Configuration

  • Auto-generate .coderabbit.yaml for new worktrees
  • Allow customization via project settings

UI/UX Design

  • Trigger: Button in Changes toolbar + Command Palette (Cmd+Shift+R)
  • Display: Side panel with categorized issues, click to navigate

See coderabbit-plan.md for detailed implementation plan.

Alternatives Considered

  1. GitHub App only - Already works but only reviews after PR creation, not local changes
  2. Add as provider - Could add CodeRabbit as agent in registry, but CLI review is simpler
  3. External script - Users could run CodeRabbit externally, but loses UI integration

Additional Context

  • CodeRabbit CLI documentation: https://docs.coderabbit.ai/cli/reference
  • CLI can review: all, committed, or uncommitted changes
  • Output formats: interactive, plain text, or minimal (for AI agents)
  • Config: .coderabbit.yaml in project root

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions