Conversation
Walkthrough전체링크 페이지의 로딩 및 에러 상태 UI가 조정되었습니다. AllLink 컴포넌트에서 로딩 상태는 전체 높이와 너비를 차지하는 컨테이너로 감싸지고 Spinner에 explicit size 값이 전달되었습니다. 에러 상태도 유사하게 더 명확한 flex 컨테이너로 구성되었습니다. 동시에 Spinner 컴포넌트는 string 기반 size 옵션뿐 아니라 숫자 값도 수용하도록 타입이 확장되었으며, 런타임 타입 체크를 통해 적절한 크기를 계산합니다. 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.
🧹 Nitpick comments (1)
src/components/basics/Spinner/Spinner.tsx (1)
19-20: 숫자size입력에 대한 최소값/유효성 보정이 필요합니다.Line 19에서
number를 그대로 사용하면 0, 음수,NaN입력 시 SVG 반지름 계산(Line 20)이 깨질 수 있습니다. 안전한 하한과 기본값으로 정규화해 주세요.수정 예시
- const spinnerSize = typeof size === 'number' ? size : sizeMap[size]; + const spinnerSize = + typeof size === 'number' + ? Number.isFinite(size) + ? Math.max(size, strokeWidth + 2) + : sizeMap.md + : sizeMap[size];🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/basics/Spinner/Spinner.tsx` around lines 19 - 20, The spinnerSize calculation must normalize numeric `size` inputs to avoid 0, negative or NaN values breaking the SVG radius; update the `spinnerSize` logic in Spinner.tsx so that when `size` is a number you coerce it (Number(size)), check Number.isFinite, and clamp it to a safe minimum (for example Math.max(Number(size) || 0, strokeWidth * 2 + 1) or fall back to a default like sizeMap.medium) before using it in the `radius` computation; ensure you still support string sizes via `sizeMap[size]` and use the same `spinnerSize` const and `strokeWidth` symbol names so `radius` = (spinnerSize - strokeWidth) / 2 remains valid.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/components/basics/Spinner/Spinner.tsx`:
- Around line 19-20: The spinnerSize calculation must normalize numeric `size`
inputs to avoid 0, negative or NaN values breaking the SVG radius; update the
`spinnerSize` logic in Spinner.tsx so that when `size` is a number you coerce it
(Number(size)), check Number.isFinite, and clamp it to a safe minimum (for
example Math.max(Number(size) || 0, strokeWidth * 2 + 1) or fall back to a
default like sizeMap.medium) before using it in the `radius` computation; ensure
you still support string sizes via `sizeMap[size]` and use the same
`spinnerSize` const and `strokeWidth` symbol names so `radius` = (spinnerSize -
strokeWidth) / 2 remains valid.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: f84a62a7-223b-4348-a150-cd99c49e4052
📒 Files selected for processing (2)
src/app/(route)/all-link/AllLink.tsxsrc/components/basics/Spinner/Spinner.tsx
관련 이슈
PR 설명
2026-03-24.20.24.44.mov