SidekickSidekick

Code Review

Get Agent-powered code reviews on your changes before committing

Code Review analyzes your git changes and provides detailed feedback on code quality, security, bugs, and best practices. Get a senior developer perspective on your code before you commit.

Starting a Review

Make Changes

Edit files in your project. Changes can be staged or unstaged.

Open Git Panel

Click the Git icon in the sidebar to open the Git Panel.

Click Review

Click the sparkles icon (Review button) in the Git Panel header.

Wait for Analysis

A progress bar shows the review stages:

  • Preparing review
  • Getting git diff
  • Parsing changes
  • Running lint check (optional)
  • Analyzing with Agent
  • Processing results

Review Results

Results appear in a collapsible panel showing issues, scores, and suggestions.

What Gets Reviewed

The Agent reviews your git diff, focusing on:

Review TypeWhat It Analyzes
Staged changesFiles added to git staging area
Unstaged changesModified files not yet staged
All changesBoth staged and unstaged combined

The Agent focuses on added and modified lines only. Deleted code is ignored since it will no longer be in your codebase.

Additional Analysis

When available, the review also runs linting:

  • Tries common lint commands (pnpm lint, npm run lint, yarn lint)
  • Lint output provides extra context for the Agent
  • Helps catch issues linters already detect

Understanding Results

Overall Score

A quality score from 0-100 appears in the review header:

ScoreColorMeaning
90-100GreenExcellent quality
70-89YellowGood with minor issues
50-69OrangeNeeds attention
0-49RedSignificant problems

Issue Summary

Badges show the count of issues by severity:

BadgeSeverityDescription
RedCriticalSecurity vulnerabilities, data loss risks
YellowWarningBugs, logic errors, runtime issues
BlueSuggestionCode quality improvements
GreenPraiseWell-written code worth highlighting

File Breakdown

Each reviewed file shows:

  • File path
  • Number of issues found
  • Individual quality score
  • Expandable list of comments

Review Comments

Each comment includes detailed information:

Comment Actions

ActionDescription
Apply FixAutomatically apply the suggested code change
ViewJump to the line in the editor
DismissHide this issue from the results

Issue Categories

The Agent reviews code across six categories:

Security issues include:

  • SQL injection vulnerabilities
  • Cross-site scripting (XSS)
  • Command injection
  • Hardcoded secrets or credentials
  • Authentication flaws
  • Insecure data handling

Bug detection includes:

  • Null pointer risks
  • Race conditions
  • Resource leaks
  • Logic errors
  • Unhandled edge cases
  • Type mismatches

Performance issues include:

  • Inefficient algorithms
  • Unnecessary operations
  • Memory issues
  • Blocking operations
  • Redundant computations
  • Suboptimal patterns

Maintainability concerns include:

  • Code duplication
  • High complexity
  • Poor naming conventions
  • Missing documentation
  • Tightly coupled code
  • Hard-to-test patterns

Style issues include:

  • Formatting inconsistencies
  • Convention violations
  • Only flagged when significant
  • Generally lower priority

Best practice suggestions include:

  • Modern patterns
  • Idiomatic code
  • Better approaches
  • Framework conventions
  • Industry standards

Severity Levels

Critical

Highest priority issues requiring immediate attention:

  • Security vulnerabilities
  • Data loss risks
  • Breaking changes
  • Production-blocking bugs

Warning

Important issues that should be fixed:

  • Logic errors
  • Potential runtime failures
  • Resource management problems
  • Edge case handling

Suggestion

Improvements to consider:

  • Code quality enhancements
  • Readability improvements
  • Minor optimizations
  • Alternative approaches

Praise

Positive feedback on well-written code:

  • Good patterns identified
  • Clean implementations
  • Smart solutions
  • Encourages best practices

Review Settings

Configure how code reviews work:

SettingDescriptionDefault
Auto-review on stageAutomatically review when files are stagedOff
CategoriesWhich issue types to checkAll enabled
Severity thresholdMinimum severity to showSuggestion
Max filesMaximum files per review20
Security scanExtra focus on securityOn

Settings persist in your browser and apply to all reviews.

Review History

Sidekick keeps your last 10 review sessions:

  • Access previous reviews
  • Compare changes over time
  • Track improvement patterns

History is stored locally in your browser.

Applying Fixes

When a comment includes a suggested fix:

Review the Suggestion

Read the suggested code change in the green highlighted section.

Click Apply Fix

Click the green Apply Fix button on the comment.

Verify the Change

The fix is applied to your file. Review the change in the editor.

Always review applied fixes before committing. Agent suggestions should be verified for correctness in your specific context.

Best Practices

Before Reviewing

  • Stage related changes together for coherent reviews
  • Keep reviews focused (under 20 files works best)
  • Ensure code compiles/runs before review

During Review

  • Start with critical issues
  • Apply fixes incrementally
  • Dismiss false positives
  • Use View to understand context

After Review

  • Re-run review after major fixes
  • Commit when score is acceptable
  • Document dismissed issues if intentional

Limitations

LimitationDetails
Max filesReviews up to 20 files by default
Diff onlyReviews changes, not entire files
Language supportBest for common programming languages
ContextMay miss project-specific conventions

For project-specific review guidelines, consider creating a custom agent with your team's coding standards in the Agent's settings.

Integration with Git Workflow

The recommended workflow:

Make changes

Run Agent Review

Fix critical/warning issues

Re-review if needed

Stage changes

Commit with confidence