Skip to content

Conversation

@KwonDeaGeun
Copy link
Contributor

@KwonDeaGeun KwonDeaGeun commented Dec 23, 2025

Summary

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

해당 PR에 대한 작업 내용을 요약하여 작성해주세요.

Tasks

  • 해당 PR에 수행한 작업을 작성해주세요.
  • 내게 쓰기 404에러 수정

Summary by CodeRabbit

릴리스 노트

  • 버그 수정
    • "내게 쓰기" 흐름에서 초안 저장 및 게시 시 올바른 shareUri가 적용되도록 개선했습니다. 조인 페이지인 경우 보드의 공유 URI(board shareUri)를 우선 사용해 작성·전송 시 일관된 대상이 선택됩니다.

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

@KwonDeaGeun KwonDeaGeun self-assigned this Dec 23, 2025
@vercel
Copy link

vercel bot commented Dec 23, 2025

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

Project Deployment Review Updated (UTC)
2025-seasonthon-team-80-fe Ready Ready Preview, Comment Dec 23, 2025 3:48pm

@coderabbitai
Copy link

coderabbitai bot commented Dec 23, 2025

Walkthrough

"내게 쓰기" 플로우에서 초안 저장 및 전송 시 useAuthStore에서 가져온 boardShare?.shareUri를 우선해 shareUri를 해석하도록 로직을 변경했고 관련 주석을 추가했습니다.

Changes

Cohort / File(s) 변경 사항
내게 쓰기 shareUri 우선 적용
src/pages/letterPage/pages/letter-write-page.tsx
useAuthStore import 및 사용 추가, 초안 저장(draft) 및 전송(confirm/post) 경로에서 boardShare?.shareUri를 우선 사용하도록 shareUri 해석 로직 수정 및 주석 추가

Sequence Diagram(s)

(해당 변경은 단일 파일의 흐름 조정으로, 다중 컴포넌트 간 새 시퀀스가 도입되지 않아 다이어그램을 생략합니다.)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8분

Possibly related PRs

Suggested labels

🛠 Fix

Suggested reviewers

  • hyesngy

Poem

🐰 초안 하나 적고, 멈춘 밤에
창고에서 보드의 주소를 찾아냈네
저장하고 보낼 때, 길을 묻지 않아도 돼
내게로 오는 편지, 정확히 닿으리니 ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive PR 설명이 템플릿의 기본 구조를 따르고 있으나, 주요 필수 정보가 불완전합니다. Summary 섹션에 구체적인 작업 내용을 추가하고, 관련 이슈 번호 태그와 상세한 변경 사항 설명을 포함해주세요.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경사항의 주요 내용을 명확하게 나타내고 있습니다. 404 에러 수정이라는 구체적인 목표를 명시하고 있습니다.
✨ 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 fix/post-message-myself

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d043aa and b562b96.

📒 Files selected for processing (1)
  • src/pages/letterPage/pages/letter-write-page.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/pages/letterPage/pages/letter-write-page.tsx

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 23, 2025

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: 1

♻️ Duplicate comments (1)
src/pages/letterPage/pages/letter-write-page.tsx (1)

100-102: 동일한 중복 할당 문제가 발생합니다.

이 부분도 Lines 80-84와 동일한 문제가 있습니다. Line 101에서 설정한 boardShare?.shareUri 값이 Line 102에서 즉시 덮어써집니다.

🔎 제안된 수정 사항

Line 102를 제거하고 Line 101만 유지하세요:

         const stored = localStorage.getItem(LOCALSTORAGE_KEY);
         const draft: Partial<MessageData> = stored ? JSON.parse(stored) : {};
         draft.sender = authorName;
         // 내게 쓰기 흐름일 때는 자신의 보드 shareUri 사용
         draft.shareUri = shareUri ?? (isJoinPage ? boardShare?.shareUri : draft.shareUri)
-        draft.shareUri = shareUri ?? draft.shareUri ?? "";

또는 두 로직을 하나로 통합:

         const stored = localStorage.getItem(LOCALSTORAGE_KEY);
         const draft: Partial<MessageData> = stored ? JSON.parse(stored) : {};
         draft.sender = authorName;
         // 내게 쓰기 흐름일 때는 자신의 보드 shareUri 사용
-        draft.shareUri = shareUri ?? (isJoinPage ? boardShare?.shareUri : draft.shareUri)
-        draft.shareUri = shareUri ?? draft.shareUri ?? "";
+        draft.shareUri = shareUri ?? (isJoinPage ? boardShare?.shareUri : draft.shareUri) ?? "";
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1efd8b1 and 2d043aa.

📒 Files selected for processing (1)
  • src/pages/letterPage/pages/letter-write-page.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
src/pages/letterPage/pages/letter-write-page.tsx (1)
src/stores/useAuthStore.ts (1)
  • useAuthStore (20-75)
🔇 Additional comments (2)
src/pages/letterPage/pages/letter-write-page.tsx (2)

11-11: LGTM!

useAuthStore 임포트가 올바르게 추가되었습니다. 내게 쓰기 흐름에서 boardShare에 접근하기 위해 필요합니다.


19-19: LGTM!

boardShare 추출이 올바르게 구현되었습니다. 인증된 사용자의 보드 정보를 가져오는 방식이 적절합니다.

@KwonDeaGeun KwonDeaGeun merged commit 10e2ea0 into develop Dec 23, 2025
6 checks passed
@KwonDeaGeun KwonDeaGeun deleted the fix/post-message-myself branch December 27, 2025 22:01
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