Skip to content

Hotfix/#264 resume list status error#265

Merged
hye410 merged 2 commits intodevfrom
Hotfix/#264-resume-list-status-error
Apr 30, 2025
Merged

Hotfix/#264 resume list status error#265
hye410 merged 2 commits intodevfrom
Hotfix/#264-resume-list-status-error

Conversation

@hye410
Copy link
Copy Markdown
Collaborator

@hye410 hye410 commented Apr 30, 2025

💡 관련이슈

#264

🍀 작업 요약

  • 마이페이지 > 자소서 리스트 없을 시 status 404가 아닌 200으로 수정
  • 데이터가 없을 시 작성한 자소서가 없습니다.~ 문구 노출
  • 자소서 리스트 padding 수정

💬 리뷰 요구 사항

  • 자소서가 없을 시 404 에러 나지 않는지 확인 부탁드립니다.
  • <ResumeItem />사용하는 제가 한 번씩 확인하긴 했는데 크로스 체크 부탁드립니다.

💛 미리보기

image

✔️ 이슈 닫기

Closes #264
Ref #이슈번호 // 해당 이슈에 대한 작업이 완전히 끝나지 않은 경우

Summary by CodeRabbit

  • 버그 수정

    • 이력서 목록이 비어 있을 때 빈 상태 안내 메시지가 표시됩니다.
    • 이력서 항목 구분선이 마지막 항목에서는 표시되지 않도록 개선되었습니다.
  • 스타일

    • 이력서 항목의 구분선 처리가 CSS 클래스로 일관되게 적용되었습니다.
    • 빈 목록 메시지의 문구와 줄바꿈 처리가 개선되었습니다.
  • 리팩터

    • 이력서 항목 관련 prop 명칭이 더 명확하게 변경되었습니다. (hrOption → isLastChild)
  • 기타

    • 이력서 조회 시 데이터가 없더라도 항상 200 응답을 반환하도록 변경되었습니다.

@hye410 hye410 added 🐞 BugFix Something isn't working 🔨 Refactor 코드 리팩토링 🚨 ASAP 즉시 처리해야 하는 가장 긴급한 작업으로, 최고 우선순위를 가집니다. 즉각적인 반응이 필요한 중요한 상황입니다. 💎다혜 labels Apr 30, 2025
@hye410 hye410 self-assigned this Apr 30, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2025

Walkthrough

이번 변경에서는 마이페이지의 자소서 리스트에서 데이터가 없을 때 404 에러가 반환되던 현상을 수정하여, 항상 200 상태 코드와 함께 빈 배열 또는 데이터를 반환하도록 API를 수정했습니다. 또한, 자소서 리스트와 관련된 컴포넌트들에서 hrOption prop을 isLastChild로 변경하고, 불필요한 <hr> 태그 대신 CSS border 클래스를 활용하여 마지막 아이템 구분선을 처리하도록 UI 로직을 개선했습니다. 빈 리스트일 때는 별도의 EmptyList 컴포넌트를 렌더링하도록 추가되었습니다.

Changes

파일/그룹 변경 요약
src/app/api/resume/route.ts 자소서 리스트 조회 시 데이터가 없을 때 404 대신 200 상태 코드와 빈 배열 반환하도록 수정
src/features/interview/resume-all-modal.tsx
src/features/interview/resume-cards-box.tsx
ResumeItem 컴포넌트에 전달되는 hrOption prop 제거 및, isLastChild prop 적용 및 인덱스 기반 처리 추가
src/features/my-page/empty-list.tsx EMPTY_MESSAGE 문자열을 단일 라인 및 명확한 문구로 변경, "이력서" → "자소서"로 텍스트 수정
src/features/resume-list/resume-item.tsx ResumeItem의 prop명을 hrOption에서 isLastChild로 변경, <hr> 태그 제거, CSS border로 구분선 처리
src/features/resume-list/resume-list.tsx 리스트가 비어있을 때 EmptyList 컴포넌트 렌더링 추가, prop명 변경(hrOptionisLastChild) 및 논리 반전

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant API
    participant DB

    Client->>API: GET /api/resume
    API->>DB: 자소서 리스트 조회
    DB-->>API: 자소서 리스트(배열, 비어있을 수 있음)
    API-->>Client: 200 OK + 자소서 리스트(빈 배열 포함)
Loading

Assessment against linked issues

Objective Addressed Explanation
마이페이지 > 자소서 리스트 data가 없을 시 404가 아닌 빈 배열과 200 반환 (#264)
마이페이지 > 자소서 리스트 padding 없음 (#264)

Possibly related PRs

  • Refactor/#205 resume #213: ResumeItem 컴포넌트의 prop 리팩토링 및 UI 동작 방식 변경과 직접적으로 관련됨.

Suggested reviewers

  • parkminjo
  • choichangyeon

Poem

🐰
자소서 없는 날에도
404는 이제 안녕!
빈 배열과 함께
너그러운 200을 보내요
구분선도 border로 깔끔하게
마이페이지가 한결 더
부드럽게 변했답니다!
🌱


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a205206 and 7fec7de.

📒 Files selected for processing (6)
  • src/app/api/resume/route.ts (0 hunks)
  • src/features/interview/resume-all-modal.tsx (0 hunks)
  • src/features/interview/resume-cards-box.tsx (1 hunks)
  • src/features/my-page/empty-list.tsx (1 hunks)
  • src/features/resume-list/resume-item.tsx (1 hunks)
  • src/features/resume-list/resume-list.tsx (2 hunks)
💤 Files with no reviewable changes (2)
  • src/features/interview/resume-all-modal.tsx
  • src/app/api/resume/route.ts
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (7)
src/features/my-page/empty-list.tsx (1)

5-7: 메시지 개선이 잘 이루어졌습니다.

메시지 형식을 일관되게 변경하고, 자소서 탭의 안내 메시지를 명확하게 수정한 점이 좋습니다. 템플릿 리터럴 대신 명시적인 줄바꿈 문자(\n)를 사용하여 코드 가독성도 향상됐습니다.

src/features/interview/resume-cards-box.tsx (1)

70-80: props 이름 변경이 일관되게 적용되었습니다.

hrOption 대신 isLastChild prop을 사용함으로써 컴포넌트 간의 일관성을 높였습니다. 코드가 더 직관적이고 이해하기 쉬워졌습니다.

src/features/resume-list/resume-list.tsx (3)

8-8: EmptyList 컴포넌트 import가 적절합니다.

빈 상태 처리를 위한 컴포넌트를 추가하여 코드의 재사용성을 높였습니다.


30-30: 빈 리스트 상태 처리가, PR의 목적과 일치합니다.

자소서 데이터가 없을 때 404 에러 대신 EmptyList 컴포넌트를 렌더링하도록 변경하여 사용자 경험이 개선되었습니다. 이는 PR의 주요 목표인 "빈 자소서 목록에서 404 에러 대신 200 상태 코드 반환"과 일치합니다.


38-38: prop 네이밍 개선이 일관되게 적용되었습니다.

hrOption 대신 의미가 더 명확한 isLastChild로 변경한 것이 좋습니다. 이 변경은 다른 컴포넌트들과 일관성을 유지하면서 코드의 가독성을 높입니다.

src/features/resume-list/resume-item.tsx (2)

9-9: prop 이름이 더 직관적으로 변경되었습니다.

hrOption에서 isLastChild로 prop 이름을 변경함으로써 속성의 의미가 더 명확해졌습니다. 기본값을 true로 유지한 것도 적절합니다.

Also applies to: 12-12


17-17: UI 구현 방식이 개선되었습니다.

<hr> 태그 대신 CSS border 클래스를 사용하여 마지막 항목의 구분선을 처리하는 방식으로 변경했습니다. 이는 더 깔끔한 마크업과 스타일링을 제공하며, isLastChild prop의 의미와도 일치합니다.

✨ 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.
    • Generate unit testing code for this file.
    • 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. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • 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.

Copy link
Copy Markdown
Collaborator

@ImJaeOne ImJaeOne left a comment

Choose a reason for hiding this comment

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

'아직 작성된 자소서가 없습니다' 문구 잘 뜹니다!

Copy link
Copy Markdown
Collaborator

@parkminjo parkminjo left a comment

Choose a reason for hiding this comment

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

자소서 삭제 했을 때 멘트 잘 뜨는거 확인했습니다!

Copy link
Copy Markdown
Collaborator

@choichangyeon choichangyeon left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

@hye410 hye410 merged commit 63ebb8e into dev Apr 30, 2025
2 checks passed
@hye410 hye410 deleted the Hotfix/#264-resume-list-status-error branch April 30, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 BugFix Something isn't working 💎다혜 🚨 ASAP 즉시 처리해야 하는 가장 긴급한 작업으로, 최고 우선순위를 가집니다. 즉각적인 반응이 필요한 중요한 상황입니다. 🔨 Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Hotfix] 마이페이지 > 자소서 리스트

4 participants