Skip to content

Conversation

@cywin1018
Copy link
Contributor

@cywin1018 cywin1018 commented Sep 7, 2025

… 설정 추가; 에러 발생 시 리다이렉트 처리 로직 구현

🚀 풀 리퀘스트 제안

  • 기능 추가
  • 기능 삭제
  • 버그 수정
  • 스타일링
  • 의존성, 환경 변수, 빌드 관련 코드 업데이트
  • 기타

✈️ 관련 이슈

📋 작업 내용

📸 스크린샷 (선택 사항)

📄 기타

Summary by CodeRabbit

  • Bug Fixes
    • 오류 발생 시 Other Todo 리스트에서 자동으로 내 할 일 목록으로 이동하도록 변경해 혼란스러운 에러 화면 노출을 방지했습니다.
    • 데이터 요청의 자동 재시도와 창 포커스 시 자동 재요청을 비활성화하고, 캐시 신선도를 60초로 설정해 불필요한 트래픽과 중복 로딩을 줄였습니다.
    • 로딩 동작은 기존과 동일하게 유지됩니다.

… 설정 추가; 에러 발생 시 리다이렉트 처리 로직 구현
@cywin1018 cywin1018 requested a review from Chasyuss September 7, 2025 15:53
@coderabbitai
Copy link

coderabbitai bot commented Sep 7, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

  • useJobQuery: 업데이트된 useEachTodosQuery에 retry 비활성화, 포커스 리페치 비활성화, staleTime 60초 설정.
  • OtherTodoListPage: 오류 시 useEffect로 '/mytodo/list'로 라우팅하며, 기존 오류 UI 분기 제거. 로딩 분기는 유지.

Changes

Cohort / File(s) Summary
Query options tuning
src/hook/useJobQuery.ts
useQuery 옵션 추가: retry: false, refetchOnWindowFocus: false, staleTime: 60_000.
Error handling redirect
src/pages/otherTodoList/OtherTodoListPage.tsx
isError 발생 시 useEffectnavigate('/mytodo/list', { replace: true }) 수행. 기존 에러 UI 반환 분기 제거. 로딩 분기 유지. 주석 추가.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User
  participant P as OtherTodoListPage
  participant Q as useEachTodosQuery (React Query)
  participant S as Server
  participant R as Router

  U->>P: 페이지 진입
  P->>Q: useQuery 요청 (retry: false, focus refetch: false)
  Q->>S: GET /todos/other
  alt 성공
    S-->>Q: 200 OK + 데이터
    Q-->>P: data, isError=false
    P->>U: 리스트 렌더
  else 실패
    S-->>Q: 4xx/5xx
    Q-->>P: isError=true (재시도 없음)
    Note right of P: useEffect 감지<br/>즉시 리다이렉트
    P->>R: navigate('/mytodo/list', replace=true)
    R-->>U: /mytodo/list 로 이동
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

✨Feature

Suggested reviewers

  • Chasyuss

Poem

바삭한 캐시, 60초의 숨결,
창 포커스에도 꿈틀대지 않네—쉿!
에러가 뛰어오면, 살짝 옆길로 홱!
/mytodo/list로 깡총 점프!
(\/)\n> ( ••)✨\n> />🍃 깔끔한 흐름, 토끼도 안심!


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 457cc8a and ab0d6a6.

📒 Files selected for processing (2)
  • src/hook/useJobQuery.ts (1 hunks)
  • src/pages/otherTodoList/OtherTodoListPage.tsx (2 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch qa340

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.

@cywin1018 cywin1018 merged commit 9075271 into develop Sep 7, 2025
1 of 2 checks passed
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