채팅 이미지 CDN 호스트 타입 처리 및 React19 ref 타입 정합성 수정#430
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Warning Rate limit exceeded
⌛ 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. Walkthrough이 풀 리퀘스트는 프로젝트 전반에 걸쳐 여러 개선 사항을 도입합니다. 다음의 변경 사항들이 포함되어 있습니다:
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Suggested reviewers
🚥 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 |
|
Deployment failed with the following error: Learn More: https://vercel.com/mannomis-projects?upgradeToPro=build-rate-limit |
|
Deployment failed with the following error: Learn More: https://vercel.com/mannomis-projects?upgradeToPro=build-rate-limit |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.husky/pre-commit (1)
30-34:⚠️ Potential issue | 🟡 Minor체크를 건너뛴 경우에도 "✅ CI parity checks passed!" 메시지가 출력됩니다.
RUN_WEB=0 && RUN_ADMIN=0일 때 Line 31에서 "변경 없음" 메시지를 출력한 후, Line 34에서 "체크 통과" 메시지도 함께 출력되어 혼동을 줄 수 있습니다.🔧 제안: 성공 메시지를 조건부로 변경
if [ "$RUN_WEB" -eq 0 ] && [ "$RUN_ADMIN" -eq 0 ]; then echo "ℹ️ No CI-targeted changes detected; skipping parity checks." +else + echo "✅ CI parity checks passed!" fi - -echo "✅ CI parity checks passed!"
🤖 Fix all issues with AI agents
In @.husky/pre-push:
- Around line 45-49: The current pre-push script prints "CI parity checks
passed!" unconditionally even when both RUN_WEB and RUN_ADMIN are 0; update the
conditional so the success message is only printed when parity checks actually
ran. Concretely, adjust the if/else around the existing block that checks
RUN_WEB and RUN_ADMIN (the shell variables RUN_WEB and RUN_ADMIN and the echo
"ℹ️ No CI-targeted changes detected; skipping parity builds.") so that the echo
"✅ CI parity checks passed!" is emitted in the branch where checks were executed
(i.e., when either RUN_WEB or RUN_ADMIN is non-zero), mirroring the conditional
behavior used in the pre-commit hook.
In `@docs/skills/biome-unification-ci-skill.md`:
- Around line 10-15: Update the Web type-check command in the docs: replace the
CI-only script `pnpm --filter `@solid-connect/web` run typecheck:ci` with the
local/dev-friendly `pnpm --filter `@solid-connect/web` run typecheck` (so it
matches the recommended `typecheck` script used for local pre-push checks and
aligns with Admin). Target the Web section entry that currently lists
`typecheck:ci` and change it to `typecheck`.
🧹 Nitpick comments (1)
apps/web/src/app/(home)/_ui/NewsSection/_hooks/useSectionHadnler.ts (1)
1-38: 참고: 파일명 오타useSectionHadnler.ts→useSectionHandler.ts기존부터 존재하는 오타이지만, 추후 리네이밍을 고려해 보셔도 좋을 것 같습니다. 이번 PR 범위 밖이라 급하지는 않습니다. 😊
| if [ "$RUN_WEB" -eq 0 ] && [ "$RUN_ADMIN" -eq 0 ]; then | ||
| echo "ℹ️ No CI-targeted changes detected; skipping parity builds." | ||
| fi | ||
|
|
||
| echo "✅ CI parity builds passed!" | ||
| echo "✅ CI parity checks passed!" |
There was a problem hiding this comment.
pre-commit과 동일한 문제: 체크 미실행 시에도 성공 메시지가 출력됩니다.
Line 46에서 "skipping parity builds"를 출력하고, Line 49에서 "CI parity checks passed!"도 출력됩니다. pre-commit 훅과 동일하게 조건부 처리를 권장합니다.
🔧 제안
if [ "$RUN_WEB" -eq 0 ] && [ "$RUN_ADMIN" -eq 0 ]; then
echo "ℹ️ No CI-targeted changes detected; skipping parity builds."
+else
+ echo "✅ CI parity checks passed!"
fi
-
-echo "✅ CI parity checks passed!"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if [ "$RUN_WEB" -eq 0 ] && [ "$RUN_ADMIN" -eq 0 ]; then | |
| echo "ℹ️ No CI-targeted changes detected; skipping parity builds." | |
| fi | |
| echo "✅ CI parity builds passed!" | |
| echo "✅ CI parity checks passed!" | |
| if [ "$RUN_WEB" -eq 0 ] && [ "$RUN_ADMIN" -eq 0 ]; then | |
| echo "ℹ️ No CI-targeted changes detected; skipping parity builds." | |
| else | |
| echo "✅ CI parity checks passed!" | |
| fi |
🤖 Prompt for AI Agents
In @.husky/pre-push around lines 45 - 49, The current pre-push script prints "CI
parity checks passed!" unconditionally even when both RUN_WEB and RUN_ADMIN are
0; update the conditional so the success message is only printed when parity
checks actually ran. Concretely, adjust the if/else around the existing block
that checks RUN_WEB and RUN_ADMIN (the shell variables RUN_WEB and RUN_ADMIN and
the echo "ℹ️ No CI-targeted changes detected; skipping parity builds.") so that
the echo "✅ CI parity checks passed!" is emitted in the branch where checks were
executed (i.e., when either RUN_WEB or RUN_ADMIN is non-zero), mirroring the
conditional behavior used in the pre-commit hook.
| ### Web | ||
|
|
||
| - 자동 수정: `pnpm --filter @solid-connect/web run lint` | ||
| - 체크 전용: `pnpm --filter @solid-connect/web run lint:check` | ||
| - 타입 체크: `pnpm --filter @solid-connect/web run typecheck:ci` | ||
| - CI 체크: `pnpm --filter @solid-connect/web run ci:check` |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
echo "=== Checking Web package.json for typecheck scripts ==="
fd -t f 'package.json' apps/web --max-depth 1 -x jq -r '.scripts | to_entries[] | select(.key | test("typecheck")) | "\(.key): \(.value)"' {}
echo ""
echo "=== Checking Admin package.json for typecheck scripts ==="
fd -t f 'package.json' apps/admin --max-depth 1 -x jq -r '.scripts | to_entries[] | select(.key | test("typecheck")) | "\(.key): \(.value)"' {}Repository: solid-connection/solid-connect-web
Length of output: 287
Web 타입 체크 명령어를 typecheck로 수정하세요.
Web package.json에는 typecheck:ci 스크립트가 실제로 존재하여 문서는 기술적으로 정확합니다. 다만:
- 현재 상황:
typecheck:ci는 CI 환경용 전용 스크립트로tsconfig.ci.json을 사용합니다 - 권장 사항: 로컬 개발 및 사전 푸시 검사에는
typecheck스크립트를 사용해야 합니다 - 문서 수정 필요: Line 14를
pnpm --filter@solid-connect/webrun typecheck로 변경하여 Admin과의 일관성을 유지하세요
🤖 Prompt for AI Agents
In `@docs/skills/biome-unification-ci-skill.md` around lines 10 - 15, Update the
Web type-check command in the docs: replace the CI-only script `pnpm --filter
`@solid-connect/web` run typecheck:ci` with the local/dev-friendly `pnpm --filter
`@solid-connect/web` run typecheck` (so it matches the recommended `typecheck`
script used for local pre-push checks and aligns with Admin). Target the Web
section entry that currently lists `typecheck:ci` and change it to `typecheck`.
c89664c to
98b4988
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
docs/development-workflow.md (1)
89-94:⚠️ Potential issue | 🟡 Minorpre-push 섹션에
ci:check실행 내용이 누락되었습니다.실제
.husky/pre-push훅에서는 빌드 전에ci:check도 실행하도록 변경되었는데, 이 문서의 pre-push 설명에는 빌드 명령만 기재되어 있습니다. pre-commit 섹션(Line 86-87)에서ci:check을 잘 안내하고 있으니, pre-push 섹션도 동일하게 맞춰주면 좋겠습니다.📝 제안: pre-push 설명에 ci:check 추가
#### pre-push -- 푸시 전 GitHub CI 빌드 단계와 동일한 빌드를 실행합니다. +- 푸시 전 GitHub CI와 동일한 품질 검사 및 빌드를 실행합니다. - 실행 명령: + - `pnpm --filter `@solid-connect/web` run ci:check` - `pnpm --filter `@solid-connect/web` run build` + - `pnpm --filter `@solid-connect/admin` run ci:check` - `pnpm --filter `@solid-connect/admin` run build`apps/web/src/components/ui/BottomSheet/hooks/useHandleModal.ts (2)
1-1:⚠️ Potential issue | 🔴 CriticalCI 실패 원인:
RefObject임포트가 누락되었습니다.
- Line 9에서
RefObject<HTMLDivElement>를 사용하고 있지만, Line 1의 import 목록에RefObject가 포함되어 있지 않습니다.- 파이프라인 에러 메시지(
TS2552: Cannot find name 'RefObject')가 이를 정확히 가리키고 있습니다.🐛 수정 제안
-import { type MutableRefObject, useCallback, useEffect, useMemo, useRef, useState } from "react"; +import { type MutableRefObject, type RefObject, useCallback, useEffect, useMemo, useRef, useState } from "react";Also applies to: 8-9
117-125:⚠️ Potential issue | 🔴 Critical인터페이스에 선언된
elementRef가 반환 객체에 누락되었습니다.
UseHandleModalReturn인터페이스(Line 9)에elementRef: RefObject<HTMLDivElement>가 선언되어 있습니다.- Line 26에서
elementRef를 생성하고 있지만, 반환 객체(Line 117-125)에는 포함되지 않았습니다.- 이 상태로는 TypeScript가 반환 타입 불일치 에러를 발생시킬 수 있으며, 소비 측에서
elementRef에 접근할 수 없습니다.🐛 수정 제안
return { + elementRef, isVisible, translateY, isDraggingRef, handleClose, handleTouchStart, handleTouchMove, handleTouchEnd, };
🤖 Fix all issues with AI agents
In `@apps/web/src/app/university/application/ScorePageContent.tsx`:
- Line 25: The non-null assertion on searchRef (const searchRef =
useRef<HTMLInputElement>(null!)) is a workaround for a React/@types version
mismatch; fix by aligning React runtime and types (either downgrade `@types/react`
to 18.x or upgrade react/react-dom to 19.x) and make the ref type-safe: change
the ref declaration to useRef<HTMLInputElement | null>(null) in ScorePageContent
(symbol: searchRef) and update any usages to handle possible null (optional
chaining or null checks) instead of relying on null!.
🧹 Nitpick comments (1)
apps/web/src/app/(home)/_ui/NewsSection/_hooks/useSectionHadnler.ts (1)
1-1: 참고(nit): 파일명에 오타가 있습니다.
useSectionHadnler.ts→useSectionHandler.ts로 보입니다. 이번 PR 범위는 아닐 수 있지만, 추후 정리 시 참고해 주세요.
| const ScorePageContent = () => { | ||
| const router = useRouter(); | ||
| const searchRef = useRef<HTMLInputElement | null>(null); | ||
| const searchRef = useRef<HTMLInputElement>(null!); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# apps/web/package.json에서 React와 `@types/react` 버전 확인
find apps/web -maxdepth 2 -name "package.json" -type f -exec sh -c 'echo "=== {} ===" && cat "$1" | jq -r ".dependencies.react, .devDependencies[\"@types/react\"], .dependencies[\"react\"]" ' _ {} \;Repository: solid-connection/solid-connect-web
Length of output: 123
🏁 Script executed:
# apps/web/COMPONENTS.md 확인
cat apps/web/COMPONENTS.md 2>/dev/null || echo "File not found"Repository: solid-connection/solid-connect-web
Length of output: 9064
🏁 Script executed:
# ScorePageContent.tsx의 searchRef 사용 전체 확인
sed -n '20,160p' apps/web/src/app/university/application/ScorePageContent.tsx | cat -nRepository: solid-connection/solid-connect-web
Length of output: 6029
React 버전 불일치 해결이 필요합니다.
현재 프로젝트의 의존성 구성에 다음과 같은 버전 불일치가 있습니다:
-
Runtime과 Type 정의 버전 불일치
- React 실행 환경: ^18 (React 18.x)
- React 타입 정의: 19.2.10 (
@types/react19.x)
-
null!패턴의 원인useRef<HTMLInputElement>(null!)의 non-null assertion은 React 18 타입과 React 19 타입의 불일치를 우회하기 위한 임시 해결책입니다.- React 19 타입에서는
RefObject<T>의 타입 정의가 변경되어 이러한 workaround가 필요합니다.
-
권장 해결 방안
@types/react를 18.x로 downgrade하여 런타임 버전과 일치시키거나- React를 19.x로 upgrade하여 타입 정의와 일치시키세요.
- 현재 코드는 optional chaining과 null check로 안전하게 동작하지만, 타입 시스템의 일관성을 위해 버전 정렬이 필요합니다.
🤖 Prompt for AI Agents
In `@apps/web/src/app/university/application/ScorePageContent.tsx` at line 25, The
non-null assertion on searchRef (const searchRef =
useRef<HTMLInputElement>(null!)) is a workaround for a React/@types version
mismatch; fix by aligning React runtime and types (either downgrade `@types/react`
to 18.x or upgrade react/react-dom to 19.x) and make the ref type-safe: change
the ref declaration to useRef<HTMLInputElement | null>(null) in ScorePageContent
(symbol: searchRef) and update any usages to handle possible null (optional
chaining or null checks) instead of relying on null!.
Summary
FallbackImage에cdnHostType(default/upload) prop을 추가해 상대 경로 이미지 URL을 CDN 호스트 기준으로 정규화하도록 구현했습니다.ChatMessageBox)과 프로필 이미지(ProfileWithBadge)에uploadCDN 호스트 타입을 적용했습니다.web ci:check)를 통과하기 위해 React 19 타입 기준 ref 시그니처 불일치 6건(RefObject<T | null>->RefObject<T>)을 함께 정리했습니다.Verification
pnpm --filter @solid-connect/web run ci:check통과pnpm --filter @solid-connect/web run build통과