Skip to content

[hotfix] 피드 단일 조회 api response 수정#244

Merged
seongjunnoh merged 1 commit into
developfrom
hotfix/#243-feed-show-single-response
Aug 17, 2025
Merged

[hotfix] 피드 단일 조회 api response 수정#244
seongjunnoh merged 1 commit into
developfrom
hotfix/#243-feed-show-single-response

Conversation

@seongjunnoh
Copy link
Copy Markdown
Collaborator

@seongjunnoh seongjunnoh commented Aug 17, 2025

#️⃣ 연관된 이슈

closes #243

📝 작업 내용

@rbqks529 님의 요청으로 피드 단일 조회 api의 response에 isPublic, bookImageUrl 데이터 추가하였습니다

📸 스크린샷

image

💬 리뷰 요구사항

📌 PR 진행 시 이러한 점들을 참고해 주세요

* P1 : 꼭 반영해 주세요 (Request Changes) - 이슈가 발생하거나 취약점이 발견되는 케이스 등
* P2 : 반영을 적극적으로 고려해 주시면 좋을 것 같아요 (Comment)
* P3 : 이런 방법도 있을 것 같아요~ 등의 사소한 의견입니다 (Chore)

Summary by CodeRabbit

  • 신기능
    • 피드 단건 조회 응답에 도서 이미지 URL과 공개 여부가 포함되어, 클라이언트에서 책 표지와 공개 상태를 직접 표시할 수 있습니다.
    • 사용자별 피드 조회에서도 도서 이미지가 제공되어 목록/카드에서 시각적 정보를 강화합니다.
    • 추가 필드 제공으로 썸네일 렌더링과 공개 상태 배지 등의 UI 요소 구성이 용이해졌습니다.

@seongjunnoh seongjunnoh linked an issue Aug 17, 2025 that may be closed by this pull request
2 tasks
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 17, 2025

Walkthrough

FeedShowSingleResponse 레코드에 bookImageUrl(String)과 isPublic(boolean) 필드가 추가되었습니다. FeedQueryMapper에서 해당 필드들을 매핑하도록 toFeedShowSingleResponse 및 toFeedShowByUserResponse에 매핑 항목이 추가되었습니다. 기존 메서드 시그니처 변경은 없습니다.

Changes

Cohort / File(s) Summary
Feed detail response DTO
src/main/java/.../feed/adapter/in/web/response/FeedShowSingleResponse.java
레코드 구성 요소 추가: String bookImageUrl, boolean isPublic. 기존 필드 순서에 bookImageUrl가 bookTitle 다음, isPublic이 tagList 다음에 위치.
Feed query mappers
src/main/java/.../feed/application/mapper/FeedQueryMapper.java
MapStruct 매핑 추가: toFeedShowSingleResponse에 book.imageUrl -> bookImageUrl, feed.isPublic -> isPublic; toFeedShowByUserResponse에 book.imageUrl -> bookImageUrl. 메서드 시그니처 변경 없음.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Assessment against linked issues

Objective Addressed Explanation
피드 상세조회 API 응답 수정 (#243)

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
toFeedShowByUserResponse에 bookImageUrl 매핑 추가 (src/main/java/.../feed/application/mapper/FeedQueryMapper.java: lines N/A) 이슈 #243는 “피드 상세조회” 응답 수정만을 목표로 하며, 사용자별 피드 조회 응답에 대한 변경 범위는 명시되어 있지 않습니다.

Possibly related PRs

Suggested labels

🔥 hotfix, 👻 성준

Suggested reviewers

  • hd0rable
  • buzz0331

Poem

토끼 발끝이 툭, 응답에 빛을 얹고
책 그림 한 장, 공개 여부 살짝 곁들여
맵퍼는 바늘, DTO는 실타래
한 땀 두 땀 이어 붙여
야무진 패치로 오늘도 폴짝! 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

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

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1707404 and 3eafdd0.

📒 Files selected for processing (2)
  • src/main/java/konkuk/thip/feed/adapter/in/web/response/FeedShowSingleResponse.java (2 hunks)
  • src/main/java/konkuk/thip/feed/application/mapper/FeedQueryMapper.java (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: seongjunnoh
PR: THIP-TextHip/THIP-Server#113
File: src/main/java/konkuk/thip/recentSearch/adapter/out/persistence/RecentSearchCommandPersistenceAdapter.java:38-44
Timestamp: 2025-07-30T14:05:04.945Z
Learning: seongjunnoh는 코드 최적화 제안에 대해 구체적인 기술적 근거와 효율성 차이를 이해하고 싶어하며, 성능 개선 방식에 대한 상세한 설명을 선호한다.
Learnt from: seongjunnoh
PR: THIP-TextHip/THIP-Server#93
File: src/main/java/konkuk/thip/room/adapter/out/persistence/RoomQueryPersistenceAdapter.java:49-114
Timestamp: 2025-07-28T16:44:31.224Z
Learning: seongjunnoh는 코드 중복 문제에 대한 리팩토링 제안을 적극적으로 수용하고 함수형 인터페이스를 활용한 해결책을 선호한다.
Learnt from: seongjunnoh
PR: THIP-TextHip/THIP-Server#195
File: src/main/java/konkuk/thip/feed/application/mapper/FeedQueryMapper.java:0-0
Timestamp: 2025-08-13T05:22:32.287Z
Learning: seongjunnoh는 데이터 무결성과 중복 방지에 대한 고민이 깊으며, LinkedHashSet을 활용한 중복 제거와 순서 보장을 동시에 달성하는 솔루션을 선호한다.
Learnt from: seongjunnoh
PR: THIP-TextHip/THIP-Server#180
File: src/main/java/konkuk/thip/room/application/service/AttendanceCheckCreateService.java:22-40
Timestamp: 2025-08-14T09:15:31.332Z
Learning: seongjunnoh는 기술적 완벽성보다 실제 비즈니스 시나리오와 사용자 행동 패턴을 우선 고려하며, 발생 가능성이 낮은 엣지 케이스보다는 실용적인 구현을 선호한다.
Learnt from: seongjunnoh
PR: THIP-TextHip/THIP-Server#112
File: src/main/java/konkuk/thip/feed/adapter/out/persistence/repository/FeedQueryRepositoryImpl.java:272-272
Timestamp: 2025-07-30T10:44:34.115Z
Learning: seongjunnoh는 피드 커서 페이지네이션에서 LocalDateTime 단일 커서 방식을 선호하며, 복합 키 기반 커서보다 구현 단순성과 성능을 우선시한다.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (4)
src/main/java/konkuk/thip/feed/adapter/in/web/response/FeedShowSingleResponse.java (2)

12-12: bookImageUrl 필드 추가 적절

단일 피드 상세 응답 스키마 확장 목적(P1)에 정확히 부합합니다. 이후 매퍼에도 매핑이 추가되어 일관성 유지된 점 좋습니다.


22-23: isPublic 필드 추가: 수동 생성 호출부 미발견으로 변경 안전

FeedShowSingleResponse 레코드의 생성자 시그니처가 변경되었지만, 전체 코드베이스에서 수동으로 new FeedShowSingleResponse(...)를 호출하는 부분이 존재하지 않으므로 빌드 타임 오류 우려 없습니다. 기존 isSaved/isLiked 컴포넌트와 동일한 방식으로 JSON 직렬화 시 필드가 노출됩니다.

resolve_review_comment

src/main/java/konkuk/thip/feed/application/mapper/FeedQueryMapper.java (2)

93-93: bookImageUrl 매핑 추가 적절

도메인 Book.imageUrl -> 응답 bookImageUrl 매핑이 명확하고, 기존 bookTitle/isbn/bookAuthor 매핑 패턴과도 일관적입니다.


104-105: isPublic 매핑 검증 완료
Feed 클래스에 Lombok @Getterpublic Boolean getIsPublic() 메서드가 생성되어 MapStruct가 source = "feed.isPublic"을 올바르게 인식합니다. 컴파일 시 매핑 오류가 없었으므로 별도 expression 지정은 불필요합니다.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hotfix/#243-feed-show-single-response

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
🪧 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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@github-actions
Copy link
Copy Markdown

Test Results

404 tests   404 ✅  31s ⏱️
120 suites    0 💤
120 files      0 ❌

Results for commit 3eafdd0.

@seongjunnoh seongjunnoh merged commit 2efd1e4 into develop Aug 17, 2025
3 of 4 checks passed
@seongjunnoh seongjunnoh deleted the hotfix/#243-feed-show-single-response branch August 17, 2025 13:59
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.

[THIP2025-291] [hotfix] 피드 상세조회 api response 수정

1 participant