Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 22 minutes and 56 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
Walkthrough
Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/components/wrappers/LinkCardDetailPanel/Sections/SummarySection.tsx`:
- Around line 36-38: The onRetrySummary handler currently only logs to console
and must call the backend retry API; replace the console.log in onRetrySummary
with a useMutation-based call (e.g., create a retrySummary mutation via
useMutation or a provided useRetrySummary hook) and invoke its mutate/trigger
method inside onRetrySummary, handling loading, success and error states (update
local state or refetch summary on success and show an error toast or set error
state on failure); ensure you reference and import the mutation hook and use the
exact handler name onRetrySummary and the mutation identifier (e.g.,
retrySummaryMutation or useRetrySummary) so the "다시 시도" button actually performs
the backend retry.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 7ed45d93-8f61-4c1c-b284-d4c13e044180
📒 Files selected for processing (2)
src/components/wrappers/LinkCardDetailPanel/LinkCardDetailPanel.tsxsrc/components/wrappers/LinkCardDetailPanel/Sections/SummarySection.tsx
💤 Files with no reviewable changes (1)
- src/components/wrappers/LinkCardDetailPanel/LinkCardDetailPanel.tsx
926e18d to
6e8b0c0
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/apis/summary.ts (1)
14-16: 응답 검증 로직은 공통 헬퍼로 추출해도 좋겠습니다.Line 14-16 패턴이 같은 파일 내 여러 API 함수에서 반복됩니다. 공통화하면 에러 메시지/검증 기준 변경 시 누락 가능성을 줄일 수 있습니다.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/apis/summary.ts` around lines 14 - 16, Extract the repeated response validation (the body?.data && body.success check and throw new Error(body?.message ?? 'Invalid response structure')) into a shared helper such as validateApiResponse(response) and replace the in-place checks in all API functions in this file with calls to that helper; ensure the helper accepts the raw body, performs the same conditional (checking body?.data and body.success), throws the same Error message when invalid, and export/import it where needed so all API handlers use a single canonical validation point.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/app/api/links/`[id]/retry-summary/route.ts:
- Around line 10-11: The current id check (using isNaN) allows negative and
non-integer values like -1 or 1.5; update the validation in the request handler
so id is parsed to a number and explicitly required to be a positive integer
(e.g., use Number(...) or parseInt then assert Number.isInteger(id) && id > 0)
before proceeding; change the early return in the route (the block that
currently returns NextResponse.json({ success: false, message: 'Invalid id.' },
{ status: 400 })) to trigger when the id fails this positive-integer test and
reference the same id variable used in the handler.
---
Nitpick comments:
In `@src/apis/summary.ts`:
- Around line 14-16: Extract the repeated response validation (the body?.data &&
body.success check and throw new Error(body?.message ?? 'Invalid response
structure')) into a shared helper such as validateApiResponse(response) and
replace the in-place checks in all API functions in this file with calls to that
helper; ensure the helper accepts the raw body, performs the same conditional
(checking body?.data and body.success), throws the same Error message when
invalid, and export/import it where needed so all API handlers use a single
canonical validation point.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 2ac2fb38-91e3-4b05-a3cf-e508ab5a3de5
📒 Files selected for processing (5)
src/apis/summary.tssrc/app/api/links/[id]/retry-summary/route.tssrc/components/wrappers/LinkCardDetailPanel/LinkCardDetailPanel.tsxsrc/components/wrappers/LinkCardDetailPanel/Sections/SummarySection.tsxsrc/hooks/useRetrySummary.ts
💤 Files with no reviewable changes (1)
- src/components/wrappers/LinkCardDetailPanel/LinkCardDetailPanel.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- src/components/wrappers/LinkCardDetailPanel/Sections/SummarySection.tsx
6e8b0c0 to
c1b732c
Compare
|
🚀 storybook url: https://689bfce92a7bd08f5aa1edbe-lcrvsqwpoo.chromatic.com/ |
c1b732c to
3dfd89c
Compare
|
🚀 storybook url: https://689bfce92a7bd08f5aa1edbe-vggsolxdor.chromatic.com/ |
관련 이슈
PR 설명