reviewing-code

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Reviewing Code

代码审查

Prioritized, actionable feedback. Assume good intent.
优先级明确、可执行的反馈。假设代码编写者初衷是好的。

Priority Levels

优先级等级

LevelPrefixMeaning
Blocker🚨Must fix before merge
Suggestion⚠️Should consider
Nit💭Optional polish
QuestionNeed clarification
PraiseDone well
等级前缀含义
阻塞项🚨合并前必须修复
建议项⚠️建议考虑优化
细微优化💭可选的打磨项
疑问项需要澄清
表扬项做得好的地方

Checklist

检查清单

Blockers (Security & Correctness)

阻塞项(安全与正确性)

  • No secrets/credentials in code
  • User input validated/sanitized
  • Auth checks present where needed
  • Edge cases handled (null, empty, errors)
  • No race conditions in async code
  • 代码中无密钥/凭证
  • 用户输入已验证/清理
  • 必要位置存在权限校验
  • 已处理边缘情况(空值、空输入、错误)
  • 异步代码中无竞态条件

High Priority (Performance & Logic)

高优先级(性能与逻辑)

  • No N+1 queries
  • Large lists paginated
  • Expensive ops not in render loops
  • Error handling appropriate
  • 无N+1查询问题
  • 大型列表已分页
  • 渲染循环中无昂贵操作
  • 错误处理得当

Medium Priority (Maintainability)

中优先级(可维护性)

  • Functions have single responsibility
  • No copy-paste duplication
  • Naming is clear
  • 函数遵循单一职责原则
  • 无复制粘贴的重复代码
  • 命名清晰易懂

Output Format

输出格式

markdown
undefined
markdown
undefined

Summary

总结

[Approve / Request Changes / Discuss]
[批准 / 请求变更 / 讨论]

🚨 Blockers

🚨 阻塞项

  • file:line
    - Issue and fix
  • 文件:行号
    - 问题及修复方案

⚠️ Suggestions

⚠️ 建议项

  • file:line
    - Suggestion and why
  • 文件:行号
    - 建议及原因

💭 Nits

💭 细微优化

  • file:line
    - Minor improvement
  • 文件:行号
    - 小幅改进建议

✨ Good Stuff

✨ 亮点

  • What was done well
undefined
  • 做得好的地方
undefined

Common Issues

常见问题

React: Missing useEffect deps, state that should be derived, prop drilling TypeScript:
any
types, missing null checks API: Missing loading/error states, unbounded queries
For detailed React/hooks patterns and accessibility checks, see REACT-PATTERNS.md.
React:缺少useEffect依赖项、应派生的状态、属性透传 TypeScript
any
类型、缺少空值检查 API:缺少加载/错误状态、无限制查询
如需了解详细的React/hooks模式和可访问性检查,请查看REACT-PATTERNS.md