Skip to content

Conversation

@hyesngy
Copy link
Member

@hyesngy hyesngy commented Dec 6, 2025

Summary

관련 있는 Issue를 태그해주세요. (e.g. > - #100)

Tasks

  • 노트 생성 요청 name 추가

Summary by CodeRabbit

릴리스 노트

  • 버그 수정
    • 노트 생성 시 입력된 이름이 서버에 올바르게 전달되도록 수정
    • 노트 생성 실패 시 오류 처리 개선

✏️ Tip: You can customize this high-level summary in your review settings.

@hyesngy hyesngy self-assigned this Dec 6, 2025
@hyesngy hyesngy added the 🛠️ Refactor 코드 리팩토링 label Dec 6, 2025
@hyesngy hyesngy requested a review from a team as a code owner December 6, 2025 15:02
@hyesngy hyesngy linked an issue Dec 6, 2025 that may be closed by this pull request
@vercel
Copy link

vercel bot commented Dec 6, 2025

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

Project Deployment Preview Comments Updated (UTC)
cardify Ready Ready Preview Comment Dec 6, 2025 3:02pm

@coderabbitai
Copy link

coderabbitai bot commented Dec 6, 2025

개요

노트 추가 기능에서 제공된 노트 이름 매개변수를 실제로 서버 API에 전달하도록 수정했습니다. AddNoteRequest 인터페이스에 name 필드를 추가하고 handleAddNote 함수를 업데이트하여 이름을 포함하여 API 호출하도록 변경했습니다.

변경사항

응집 그룹 / 파일 변경 요약
노트 생성 훅 업데이트
src/pages/archive/hooks/use-add-note.ts
handleAddNote 함수 시그니처 변경 (_noteNamenoteName), API 호출에 노트 이름 포함 ({ folderId, name: noteName }), 에러 처리 추가, 작업 완료 후 isAdding 상태 리셋
노트 요청 타입 정의
src/types/note/note-request.ts
AddNoteRequest 인터페이스에 name: string 필드 추가

예상 코드 리뷰 난이도

🎯 1 (단순함) | ⏱️ ~5분

  • handleAddNote 함수의 시그니처와 API 호출 로직이 일관되게 수정되었는지 확인 필요
  • 에러 처리 및 finally 블록의 예외 안전성 검증 필요

추천 리뷰어

  • Sohyunnnn

시 🐰

노트 이름을 드디어 담아서 🎀
API로 날려 보내니
서버가 반겨주네
타입도 맞춰지고 ✨
모든 게 깔끔하게 흐르네!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경사항의 주요 내용을 명확하게 반영하고 있습니다. 노트 생성 API 수정이라는 핵심 변경사항을 정확히 전달합니다.
Description check ✅ Passed PR 설명이 템플릿의 필수 섹션을 포함하고 있으며, 관련 이슈(#119)를 태그하고 주요 작업 내용(name 필드 추가)을 기술했습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/#119

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.

@github-actions
Copy link

github-actions bot commented Dec 6, 2025

✨ Storybook 확인: 🔗 https://6785fc0fb0ff9f8d21d80624-nidbkrwbog.chromatic.com/

@hyesngy hyesngy merged commit 0a20b50 into develop Dec 6, 2025
6 of 7 checks passed
@hyesngy hyesngy deleted the refactor/#119 branch December 6, 2025 15:04
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/pages/archive/hooks/use-add-note.ts (1)

18-29: 노트 이름 전달 및 로딩/에러 상태 관리가 일관되게 잘 구현되어 있습니다

  • handleAddNote(noteName: string)에서 addNote({ folderId, name: noteName })로 호출하도록 바뀌어, AddNoteRequestname 필수 필드와 타입 정합성이 잘 맞습니다.
  • setIsAdding(true)try/catch/finallysetIsAdding(false)를 보장하는 구조라, 실패 케이스에서도 로딩 상태가 정상적으로 해제되는 점도 좋습니다.
  • 실패 시 console.erroralert로 사용자/디버깅 모두에 피드백이 가는 것도 무난한 선택입니다.

선택 사항이지만, 필요하다면:

  • noteName이 빈 문자열인 경우를 상위에서 막거나, 이 훅 내부에서 한 번 더 방어적으로 early return 하는 것도 UX 측면에서 고려해볼 수 있습니다.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5900763 and d76ef2f.

📒 Files selected for processing (2)
  • src/pages/archive/hooks/use-add-note.ts (1 hunks)
  • src/types/note/note-request.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/pages/archive/hooks/use-add-note.ts (1)
src/apis/note/note.ts (1)
  • addNote (52-54)
🔇 Additional comments (1)
src/types/note/note-request.ts (1)

60-63: AddNoteRequest의 name 필드 추가가 서버 스펙과 잘 맞습니다

WriteNoteRequest와 동일하게 name: string을 필수로 둔 설계가 자연스럽고, 새 노트 생성 시 이름을 강제하도록 타입 측면에서 잘 잡아주고 있습니다.
단, 이제 AddNoteRequest를 사용하는 모든 호출부에서 name을 넘겨야 하므로, 다른 훅/모듈에서도 누락된 곳이 없는지만 한 번 빌드/타입체크로 확인해 주세요.

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

Labels

🛠️ Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor]: 노트 생성 api 수정

2 participants