Skip to content

Refactor home screen to use actual service data#98

Closed
Copilot wants to merge 2 commits intodevelopfrom
copilot/refactor-home-screen
Closed

Refactor home screen to use actual service data#98
Copilot wants to merge 2 commits intodevelopfrom
copilot/refactor-home-screen

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 8, 2026

Overview

The home screen endpoint was returning mock data with TODO comments. This refactor integrates four existing services to provide real, personalized content.

Changes

Service Integration

  • BannerService: Personalized banners (review prompts, magazine recommendations)
  • AdvertisementService: Promotional content
  • ProductService: Recommendation engine (personalized for logged-in users, popular for anonymous)
  • MagazineService: Curated content

DTO Updates

HomeResDto now returns typed domain objects instead of string lists:

// Before
List<String> bannerUrls
List<String> recommendProducts
String latestMagazineTitle

// After  
BannerResponse banner
List<AdvertisementResponse> advertisements
List<RecommendedProductResponse> recommendedProducts
List<MagazineResDto> recommendedMagazines

Controller Enhancement

HomeController now accepts @AuthenticationPrincipal Long userId to enable personalized recommendations while maintaining support for anonymous users (userId = null).

Technical Notes

  • All injected services use @Transactional(readOnly = true)
  • Recommendation size hardcoded to 10 products (could be configurable)
  • Import ordering follows standard Java conventions (java., org., com.*)
Original prompt

This section details on the original issue you should resolve

<issue_title>[Refactor] 홈화면</issue_title>
<issue_description>## 📌 Description

[Refactor] 홈화면

✅ To-do

  • 진행 예정
  • 진행 완료

📒 기타</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: neibler <87866961+neibler@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor home screen for improved layout Refactor home screen to use actual service data Feb 8, 2026
Copilot AI requested a review from neibler February 8, 2026 07:27
@neibler neibler closed this Feb 8, 2026
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.

[Refactor] 홈화면

2 participants