Skip to content

Conversation

@yeonjin719
Copy link
Member

🚨 관련 이슈

✨ 변경사항

  • 🐞 BugFix Something isn't working
  • 💻 CrossBrowsing Browser compatibility
  • 🌏 Deploy Deploy
  • 🎨 Design Markup & styling
  • 📃 Docs Documentation writing and editing (README.md, etc.)
  • ✨ Feature Feature
  • 🔨 Refactor Code refactoring
  • ⚙️ Setting Development environment setup
  • ✅ Test Test related (storybook, jest, etc.)

✏️ 작업 내용

  • 작업 내용

😅 미완성 작업

  • Task1

📢 논의 사항 및 참고 사항

@yeonjin719 yeonjin719 self-assigned this Aug 16, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 16, 2025

Caution

Review failed

The pull request is closed.

Summary by CodeRabbit

  • New Features

    • 로딩 상태에서 스피너(ClipLoader) 표시로 진행 상황 가시화
    • 데이터/요청 오류 발생 시 /error로 이동
    • 인증 실패(401 등) 시 자동 로그아웃 및 홈(/)으로 리다이렉트
    • 북마크 코스에 추가 필터(시간/장소/식사/이동수단/키워드/시작시간) 적용
    • 헤더에 사용자 이름 노출
  • Bug Fixes

    • 페이지네이션 내부를 0기반으로 정리하고 UI는 1기반 유지해 페이지 표시 일관성 개선
    • 로딩/에러 분기 명확화로 예외 상황에서의 안정성 향상

Walkthrough

  • axios 응답 인터셉터에서 401 및 토큰 갱신 실패 시 로그아웃, localStorage 정리, "/" 리다이렉트 경로 추가.
  • 세 컴포넌트에 로딩/에러 상태 도입: 로딩 시 ClipLoader 표시, 에러 시 /error로 이동.
  • 페이지네이션 내부 인덱스를 0 기반으로 변경하고 UI 표시는 1 기반 유지.
  • 즐겨찾기 코스 조회에 추가 필터 전달.

Changes

Cohort / File(s) Change Summary
Axios 401/갱신 실패 처리 보강
src/api/axiosInstance.ts
401 상황에서 진행 중 리다이렉트 시에도 "/"로 이동 처리 추가. 토큰 갱신 실패(401/404/기타) 및 비-Axios 에러에서 로그, 로그아웃, localStorage 정리 후 "/"로 리다이렉트. 공개 API 시그니처 변경 없음.
모달: 로딩/에러 제어 추가
src/components/modal/dateCourseSearchFilterModal.tsx
useGetCourse/useGetBookmarkedCourse에서 isLoading/error 활용. 에러 시 /error로 Navigate. 로딩 시 하단 버튼 대신 ClipLoader 표시. 공통 파라미터 page 1→0.
북마크 코스 페이지 개선
src/pages/dateCourse/CoursePage.tsx
로딩/에러 상태 도입(ClipLoader, /error 리다이렉트). 내부 페이지 0 기반, Navigator엔 current+1 전달. useGetBookmarkedCourse에 추가 필터 포함. useUserGrade로 사용자명 표시.
코스 찾기 페이지 개선
src/pages/dateCourse/FindDateCourse.tsx
로딩/에러 분기 추가(ClipLoader, /error Navigate). 데이터 접근 경로 업데이트. 내부 페이지 0 기반, Navigator엔 current+1 전달.

Sequence Diagram(s)

sequenceDiagram
  participant UI as App
  participant AX as axiosInstance
  participant API as Server

  UI->>AX: Request
  AX->>API: Send HTTP request
  API-->>AX: Response (401 or refresh error)
  alt 401 with redirect in progress
    AX->>UI: redirect to "/"
  else Refresh attempt fails or non-Axios error
    AX->>UI: logout + clear localStorage
    AX->>UI: redirect to "/"
  end
Loading
sequenceDiagram
  participant User
  participant Page as React Page
  participant Hook as Data Hook
  participant API as Server

  User->>Page: Open page
  Page->>Hook: useGet*(filters, page=0-based)
  Hook->>API: Fetch data
  alt Loading
    Page-->>User: Show ClipLoader
  else Error
    Page-->>User: Navigate to "/error"
  else Success
    Page-->>User: Render list + Navigator(current+1)
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • [Deploy] 배포 #114: axiosInstance 응답 인터셉터의 401/404 처리 및 로그아웃/리다이렉트 로직을 유사하게 수정하여, 동일 영역의 에러 처리 개선과 직접적으로 연관됨.

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear 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 8576692 and 9e05beb.

📒 Files selected for processing (4)
  • src/api/axiosInstance.ts (2 hunks)
  • src/components/modal/dateCourseSearchFilterModal.tsx (4 hunks)
  • src/pages/dateCourse/CoursePage.tsx (4 hunks)
  • src/pages/dateCourse/FindDateCourse.tsx (4 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@yeonjin719 yeonjin719 merged commit bc8a580 into main Aug 16, 2025
2 of 3 checks passed
This was referenced Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants