| name | code-review |
| description | Review code changes for bugs, patterns violations, and common pitfalls in the vision-next codebase |
| argument-hint | ["file-or-branch"] |
| disable-model-invocation | true |
Code Review
Review code for bugs, anti-patterns, and common issues specific to this codebase.
How to Review
- Read the changed files — understand what changed and why
- Verify each finding against current code — don't assume; read the actual file before flagging
- Categorize findings by severity:
- Inline (must fix): Bugs, security issues, data corruption risks
- Outside-diff (should fix): Issues in unchanged code exposed by the change
- Nitpick (nice to have): Style, naming, test quality improvements
- Only fix what's confirmed — if a finding doesn't apply to current code, skip it
What to Check
React & Hooks
React Query
SDK & Architecture
Hive Blockchain Specific
CSS/Styling
Common Bug Patterns Found in This Codebase
- Race conditions in state transitions — component shows stale UI after async operation completes (fix: add guard flags like
hasTransitioned)
- Silent no-ops in switch cases — empty case blocks that silently do nothing (e.g., hivesigner case in auth)
- Interval-based polling decoupled from actual data — using setInterval to increment a counter instead of reacting to React Query's
dataUpdatedAt
- Conflating errors with empty data — treating query errors the same as "no data found" (e.g., showing "deleted" when it was actually a network error)
- Position-based array operations — using
.slice(1) when identity-based .filter() is needed (e.g., excluding primary node)
- Paste handlers masking validation — unconditionally clearing warnings before validation runs
Output Format
For each finding, provide:
**[SEVERITY]** file:line — Description
- What's wrong
- Why it matters
- Suggested fix
Severities: BUG, SECURITY, PERF, STYLE, NITPICK