Skip to content

feat: 기사님 받은 견적 조회 페이지 구현 - #11

Merged
juengseulki merged 12 commits into
devfrom
feature/mover-received-requests-page
Jul 24, 2026
Merged

juengseulki merged 12 commits into
devfrom
feature/mover-received-requests-page

Conversation

@soooob43

@soooob43 soooob43 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

📋 작업 내용

  • 기사님용 받은 요청 목록 페이지 UI 구현
  • 받은 요청 카드 및 필터 UI 구현
  • 데스크톱/태블릿/모바일 반응형 레이아웃 적용
  • 실제 API 연결 전 확인을 위한 더미데이터 적용
  • 이사 유형 태그 및 요청 조건 필터 기능 구현

🔥 변경 사항

  • 피그마 디자인을 기준으로 받은 요청 페이지 스타일 수정
  • 공통 Text 컴포넌트 및 디자인 토큰 재사용
  • 소형이사/ 가정이사/ 사무실이사 태그 필터 구현
  • 지정 견적 요청/ 서비스 가능 지역 체크박스 필터 구현
  • 선택된 태그와 체크박스 UI 상태 개선
  • 선택된 조건 중 하나라도 일치하면 표시되는 OR 필터 적용
  • 필터를 선택하지 않은 경우 전체 요청이 표시되도록 수정
  • 태블릿에서는 중앙 필터 모달, 모바일에서는 하단 바텀시트 적용
  • 모바일/ 태블릿 요청 카드 크기와 내부 간격 조정
  • 검색 및 정렬 UI 적용

✅ 체크리스트

  • 로컬에서 정상 동작을 확인했습니다.
  • 기존 기능에 영향을 주지 않는지 확인했습니다.
  • 불필요한 console.log를 제거했습니다.
  • lint를 통과했습니다.
  • README 또는 문서를 수정했습니다. (필요 시)
  • API 명세와 일치하는지 확인했습니다.
  • 빠르게 작업하기 위해서 더미데이터 넣어서 필터 로직 확인헀습니다.

📷 스크린샷 (선택)

image
  • 소형이사/ 가정이사/ 사무실 이사 선택
image
  • 지정 견적 요청 체크박스 선택
image
  • 중복 선택 반
image
  • 검색
image
  • 태블릿
image
  • 모바일
image

💬 To Reviewer

  • 현재 받은 요청 목록과 필터에 관해 빠르게 확인 작업 하기위해 더미데이터 넣어서 확인했습니다.

  • 추후에 실제 API 연결 확인 후, 더미데이터 제거 및 응답 타입 최종 점검 하겠습니다.

  • 작업 하신 파일들을 pull 받으면서 기존에 만들어뒀던 목업페이지에서 레이아웃 깨짐을 수정하느라 생각보다 시간이 많이 소요된 것 같습니다ㅠ..

  • 공통 컴포넌트 적용 잘 되어 있는지 확인해주시면 감사하겠습니다...

  • Modal.tsx에
    interface ModalProps {
    open: boolean;
    title: string;
    children: ReactNode;
    confirmLabel?: string;
    confirmDisabled?: boolean;
    onConfirm?: () => void;
    onClose: () => void;
    className?: string;
    overlayClassName?: string;
    }
    추가했는데 그대로 머지해도 상관없는지 여쭤보고 싶습니다!

Summary by CodeRabbit

  • 새 기능
    • 받은 견적 요청 페이지와 상단 헤더를 추가했습니다.
    • 요청 목록을 검색/필터(이사 유형, 지정 요청, 서비스 가능 지역)하고 정렬할 수 있습니다.
    • 각 요청 카드에 고객 정보, 이동 경로, 이사일/경과 시간, “반려하기” 및 “견적 보내기” 동작을 제공합니다.
    • 모바일에서는 필터 모달로 조건을 빠르게 선택할 수 있습니다.
  • 개선 사항
    • 모달 오버레이에 외부 스타일 클래스를 주입할 수 있게 확장했습니다.
    • KST 기준 한국어 날짜/시간 표시 기능을 추가했습니다.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9094673f-9ce3-4f11-9fdd-d078c28843f5

📥 Commits

Reviewing files that changed from the base of the PR and between c50f4c3 and e6442cb.

📒 Files selected for processing (1)
  • src/lib/utils/date.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/lib/utils/date.ts

📝 Walkthrough

Walkthrough

견적 요청 타입과 조회 API·훅을 추가하고, 검색·필터·정렬 및 모바일 필터 모달을 포함한 받은 요청 목록과 카드 UI를 구현했습니다. Next.js 페이지 엔트리에서 헤더와 목록을 함께 렌더링합니다.

Changes

받은 견적 요청

Layer / File(s) Summary
요청 계약과 조회 API
src/types/moverEstimateRequest.ts, src/lib/api/moverEstimateRequests.ts
견적 요청·조회 조건·응답 타입을 정의하고, 목데이터 필터링과 실제 HTTP 조회를 구현합니다.
React Query 조회 연결
src/hooks/useMoverEstimateRequests.ts
조회 조건을 캐시 키와 커서 기반 페이지 조회에 연결하는 훅을 추가합니다.
목록 검색과 필터 상태
src/components/estimate/ReceivedRequestsPage.tsx
검색, 이사 유형·지정 요청·서비스 지역 필터, 정렬, 로딩·오류·빈 목록 상태와 추가 조회 동작을 구성합니다.
카드 렌더링과 페이지 진입
src/components/estimate/ReceivedRequestCard.tsx, src/components/estimate/ReceivedRequestsHeader.tsx, src/app/estimate/received-requests/page.tsx, src/lib/utils/date.ts
요청 카드와 한국어 날짜 표시를 추가하고 헤더 및 Next.js 페이지 엔트리에 연결합니다.
모바일 필터 모달 확장
src/components/common/Modal.tsx, src/components/estimate/ReceivedRequestsPage.tsx
모바일 필터 모달을 구성하고 오버레이 사용자 정의 클래스를 지원합니다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Mover as 기사님
  participant ReceivedRequestsPage
  participant useMoverEstimateRequests
  participant getMoverEstimateRequests
  participant axiosInstance
  Mover->>ReceivedRequestsPage: 검색·필터·정렬 조건 입력
  ReceivedRequestsPage->>useMoverEstimateRequests: query 전달
  useMoverEstimateRequests->>getMoverEstimateRequests: 요청 목록 조회
  getMoverEstimateRequests->>axiosInstance: 실제 API 호출
  axiosInstance-->>getMoverEstimateRequests: 요청 목록 응답
  getMoverEstimateRequests-->>useMoverEstimateRequests: items와 pagination 반환
  useMoverEstimateRequests-->>ReceivedRequestsPage: 조회 결과 전달
  ReceivedRequestsPage-->>Mover: 요청 카드 목록 렌더링
Loading

Suggested reviewers: 9g-g9

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 23.08% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 기사님용 받은 견적/요청 조회 페이지 구현이라는 핵심 변경을 정확히 요약합니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/mover-received-requests-page

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Biome (2.5.3)
src/lib/utils/date.ts

File contains syntax errors that prevent linting: Line 22: Illegal use of an export declaration not at the top level; Line 30: Illegal use of an export declaration not at the top level; Line 39: Illegal use of an export declaration not at the top level; Line 44: Illegal use of an export declaration not at the top level; Line 49: Illegal use of an export declaration not at the top level; Line 58: Illegal use of an export declaration not at the top level; Line 77: expected } but instead the file ends

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/lib/utils/date.ts

Parsing error: '}' expected.


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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/app/estimate/received-requests/page.tsx (1)

1-6: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

metadata export가 없습니다.

페이지별 <title> 등 메타데이터가 설정되지 않았습니다.

As per path instructions, "metadata export 로 페이지별 메타데이터를 설정했는지 확인해 주세요."

📝 제안 diff
+import type { Metadata } from "next";
 import ReceivedRequestsPage from "`@/components/estimate/ReceivedRequestsPage`";
 
+export const metadata: Metadata = {
+  title: "받은 요청 | 무빙",
+};
+
 export default function Page() {
   return <ReceivedRequestsPage />;
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/estimate/received-requests/page.tsx` around lines 1 - 6, 페이지 모듈의 Page
export에 페이지별 metadata export를 추가해 제목 등 필요한 메타데이터를 설정하세요. 기존 ReceivedRequestsPage
렌더링 동작은 유지하고, 프로젝트의 기존 metadata 정의 방식과 명명 규칙을 재사용하세요.

Source: Path instructions

🧹 Nitpick comments (2)
src/types/moverEstimateRequest.ts (1)

4-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

object 타입들은 interface로 정의하는 게 팀 규칙입니다.

MoverEstimateRequest, MoverEstimateRequestQuery, MoverEstimateRequestResponse 모두 type으로 정의돼 있습니다.

As per path instructions, "타입 정의는 interface 를 우선 사용합니다."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/types/moverEstimateRequest.ts` around lines 4 - 38, MoverEstimateRequest,
MoverEstimateRequestQuery, MoverEstimateRequestResponse의 객체 타입 정의를 팀 규칙에 맞게
interface 선언으로 변경하세요. 각 프로퍼티와 중첩 객체 구조는 그대로 유지하고, MoveType 및 RequestSort 같은 기존
타입 참조도 변경하지 마세요.

Source: Path instructions

src/components/estimate/ReceivedRequestCard.tsx (1)

58-88: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

브레이크포인트가 프로젝트 관례와 다릅니다.

ReceivedRequestsPage.tsx는 태블릿/데스크톱 전환에 min-[744px]:, lg:를 쓰는데, 이 카드는 Tailwind 기본 sm:(640px)을 사용합니다. 카드가 그리드 안에서 컨테이너 폭에 따라 다르게 반응할 수 있어 목록 레이아웃과 어긋날 위험이 있습니다.

As per path instructions, "하나의 컴포넌트에서 Tailwind 브레이크포인트로 처리합니다" (프로젝트의 기존 breakpoint 기준).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/estimate/ReceivedRequestCard.tsx` around lines 58 - 88,
ReceivedRequestCard의 레이아웃 전환에 사용된 기본 sm: 브레이크포인트를 제거하고,
ReceivedRequestsPage.tsx에서 사용하는 프로젝트 기준인 min-[744px]: 또는 lg:로 통일하세요. 출발지·도착지·이사일
레이아웃과 하단 그리드의 반응형 동작이 목록 레이아웃과 동일한 breakpoint에서 전환되도록 수정하세요.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/estimate/ReceivedRequestCard.tsx`:
- Around line 31-101: Update the ReceivedRequestCard color classes to use the
corresponding design tokens from tokens.theme.css instead of hardcoded values,
including text-[`#808080`], text-[`#111`], bg-[`#f2f2f2`], bg-[`#ffeef0`],
text-[`#ff4f64`], and related border/arrow colors. Follow the existing token
patterns used by bg-background-brand-muted and border-border-brand, while
preserving the current visual states.
- Around line 12-19: Update formatMoveDate in ReceivedRequestCard to use a
shared string-date formatter from src/lib/utils/date.ts instead of constructing
a local-time DateTimeFormat directly. Implement or reuse that formatter with
timeZone set to Asia/Seoul, and preserve the existing Korean
year/month/day/weekday output.

In `@src/components/estimate/ReceivedRequestsPage.tsx`:
- Around line 126-196: Update the count displays in ReceivedRequestsPage so they
are hidden or replaced with a placeholder while query.isPending, preventing “전체
0건” from appearing alongside the loading message. Preserve the actual
items.length count once loading completes.
- Around line 135-171: Update the custom checkbox indicators in
ReceivedRequestsPage, including the modal checkboxes, to add a clear
keyboard-focus style to each replacement span using peer-focus-visible classes
tied to its sr-only input. Preserve the existing checked and unchecked visuals
while ensuring focus is visibly distinguishable when navigating by keyboard.
- Around line 226-335: Replace the hand-built modal in the isFilterOpen
rendering with the existing common Modal component, reusing its dialog
accessibility, focus trap, Escape handling, and body scroll locking. Preserve
the current filter content, open/close state, backdrop behavior, and 조회하기 action
while passing the appropriate title or aria-label configuration supported by
Modal.
- Around line 1-338: ReceivedRequestsPage is marked as a client component even
though its header and title are static, causing the entire page subtree to be
sent to the client. Split the stateful search, filters, and request-list logic
from ReceivedRequestsPage into a dedicated client child component, remove the
top-level client directive from the page-level component, and keep the logo
header and page title in the server-rendered parent.
- Around line 52-223: ReceivedRequestsPage의 헤더, 검색, 필터 및 상태 표시 영역에서 하드코딩된
색상·간격·radius를 기존 디자인 토큰으로 교체하고, 아래 필터 모달과 동일한 토큰 패턴을 재사용하세요. 일반 span과 원시 텍스트 요소로
렌더링된 “받은 요청”, “기사님”, “지정 견적 요청” 등은 적절한 Text 컴포넌트와 variant로 변경하되 기존 레이아웃과 반응형 동작은
유지하세요.

In `@src/lib/api/moverEstimateRequests.ts`:
- Around line 83-112: The getMoverEstimateRequests function returns
response.data.data without checking the backend success flag. Update the
MoverEstimateRequestResponse handling to branch on success and, for failed
responses, propagate or handle the error using error.code rather than comparing
message strings; only return data for successful responses.
- Around line 104-106: Update the endpoint construction in the mover estimate
request flow around the axiosInstance.get call to use a complete API_ROUTES
constant, including the API prefix and requests suffix, instead of concatenating
hardcoded path strings. Add or reuse the appropriate received-requests route
constant and preserve the existing query parameter handling.

In `@src/types/moverEstimateRequest.ts`:
- Around line 29-38: MoverEstimateRequestResponse를 성공 응답과 실패 응답을 모두 표현하는 판별
유니온으로 변경하고, 실패 형태에는 error의 code와 message를 포함하세요. 이를 사용하는 mover estimate 요청 함수에서는
success를 확인한 뒤에만 data를 반환하도록 수정하고, 실패 시에는 error.code를 기준으로 분기하며 메시지 문자열 비교는 사용하지
마세요.

---

Outside diff comments:
In `@src/app/estimate/received-requests/page.tsx`:
- Around line 1-6: 페이지 모듈의 Page export에 페이지별 metadata export를 추가해 제목 등 필요한
메타데이터를 설정하세요. 기존 ReceivedRequestsPage 렌더링 동작은 유지하고, 프로젝트의 기존 metadata 정의 방식과 명명
규칙을 재사용하세요.

---

Nitpick comments:
In `@src/components/estimate/ReceivedRequestCard.tsx`:
- Around line 58-88: ReceivedRequestCard의 레이아웃 전환에 사용된 기본 sm: 브레이크포인트를 제거하고,
ReceivedRequestsPage.tsx에서 사용하는 프로젝트 기준인 min-[744px]: 또는 lg:로 통일하세요. 출발지·도착지·이사일
레이아웃과 하단 그리드의 반응형 동작이 목록 레이아웃과 동일한 breakpoint에서 전환되도록 수정하세요.

In `@src/types/moverEstimateRequest.ts`:
- Around line 4-38: MoverEstimateRequest, MoverEstimateRequestQuery,
MoverEstimateRequestResponse의 객체 타입 정의를 팀 규칙에 맞게 interface 선언으로 변경하세요. 각 프로퍼티와
중첩 객체 구조는 그대로 유지하고, MoveType 및 RequestSort 같은 기존 타입 참조도 변경하지 마세요.
🪄 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 Plus

Run ID: 399b3816-52a1-4520-8a36-de0a707e925d

📥 Commits

Reviewing files that changed from the base of the PR and between c0b9d55 and b2f49ef.

⛔ Files ignored due to path filters (11)
  • public/icons/box.svg is excluded by !**/*.svg
  • public/icons/checkbox-check.svg is excluded by !**/*.svg
  • public/icons/chevron.svg is excluded by !**/*.svg
  • public/icons/document.svg is excluded by !**/*.svg
  • public/icons/filter.svg is excluded by !**/*.svg
  • public/icons/moving-logo-icon.svg is excluded by !**/*.svg
  • public/icons/moving-logo-text.svg is excluded by !**/*.svg
  • public/icons/search.svg is excluded by !**/*.svg
  • public/icons/write.svg is excluded by !**/*.svg
  • public/images/empty-img-original.png is excluded by !**/*.png
  • public/images/empty-received-requests.png is excluded by !**/*.png
📒 Files selected for processing (6)
  • src/app/estimate/received-requests/page.tsx
  • src/components/estimate/ReceivedRequestCard.tsx
  • src/components/estimate/ReceivedRequestsPage.tsx
  • src/hooks/useMoverEstimateRequests.ts
  • src/lib/api/moverEstimateRequests.ts
  • src/types/moverEstimateRequest.ts

Comment thread src/components/estimate/ReceivedRequestCard.tsx Outdated
Comment thread src/components/estimate/ReceivedRequestCard.tsx Outdated
Comment thread src/components/estimate/ReceivedRequestsPage.tsx
Comment thread src/components/estimate/ReceivedRequestsPage.tsx Outdated
Comment thread src/components/estimate/ReceivedRequestsPage.tsx
Comment thread src/components/estimate/ReceivedRequestsPage.tsx
Comment thread src/components/estimate/ReceivedRequestsPage.tsx Outdated
Comment thread src/lib/api/moverEstimateRequests.ts
Comment thread src/lib/api/moverEstimateRequests.ts
Comment thread src/types/moverEstimateRequest.ts Outdated

@juengseulki juengseulki left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 PR 리뷰

기사님용 받은 요청 목록 페이지와 필터 UI 구현을 확인했습니다.

👍 좋았던 점

  • 페이지, 카드, 조회 훅, API 함수, 응답 타입을 각각 분리하여 이후 실제 API를 연결하기 좋은 구조로 구성한 점이 좋았습니다.
  • 공통 Text 컴포넌트를 사용하여 기존 디자인 시스템을 재사용한 점도 확인했습니다.
  • 검색어 입력값과 실제 조회에 사용되는 keyword를 분리하여, 입력할 때마다 요청하지 않고 검색 제출 시에만 조회되도록 구성한 점이 좋았습니다.
  • 이사 유형, 지정 견적 요청, 서비스 가능 지역 중 하나라도 일치하면 노출되는 OR 필터가 PR에 작성된 정책대로 구현되어 있었습니다.
  • 선택된 필터가 없을 때는 전체 요청을 반환하도록 별도로 처리하여 빈 조건 때문에 결과가 사라지는 문제를 방지한 점도 좋았습니다.
  • 데스크톱 필터와 태블릿·모바일용 필터 UI가 동일한 상태를 공유하도록 구성하여 화면 크기에 따라 선택 결과가 달라지지 않도록 한 점이 좋았습니다.
  • 로딩, 오류, 빈 목록 상태를 각각 구분하여 표시한 점도 적절했습니다.

🚨 수정이 필요한 부분

인라인 코멘트로 아래 내용을 남겼습니다.

  • 현재 요청을 최대 10건만 조회하고 있으며 다음 페이지를 불러오는 로직이 없어, 10건을 초과한 요청은 사용자가 확인할 수 없습니다.
  • 전체 {items.length}건은 전체 요청 수가 아니라 현재 조회된 항목 수이므로 실제 데이터가 10건을 초과하면 잘못된 개수가 표시됩니다.

🔍 확인 및 제안

  • 선언해둔 MoverEstimateRequestResponse를 Axios 응답 타입과 함수 반환 타입에 적용하면 실제 API 연결 시 응답 구조를 안전하게 확인할 수 있을 것 같습니다.

전체적으로 반응형 화면과 필터 동작을 빠르게 검증하기 위한 UI 구조는 잘 구성되어 있었습니다. 다만 현재 페이지가 받은 요청 목록을 제공하는 화면인 만큼, 첫 10건 이후의 데이터를 볼 수 없는 부분과 전체 건수 표시는 실제 사용성에 직접 영향을 주므로 이번 작업에서 보완하는 것이 좋겠습니다. 수고하셨습니다! 😊

Comment thread src/components/estimate/ReceivedRequestsPage.tsx
Comment thread src/components/estimate/ReceivedRequestsPage.tsx Outdated
Comment thread src/lib/api/moverEstimateRequests.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/app/estimate/received-requests/page.tsx (1)

1-12: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

페이지 metadata export가 없습니다.

Pageexport const metadata가 없어 브라우저 탭 제목 등 페이지별 메타데이터가 설정되지 않습니다.

As per path instructions, "metadata export로 페이지별 메타데이터를 설정했는지 확인해 주세요."

+export const metadata = {
+  title: "받은 요청 | 무빙",
+};
+
export default function Page() {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/estimate/received-requests/page.tsx` around lines 1 - 12, 페이지별 메타데이터가
정의되지 않았으므로 `Page` 컴포넌트와 함께 `metadata`를 export하도록 추가하세요. 해당 페이지의 브라우저 탭 제목 등 필요한
메타데이터를 설정하고, 기존 `ReceivedRequestsHeader` 및 `ReceivedRequestsPage` 렌더링은 유지하세요.

Source: Path instructions

src/components/estimate/ReceivedRequestsPage.tsx (1)

76-90: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

이사 유형 칩·체크박스 마크업이 데스크톱/모달에 중복되고, cn()/Text 미사용.

76-90행과 211-229행은 같은 이사 유형 칩을 크기만 다르게 중복 렌더링하고, 106-141행과 236-271행도 체크박스 인디케이터를 거의 동일하게 중복 작성합니다. 또한 84/113-116/131-134/219-223/258-262행은 조건부 클래스에 템플릿 리터럴을 쓰고 있고, 249-271행의 "지정 견적 요청"/"서비스 가능 지역" 텍스트는 Text 컴포넌트로 감싸지 않았습니다. MoveTypeChip, FilterCheckbox 같은 공용 서브컴포넌트로 추출하면 중복·cn() 미사용·Text 미사용 문제를 한 번에 해결할 수 있습니다.

As per path instructions, "클래스 조합은 src/lib/utils/cn.tscn()을 사용합니다", "텍스트는 Text 컴포넌트의 variant를 사용합니다", "새 컴포넌트를 만들기 전에... 기존 컴포넌트를 재사용할 수 있는지 확인해야 합니다."

Also applies to: 106-141, 211-229, 236-271

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/estimate/ReceivedRequestsPage.tsx` around lines 76 - 90,
Extract the duplicated move-type chip markup in ReceivedRequestsPage into a
reusable MoveTypeChip component and the duplicated checkbox indicator markup
into a reusable FilterCheckbox component, preserving their desktop and modal
size differences through props or variants. Update conditional class composition
to use cn() instead of template literals, and wrap the “지정 견적 요청” and “서비스 가능
지역” labels in the existing Text component with appropriate variants.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/estimate/ReceivedRequestsHeader.tsx`:
- Around line 27-34: Update the navigation items in the ReceivedRequestsHeader
nav so each uses an actual Link pointing to its corresponding route, enabling
click and keyboard navigation; if no routes exist, replace the nav with
non-navigation text instead of interactive-looking spans.

---

Nitpick comments:
In `@src/app/estimate/received-requests/page.tsx`:
- Around line 1-12: 페이지별 메타데이터가 정의되지 않았으므로 `Page` 컴포넌트와 함께 `metadata`를 export하도록
추가하세요. 해당 페이지의 브라우저 탭 제목 등 필요한 메타데이터를 설정하고, 기존 `ReceivedRequestsHeader` 및
`ReceivedRequestsPage` 렌더링은 유지하세요.

In `@src/components/estimate/ReceivedRequestsPage.tsx`:
- Around line 76-90: Extract the duplicated move-type chip markup in
ReceivedRequestsPage into a reusable MoveTypeChip component and the duplicated
checkbox indicator markup into a reusable FilterCheckbox component, preserving
their desktop and modal size differences through props or variants. Update
conditional class composition to use cn() instead of template literals, and wrap
the “지정 견적 요청” and “서비스 가능 지역” labels in the existing Text component with
appropriate variants.
🪄 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 Plus

Run ID: 049333e2-7430-4f7a-ba36-006e84d33c2d

📥 Commits

Reviewing files that changed from the base of the PR and between b2f49ef and 57e72d6.

📒 Files selected for processing (8)
  • src/app/estimate/received-requests/page.tsx
  • src/components/common/Modal.tsx
  • src/components/estimate/ReceivedRequestCard.tsx
  • src/components/estimate/ReceivedRequestsHeader.tsx
  • src/components/estimate/ReceivedRequestsPage.tsx
  • src/lib/api/moverEstimateRequests.ts
  • src/lib/utils/date.ts
  • src/types/moverEstimateRequest.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/lib/api/moverEstimateRequests.ts
  • src/components/estimate/ReceivedRequestCard.tsx

Comment thread src/components/estimate/ReceivedRequestsHeader.tsx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/hooks/useMoverEstimateRequests.ts (1)

12-12: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

hasNextPage도 다음 페이지 판정에 반영해 주세요.

응답의 paginationnextCursorhasNextPage가 모두 있는데 현재는 cursor만 확인합니다. 서버가 마지막 페이지에서도 cursor를 반환할 수 있다면, hasNextPage: false인데도 추가 요청이 발생해 중복 데이터를 가져올 수 있습니다. 백엔드 계약을 확인한 뒤 두 필드를 함께 판정하세요.

권장 수정
-    getNextPageParam: (lastPage) => lastPage.pagination.nextCursor ?? undefined,
+    getNextPageParam: (lastPage) =>
+      lastPage.pagination.hasNextPage
+        ? (lastPage.pagination.nextCursor ?? undefined)
+        : undefined,
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/hooks/useMoverEstimateRequests.ts` at line 12, Update the
getNextPageParam callback to require pagination.hasNextPage to be true before
returning pagination.nextCursor; otherwise return undefined. Preserve cursor
handling while preventing additional requests when the server marks the response
as the final page.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/hooks/useMoverEstimateRequests.ts`:
- Line 12: Update the getNextPageParam callback to require
pagination.hasNextPage to be true before returning pagination.nextCursor;
otherwise return undefined. Preserve cursor handling while preventing additional
requests when the server marks the response as the final page.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 17b5b065-ee01-41a4-85d3-c1533393428f

📥 Commits

Reviewing files that changed from the base of the PR and between 57e72d6 and c50f4c3.

📒 Files selected for processing (4)
  • src/components/estimate/ReceivedRequestsPage.tsx
  • src/hooks/useMoverEstimateRequests.ts
  • src/lib/api/moverEstimateRequests.ts
  • src/types/moverEstimateRequest.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/types/moverEstimateRequest.ts
  • src/lib/api/moverEstimateRequests.ts
  • src/components/estimate/ReceivedRequestsPage.tsx

confirmLabel="조회하기"
onConfirm={() => setIsFilterOpen(false)}
onClose={() => setIsFilterOpen(false)}
overlayClassName="items-end px-0 min-[744px]:items-center min-[744px]:px-24 lg:hidden"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lg:hidden은 모달을 눈에만 안 보이게 할 뿐이라, 모달을 연 채로 창을 데스크톱 폭으로 늘리면 모달이 열려있는 상태로 유지됩니다. 그래서 공통 Modal의 스크롤 잠금과 포커스 트랩이 계속 동작해서, 화면엔 아무것도 없는데 페이지 스크롤이 안 되는 상태가 될 수 있습니다.
화면이 lg 이상이 되면 setIsFilterOpen(false)로 모달을 실제로 닫아주는 걸 권장드립니다!

@wndnjs2037

Copy link
Copy Markdown
Collaborator

반응형 챙기면서 구현하시느라 고생 많으셨습니다!
공통 Modal과 Text를 잘 재사용하셔서 새 페이지인데도 기존 코드와 결이 잘 맞도록 구현된 것 같습니다. 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants