Conversation
Walkthrough프로젝트/에디터에서 이미지 렌더링을 임시 제거하고(주석 처리), 로그아웃을 서버 API 호출로 변경하며 보호된 경로에서 로그아웃 시 홈으로 리다이렉트하도록 제어 흐름을 확장했습니다. 또한 BottomComment의 숨김 제어를 CSS display에서 pointerEvents 기반으로 전환하고, 로그인 소셜 버튼에서 네이버를 제거했습니다. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/app/(main)/teampsylog/_components/BottomComment.tsx (1)
40-52:⚠️ Potential issue | 🟠 Major닫힌 상태에서 시트 내부 포커스가 살아있는 접근성 이슈가 있습니다.
현재는
pointerEvents: none만 적용되어 닫힌 상태(!shouldShow)에서도 키보드 Tab 포커스/스크린리더 접근이 가능합니다. 닫힐 때는 시트 자체를 접근성 트리/탭 순서에서 제외해 주세요.수정 예시
- <div - className="desktop:hidden fixed inset-x-0 bottom-0 z-50 flex rounded-t-2xl bg-gray-200" + <div + className={`desktop:hidden fixed inset-x-0 bottom-0 z-50 rounded-t-2xl bg-gray-200 ${ + shouldShow ? 'flex' : 'hidden' + }`} + aria-hidden={!shouldShow} style={{ height: '70vh', maxHeight: '70vh', flexDirection: 'column',🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/app/`(main)/teampsylog/_components/BottomComment.tsx around lines 40 - 52, The sheet remains keyboard/screen-reader focusable when closed because only pointerEvents is toggled; update the BottomComment container (where isDragging, isOpen, isClosing, shouldShow are used) to remove it from the accessibility tree when closed by either unmounting it or adding accessibility attributes: set aria-hidden={!shouldShow} and hidden={!shouldShow} (or apply display: 'none' when !shouldShow), and/or add the inert attribute (or programmatically remove tab stops) so no elements inside can receive focus while closed; ensure any focus trap is released when shouldShow becomes false.
🧹 Nitpick comments (1)
src/components/login/LoginSocialList.tsx (1)
75-75: 네이버 제거가 확정이라면 관련 분기 정리를 후속으로 묶어 주세요.Line [75]에서 버튼 노출만 제거된 상태라, 이 파일의
SocialType,handleNaverLogin,socialConfig.naver, 쿠키 allow-list(Line [68])와 분리되어 있습니다. 또한src/app/(auth)/(callback)/naver/oauth/NaverCallback.tsx(Line 18-26, Line 36-41)에는 네이버 콜백 처리/쿠키 기록이 남아 있어 정책이 UI와 콜백에서 이원화되어 보입니다. 삭제 확정 정책이면 코드 경로를 함께 정리하는 쪽이 유지보수에 유리합니다.필요하시면 네이버 관련 분기를 안전하게 정리하는 후속 패치 초안(타입/설정/쿠키/콜백 경로 정리)도 바로 작성해드릴게요.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/login/LoginSocialList.tsx` at line 75, The code currently only hides the Naver button but leaves related branches scattered; remove Naver across types, handlers, config and cookie allow-list to avoid divergence: remove 'naver' from the SocialType union and the fixedOrder array, delete or inline handleNaverLogin and any references to socialConfig.naver, update the cookie allow-list to exclude Naver, and remove or refactor the Naver callback handling in NaverCallback.tsx (cookie write/processing) so the UI, config, and callback codepaths are consistent; ensure imports and any tests referencing 'naver' are updated accordingly.
🤖 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/`(main)/project/[id]/_components/ProjectInfo.tsx:
- Around line 33-34: The ProjectImage component rendering was commented out in
ProjectInfo.tsx causing the project image to be hidden; revert that change by
restoring the JSX line that renders ProjectImage (remove the comment around
<ProjectImage {...data} />) so the component displays again — ProjectImage
(src/app/(main)/project/[id]/_components/ProjectImage.tsx) already returns null
when no image (lines ~4-20), so simply re-enable the <ProjectImage {...data} />
usage in ProjectInfo.tsx without adding extra guards.
In `@src/components/common/Header.tsx`:
- Around line 47-56: handleLogout currently only clears local state via
useUserStore.getState().clearUser(), which leaves server-side refresh
tokens/sessions active; change handleLogout to first call your logout API (e.g.,
auth.logout or POST /api/logout) to invalidate the server session, await its
result and handle errors, then on successful response clear local state
(useUserStore.getState().clearUser()), close dropdown/menu, show the toast, and
finally redirect (router.push('/')) if on a protected path; ensure any failure
still clears sensitive local state but surface an error toast/log for debugging.
In `@src/components/login/LoginSocialList.tsx`:
- Around line 74-75: 주석과 실제 값이 불일치합니다: 업데이트해야 할 부분은 상수 fixedOrder (type
SocialType) 선언 바로 위의 주석으로, 현재 실제 값은 ['kakao', 'google'] 이므로 주석을 "고정된 순서: 카카오,
구글"처럼 실제 렌더 순서와 일치하도록 수정하세요; 주석이 네이버를 포함하고 있으면 제거하거나 실제 배열에 네이버를 추가할지 결정 후 주석과
fixedOrder 값을 함께 일치시키면 됩니다.
In `@src/components/recruit/editor/TextContent.tsx`:
- Around line 93-94: Removing the <PostImage /> UI removed the effect in
PostImage.tsx that calls setValue('imageKeys', ...) and breaks image key sync;
restore that sync by explicitly initializing/preserving imageKeys when the
editor UI is disabled: add a useEffect in TextContent (or in RecruitForm where
initialImages is available) that calls the form's setValue('imageKeys',
initialImages || []) on mount and whenever initialImages changes, or reintroduce
a hidden PostImage-like helper component that re-runs the same logic from
PostImage.tsx (the setValue('imageKeys', ...) effect) so image keys are
preserved across save/update flows.
---
Outside diff comments:
In `@src/app/`(main)/teampsylog/_components/BottomComment.tsx:
- Around line 40-52: The sheet remains keyboard/screen-reader focusable when
closed because only pointerEvents is toggled; update the BottomComment container
(where isDragging, isOpen, isClosing, shouldShow are used) to remove it from the
accessibility tree when closed by either unmounting it or adding accessibility
attributes: set aria-hidden={!shouldShow} and hidden={!shouldShow} (or apply
display: 'none' when !shouldShow), and/or add the inert attribute (or
programmatically remove tab stops) so no elements inside can receive focus while
closed; ensure any focus trap is released when shouldShow becomes false.
---
Nitpick comments:
In `@src/components/login/LoginSocialList.tsx`:
- Line 75: The code currently only hides the Naver button but leaves related
branches scattered; remove Naver across types, handlers, config and cookie
allow-list to avoid divergence: remove 'naver' from the SocialType union and the
fixedOrder array, delete or inline handleNaverLogin and any references to
socialConfig.naver, update the cookie allow-list to exclude Naver, and remove or
refactor the Naver callback handling in NaverCallback.tsx (cookie
write/processing) so the UI, config, and callback codepaths are consistent;
ensure imports and any tests referencing 'naver' are updated accordingly.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e05f2a3c-469e-4ae9-bf7f-ae74c91cc2cf
📒 Files selected for processing (5)
src/app/(main)/project/[id]/_components/ProjectInfo.tsxsrc/app/(main)/teampsylog/_components/BottomComment.tsxsrc/components/common/Header.tsxsrc/components/login/LoginSocialList.tsxsrc/components/recruit/editor/TextContent.tsx
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
src/components/common/Header.tsx (1)
48-57:⚠️ Potential issue | 🟡 Minor실패한 로그아웃에도 성공 토스트가 뜹니다.
Line 49-57에서
logout()이 예외를 던져도finally에서 항상로그아웃 완료되었습니다.를 보여 줍니다. 로컬 정리는 유지하되, 서버 로그아웃 실패 시에는 별도 메시지로 분기해야 사용자에게 상태를 잘못 전달하지 않습니다.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/common/Header.tsx` around lines 48 - 57, In handleLogout, currently the success toast in the finally block is shown even when logout() throws; change the flow so that logout() is awaited inside try/catch: on success call useUserStore.getState().clearUser(), close UI (setIsProfileDropdownOpen(false), setIsMenuOpen(false)) and addToast with the success message, while in catch still clear local state (useUserStore.getState().clearUser(), close UI) but add a different error toast (e.g., '로그아웃에 실패했습니다.' plus optional error info); remove the unconditional addToast from the finally block so the toast is shown conditionally based on success/failure.
🤖 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/libs/api/auth.ts`:
- Around line 4-5: The logout function triggers the global 401
retry/login-redirect interceptor because it uses the default api client; change
logout (exported logout) to call a dedicated HTTP client that bypasses the
shared 401 interceptor (or use an existing option on the client to disable
interceptors) so the logout request does not trigger token-refresh/retry or
redirect logic. Locate the logout function and replace its use of api.post with
a no-interceptor client (e.g. apiNoRetry / apiWithoutAuthInterceptor) or create
such a client in the same module that clones the axios instance without the 401
handler; ensure CommonResponse<string> is preserved and that other logic in
logout remains unchanged.
---
Duplicate comments:
In `@src/components/common/Header.tsx`:
- Around line 48-57: In handleLogout, currently the success toast in the finally
block is shown even when logout() throws; change the flow so that logout() is
awaited inside try/catch: on success call useUserStore.getState().clearUser(),
close UI (setIsProfileDropdownOpen(false), setIsMenuOpen(false)) and addToast
with the success message, while in catch still clear local state
(useUserStore.getState().clearUser(), close UI) but add a different error toast
(e.g., '로그아웃에 실패했습니다.' plus optional error info); remove the unconditional
addToast from the finally block so the toast is shown conditionally based on
success/failure.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5040713c-6940-4921-b869-3907ef583720
📒 Files selected for processing (2)
src/components/common/Header.tsxsrc/libs/api/auth.ts
| export async function logout() { | ||
| const { data } = await api.post<CommonResponse<string>>('auth/logout'); |
There was a problem hiding this comment.
로그아웃 요청에 공용 401 재발급 인터셉터가 그대로 걸립니다.
Line 5는 src/libs/api/api.ts:43-67의 401 재시도//login 리다이렉트 경로를 그대로 타기 때문에, 액세스 토큰이 만료된 상태에서 로그아웃하면 세션을 한 번 더 연장하거나 의도치 않게 /login으로 튈 수 있습니다. 로그아웃 요청만큼은 이 인터셉터를 우회하는 별도 클라이언트나 예외 분기가 필요합니다.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/libs/api/auth.ts` around lines 4 - 5, The logout function triggers the
global 401 retry/login-redirect interceptor because it uses the default api
client; change logout (exported logout) to call a dedicated HTTP client that
bypasses the shared 401 interceptor (or use an existing option on the client to
disable interceptors) so the logout request does not trigger token-refresh/retry
or redirect logic. Locate the logout function and replace its use of api.post
with a no-interceptor client (e.g. apiNoRetry / apiWithoutAuthInterceptor) or
create such a client in the same module that clones the axios instance without
the 401 handler; ensure CommonResponse<string> is preserved and that other logic
in logout remains unchanged.
✅ PR 유형
어떤 변경 사항이 있었나요?
📌 관련 이슈번호
✅ Key Changes
📸 스크린샷 or 실행영상
🎸 기타 사항 or 추가 코멘트
Summary by CodeRabbit
릴리스 노트
버그 수정
기타 변경