Appearance
Code Review Workflow
FreshUse Gemini Code Assist to accelerate both giving and receiving code reviews.
Self-Review Before Submitting
mermaid
flowchart LR
A[Write code] --> B[Select key function]
B --> C[Smart Action: Explain this code]
C --> D{Makes sense?}
D -->|No| E[Refactor with /simplify]
D -->|Yes| F[Generate unit tests]
F --> G[Review coverage]
G --> H[Submit PR]- Select your new code
- Smart Action: Explain this code — if you can't follow the explanation, reviewers won't either
- Smart Action: Generate unit tests — catch edge cases before review
- Smart Action: Make code more readable — if explanation was hard to follow
During Code Review
Understand unfamiliar patterns
- Select confusing code
- Right-click > Explain this code
- Ask follow-up in chat:
"Why would someone write it this way instead of [alternative]?"
Check for issues
Chat: "Review this function for:
1. Potential null/undefined errors
2. Performance issues (N+1 queries, unnecessary loops)
3. Security concerns (injection, auth bypass)
4. Missing error handling"Verify reviewer's suggested alternative
Chat: "The reviewer suggested using reduce() instead of this for-loop.
Is their approach better? What are the tradeoffs?"Post-Review: Applying Feedback
Simple fixes
Use /fix with context from the review comment:
/fix the reviewer asked me to extract the validation logic into a separate validateUser() functionComplex refactors (multiple comments)
Switch to agent mode:
Agent: "Apply these code review comments to /src/services/UserService.ts:
1. Extract validation into UserValidator class
2. Add retry logic to the database calls
3. Replace the nested callbacks with async/await
4. Update unit tests to reflect these changes"