Skip to content

Conversation

@heeeeyong
Copy link
Collaborator

@heeeeyong heeeeyong commented Sep 22, 2025

이하동일

Summary by CodeRabbit

  • New Features
    • 알림 페이지가 서버와 연동되고 무한 스크롤을 지원합니다. 읽음 상태·분류·시간 표시가 실제 데이터로 반영됩니다.
    • 마이페이지 탈퇴가 실제로 처리되며, 성공/오류에 따른 안내와 이동, 스낵바 피드백을 제공합니다.
    • 완료된 모임 모달에서 카드 클릭 시 모임 상세로 이동할 수 있습니다.
    • 피드/모임 상단에 알림 버튼이 추가되어 알림 화면으로 바로 이동합니다.
    • 소셜 로그인/회원가입 토큰 흐름 개선: 신규 사용자 임시 토큰 지원, 인증 필요 시 홈으로 안내됩니다.

@vercel
Copy link

vercel bot commented Sep 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
thip Ready Ready Preview Comment Sep 22, 2025 3:23pm

@coderabbitai
Copy link

coderabbitai bot commented Sep 22, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

인증 토큰 흐름에 preAuthToken/isNewUser를 도입하고, 요청 인터셉터 로직을 갱신했습니다. 알림 목록 API/페이지를 신설하여 페이징 로딩을 구현했습니다. 회원 탈퇴 API를 추가하고 마이페이지 탈퇴 플로우에 연동했습니다. 그룹 카드/모달 UI 조건 로직을 조정하고, 피드/그룹 헤더에 공지 이동을 추가했습니다.

Changes

Cohort / File(s) Summary
Auth 토큰/인터셉터/회원가입 흐름
src/api/auth/getToken.ts, src/api/index.ts, src/hooks/useSocialLoginToken.ts, src/pages/signup/SignupNickname.tsx, src/pages/signup/SignupGenre.tsx
getToken 응답에 isNewUser 추가. 신규 사용자는 토큰을 preAuthToken으로 저장하고 기존 사용자는 authToken으로 저장. 인터셉터는 publicPaths/signupPaths에 따라 authToken 또는 preAuthToken을 헤더에 설정, 미충족 시 요청 취소 및 홈 리다이렉트. 회원가입 완료 시 preAuthToken 제거. 닉네임 검증 시 preAuthToken 사용.
알림 기능 추가
src/api/notifications/getNotifications.ts, src/pages/notice/Notice.tsx, src/pages/feed/Feed.tsx, src/pages/group/Group.tsx
알림 조회 API 모듈 신설(타입, 파라미터, 응답). 공지 페이지는 API 기반으로 데이터 로딩, 커서 페이징 및 IntersectionObserver로 무한 스크롤 구현. 피드/그룹 페이지 헤더에 공지로 이동하는 rightButtonClick 연결.
회원 탈퇴 연동
src/api/users/deleteUsers.ts, src/pages/mypage/WithdrawPage.tsx
DELETE /users API 래퍼 추가. 탈퇴 확인 시 API 호출, 성공 시 완료 페이지 이동 및 토큰 정리, 실패 시 서버 메시지로 스낵바 노출. 에러 메시지 파싱 처리 추가. 스타일/문구 일부 조정.
그룹 UI 조정
src/components/group/CompletedGroupModal.tsx, src/components/group/GroupCard.tsx, src/components/group/MyGroupBox.tsx
완료 모달에서 그룹 카드 클릭 시 상세로 네비게이션 추가. Group 타입에 type(옵션) 추가 및 변환 로직 보강. 모달 컨텍스트에서 만료된 항목은 마감 컴포넌트 비표시. 단일 아이템 그리드 폭 보정.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant App
  participant API as apiClient (interceptor)
  participant Svr as Server

  User->>App: 네비게이션/액션으로 API 호출
  App->>API: request(config)
  alt authToken 존재
    API->>Svr: Authorization: Bearer authToken
  else signup 경로 AND preAuthToken 존재
    API->>Svr: Authorization: Bearer preAuthToken
  else 공개 경로
    API->>Svr: (헤더 없음)
  else 비공개 경로 AND 토큰 없음
    API-->>App: 요청 취소(redirect to /)
    App->>User: 홈으로 이동
  end
  Svr-->>API: response / 401
  alt 401
    API->>App: 401 처리(홈 리다이렉트)
  else 성공
    API-->>App: response.data
  end
Loading
sequenceDiagram
  autonumber
  actor User as 신규 소셜 로그인 사용자
  participant App
  participant Auth as getToken
  Note over App,Auth: 콜백으로 토큰 교환
  App->>Auth: GET /auth/token
  Auth-->>App: { token, isNewUser: true }
  App->>App: preAuthToken 저장, authToken 제거
  App->>User: 회원가입 플로우로 진행
  User->>App: 회원가입 완료
  App->>App: authToken 저장, preAuthToken 제거
Loading
sequenceDiagram
  autonumber
  actor User
  participant Notice as Notice Page
  participant API as getNotifications
  User->>Notice: 스크롤/탭 전환
  Notice->>API: /notifications?cursor=...&type=feed|room
  API-->>Notice: { notifications, nextCursor, isLast }
  alt isLast=false
    Notice->>User: 다음 페이지 준비
  else
    Notice->>User: 더 이상 없음
  end
Loading
sequenceDiagram
  autonumber
  actor User
  participant Page as WithdrawPage
  participant API as deleteUsers
  User->>Page: 탈퇴 확인
  Page->>API: DELETE /users
  alt 성공
    API-->>Page: { isSuccess: true, data: null }
    Page->>Page: 토큰 정리
    Page->>User: 완료 페이지로 이동
  else 실패
    API-->>Page: 에러/메시지
    Page->>User: 스낵바로 오류 안내
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

📬 API, ✨ Feature

Poem

토끼는 톡톡, 알림을 줍네 📬
새싹 토큰은 품고, 가입 길로 뛰네 🌱
오래된 귀는 조용히 말해, 이제는 굿바이… 🕊️
딸깍, 모임 문으로 점프! 🐇
코드 숲에 새 길 터서, 오늘도 한 바늘 더.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d06496b and 50ec1d7.

📒 Files selected for processing (14)
  • src/api/auth/getToken.ts (1 hunks)
  • src/api/index.ts (1 hunks)
  • src/api/notifications/getNotifications.ts (1 hunks)
  • src/api/users/deleteUsers.ts (1 hunks)
  • src/components/group/CompletedGroupModal.tsx (4 hunks)
  • src/components/group/GroupCard.tsx (1 hunks)
  • src/components/group/MyGroupBox.tsx (1 hunks)
  • src/hooks/useSocialLoginToken.ts (2 hunks)
  • src/pages/feed/Feed.tsx (2 hunks)
  • src/pages/group/Group.tsx (2 hunks)
  • src/pages/mypage/WithdrawPage.tsx (6 hunks)
  • src/pages/notice/Notice.tsx (6 hunks)
  • src/pages/signup/SignupGenre.tsx (1 hunks)
  • src/pages/signup/SignupNickname.tsx (1 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@heeeeyong heeeeyong self-assigned this Sep 22, 2025
@heeeeyong heeeeyong added the 🌏 Deploy 배포 관련 label Sep 22, 2025
@heeeeyong heeeeyong merged commit fd55fd6 into main Sep 22, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🌏 Deploy 배포 관련

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants