kuju63 / kuju63/code-review-agents
[Sub-Issue] Comment Action API
- Dominant language
- HTML
- Stars
- 0
- Forks
- 0
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 96
Description
[サブイシュー] コメント操作API
#### 目的
レビューコメントの状態(Resolved, False Positive, Reopen)を更新するAPIを実装する。
#### 実装項目
1. **コメント状態更新API** `/reviews/{{reviewId}}/comments/{{commentId}}`
- PATCH で `{status}` を受け取り、コメントのステータスを更新。
- `status` は `resolved|false_positive|open`。
- ステータス変更後にレビュー全体のステータスを再計算し、`waiting`/`resolved` へ自動更新。
2. **未解決コメントリスト取得** `/reviews/{{reviewId}}/comments?status=open`
- 現在の未解決コメントを一覧で返す。
3. **エラーハンドリング**
- 無効ステータスは 422。
- 不正IDは 404。
#### テスト計画
- **ユニット**: Vitest でコメント状態バリデーション関数を検証。
- **インテグレーション**: Playwright で PATCH/GET 呼び出しと DB 変更を確認。
- **エンドツーエンド**: Playwright でフロントからコメント操作を行い、API 呼び出しが成功し UI が更新されるか検証。
- **コンポーネント**: Storybook でコメントスレッド UI のスナップショットを作成。
#### 参照
- 親 Issue #243
---
**備考**
- コメントの状態管理は `LeadEngineerReport` モデル内で保持。
Contributor guide
Research direction
Start by reading the LeadEngineerReport model and parent issue #243, then trace the existing review and comment API entry points for the listed endpoints. Use Vitest for status validation, Playwright for PATCH/GET and end-to-end checks, and Storybook for the comment-thread snapshot; done means valid updates recalculate review status and invalid statuses or IDs return 422 or 404.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, playwright, storybook
- Domain
- backend-api-design, databases, frontend, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100