Skip to content

[Feat] 저장작품 리스트 화면#204

Merged
ckals413 merged 5 commits into
developfrom
FLT-13-저장작품-리스트-화면
May 14, 2026

Hidden character warning

The head ref may contain hidden characters: "FLT-13-\uc800\uc7a5\uc791\ud488-\ub9ac\uc2a4\ud2b8-\ud654\uba74"
Merged

[Feat] 저장작품 리스트 화면#204
ckals413 merged 5 commits into
developfrom
FLT-13-저장작품-리스트-화면

Conversation

@ckals413
Copy link
Copy Markdown
Contributor

@ckals413 ckals413 commented May 12, 2026

📮 관련 이슈

Flt 13 저장작품 리스트 화면

📌 작업 내용

  • 저장작품 리스트 화면 했습니다

📸 스크린샷

스크린샷
image

😅 미구현

  • [ ]

🫛 To. 리뷰어

Summary by CodeRabbit

  • 새로운 기능

    • 저장된 콘텐츠를 확인할 수 있는 새로운 화면 추가
    • 검색 기능으로 저장된 콘텐츠를 빠르게 검색 가능
    • 북마크 관리 및 토글 기능 지원
    • 저장된 콘텐츠의 총 개수 표시
  • 스타일

    • 프로필 화면의 UI 텍스트 및 스타일 개선

Review Change Stack

@ckals413 ckals413 self-assigned this May 12, 2026
@ckals413 ckals413 added the Feat ✨ 신규 기능을 추가하거나 기존 기능의 동작, 정책을 변경 label May 12, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

Warning

Rate limit exceeded

@ckals413 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 45 minutes and 48 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a7de62f7-c392-4679-b36b-ccc271b5d370

📥 Commits

Reviewing files that changed from the base of the PR and between 7fd509b and 07dd43c.

📒 Files selected for processing (1)
  • app/src/main/java/com/flint/presentation/profile/SavedContentScreen.kt
📝 Walkthrough

요약

저장된 콘텐츠를 표시하는 완전한 Compose 화면 기능을 추가합니다. 불변 UI 상태 모델, 저장소 통합을 포함한 ViewModel, 검색 및 북마크 토글 기능이 있는 화면 레이아웃, 그리고 기존 컴포넌트의 스타일 조정을 포함합니다.

변경사항

저장된 콘텐츠 화면 기능

레이어 / 파일 요약
UI 상태 모델 정의
app/src/main/java/com/flint/presentation/profile/uistate/SavedContentUiState.kt
SavedContentUiState는 검색 키워드, 콘텐츠 로딩 상태(로딩/성공/실패/빈 상태), 북마크 제한 모달 표시 여부를 가진 불변 데이터 클래스입니다. 파생 속성으로 필터링된 콘텐츠 목록과 총 개수를 제공하며, 북마크 제한 검사용 MIN_REQUIRED_COUNT = 5 상수와 프리뷰용 Empty, Fake 인스턴스를 정의합니다.
ViewModel 상태 관리
app/src/main/java/com/flint/presentation/profile/SavedContentViewModel.kt
SavedContentViewModelContentRepository에서 북마크된 콘텐츠를 초기화 시 로드하고, uiState StateFlow를 통해 로딩/성공/실패 상태를 관리합니다. 검색 키워드 업데이트/초기화, 북마크 토글(임계값 기반 제한 모달 표시), 그리고 모달 닫기 메서드를 제공합니다.
화면 구성 및 레이아웃
app/src/main/java/com/flint/presentation/profile/SavedContentScreen.kt
SavedContentRoute는 ViewModel을 Hilt 주입으로 수집하고, SavedContentScreen은 상단 앱바, 검색 입력(IME 검색 액션), 콘텐츠 개수 표시(Success 상태 전용), 그리고 로딩/빈/검색 결과 없음/콘텐츠 목록을 조건부로 렌더링합니다. 제한 모달, SavedContentList(LazyColumn으로 각 항목 렌더링), 그리고 4가지 상태를 보여주는 @Preview 변형을 포함합니다.
컴포넌트 스타일 조정
app/src/main/java/com/flint/presentation/profile/component/CollectionCreateContentBookmark.kt
createdYear 텍스트 스타일을 body1R16에서 더 작은 caption1M12로 변경하고, 레이블을 "시청 가능한 OTT"로 업데이트하여 저장된 콘텐츠 화면과의 일관성을 유지합니다.

예상 코드 리뷰 노력

🎯 3 (Moderate) | ⏱️ ~25분

관련된 PR

추천 라벨

📱 UI, 🧩 Component

추천 리뷰어

  • kimjw2003
  • chanmi1125
  • giovannijunseokim

시 🐰

북마크한 콘텐츠를 찾아낸다네 ✨
검색창에 키워드를 입력하고 흘러가네,
다섯 개 미만이면 주의창이 팡! 💫
State 흐름을 타고 Compose로 그려지고,
사용자의 손짓에 모두 응답하네 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 36.36% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 제목은 저장작품 리스트 화면 구현이라는 PR의 주요 변경사항을 명확하고 간결하게 설명하고 있습니다.
Description check ✅ Passed 설명은 저장소의 템플릿을 따르고 관련 이슈, 작업 내용, 스크린샷을 포함하고 있으나 미구현 항목이 비어있고 리뷰어 메모가 없습니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch FLT-13-저장작품-리스트-화면

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.

Copy link
Copy Markdown
Contributor

@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

🧹 Nitpick comments (2)
app/src/main/java/com/flint/presentation/profile/SavedContentScreen.kt (1)

220-271: ⚡ Quick win

프리뷰 데이터의 중복된 타이틀

인덱스 1-7의 모든 항목이 동일한 제목("해리포터와 불의잔")을 사용하고 있습니다. 프리뷰의 실용성을 높이기 위해 다양한 제목을 사용하는 것을 권장합니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/java/com/flint/presentation/profile/SavedContentScreen.kt`
around lines 220 - 271, 현재 BookmarkedContentItemModel 인스턴스들(id "1".."7")이 모두 동일한
title("해리포터와 불의잔")을 사용하고 있어 프리뷰 가치가 떨어집니다; BookmarkedContentItemModel의 title 값을
각 항목(id 필드)을 기준으로 고유하고 다양한 실제 콘텐츠 제목으로 바꾸고(예: 서로 다른 영화/드라마 명 또는 연도별 변형), 필요하면
getOttSimpleList나 year 등 다른 필드도 약간씩 달리하여 미리보기 데이터의 다양성을 확보하세요.
app/src/main/java/com/flint/presentation/profile/SavedContentViewModel.kt (1)

68-76: ⚡ Quick win

북마크 API 연동 시 낙관적 업데이트(optimistic update) 패턴 적용 권장

TODO 구현 시, API 호출 전에 클라이언트 상태를 먼저 업데이트하고 실패 시 롤백하는 방식을 고려해주세요. 서버 응답을 기다리지 않고 즉시 UI에 반영하여 사용자 경험을 개선할 수 있습니다. Based on learnings, bookmark toggle APIs should perform optimistic updates by updating the isBookmarked state on the client first.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/java/com/flint/presentation/profile/SavedContentViewModel.kt`
around lines 68 - 76, Implement an optimistic update in toggleBookmark: before
calling the bookmark API (e.g., repository.toggleBookmark), immediately flip the
isBookmarked flag for the item in uiState (use _uiState.update on the list/entry
identified by contentId) and adjust totalCount accordingly, then call the API in
a coroutine; if the API fails, catch the exception and roll back the UI by
restoring the previous item state and totalCount and surface an error (e.g.,
show a toast or set an error field), while keeping the existing
MIN_REQUIRED_COUNT check and showBookmarkRestrictionModal behavior intact.
Ensure you reference toggleBookmark, uiState, _uiState, and MIN_REQUIRED_COUNT
when locating and updating state and when wiring the repository call and
rollback logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/main/java/com/flint/presentation/profile/SavedContentScreen.kt`:
- Around line 192-202: The CollectionCreateContentBookmark invocation uses
hardcoded bookmarkCount=123 and director="감독이름", causing incorrect display;
update the call to pass real values from the BookmarkedContentItemModel (e.g.,
use content.bookmarkCount and content.director if those properties exist) or, if
the model truly lacks those fields, remove the bookmarkCount and director params
from the CollectionCreateContentBookmark call and from the component signature
(update the CollectionCreateContentBookmark composable to no longer require
those params). Locate the call at CollectionCreateContentBookmark and the
model/class BookmarkedContentItemModel and either map the actual fields or
remove the unused props consistently.

---

Nitpick comments:
In `@app/src/main/java/com/flint/presentation/profile/SavedContentScreen.kt`:
- Around line 220-271: 현재 BookmarkedContentItemModel 인스턴스들(id "1".."7")이 모두 동일한
title("해리포터와 불의잔")을 사용하고 있어 프리뷰 가치가 떨어집니다; BookmarkedContentItemModel의 title 값을
각 항목(id 필드)을 기준으로 고유하고 다양한 실제 콘텐츠 제목으로 바꾸고(예: 서로 다른 영화/드라마 명 또는 연도별 변형), 필요하면
getOttSimpleList나 year 등 다른 필드도 약간씩 달리하여 미리보기 데이터의 다양성을 확보하세요.

In `@app/src/main/java/com/flint/presentation/profile/SavedContentViewModel.kt`:
- Around line 68-76: Implement an optimistic update in toggleBookmark: before
calling the bookmark API (e.g., repository.toggleBookmark), immediately flip the
isBookmarked flag for the item in uiState (use _uiState.update on the list/entry
identified by contentId) and adjust totalCount accordingly, then call the API in
a coroutine; if the API fails, catch the exception and roll back the UI by
restoring the previous item state and totalCount and surface an error (e.g.,
show a toast or set an error field), while keeping the existing
MIN_REQUIRED_COUNT check and showBookmarkRestrictionModal behavior intact.
Ensure you reference toggleBookmark, uiState, _uiState, and MIN_REQUIRED_COUNT
when locating and updating state and when wiring the repository call and
rollback logic.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9d6b7047-aebf-4929-8a72-5fad9c3ae060

📥 Commits

Reviewing files that changed from the base of the PR and between 62e570f and 7fd509b.

📒 Files selected for processing (4)
  • app/src/main/java/com/flint/presentation/profile/SavedContentScreen.kt
  • app/src/main/java/com/flint/presentation/profile/SavedContentViewModel.kt
  • app/src/main/java/com/flint/presentation/profile/component/CollectionCreateContentBookmark.kt
  • app/src/main/java/com/flint/presentation/profile/uistate/SavedContentUiState.kt

Comment on lines +192 to +202
CollectionCreateContentBookmark(
onBookmarkClick = { onBookmarkClick(content.id) },
onMoreClick = {},
isBookmarked = true,
bookmarkCount = 123,
imageUrl = content.imageUrl,
title = content.title,
director = "감독이름",
createdYear = content.year,
ottList = content.getOttSimpleList,
)
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot May 12, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# BookmarkedContentItemModel의 실제 필드 확인
ast-grep --pattern $'data class BookmarkedContentItemModel(
  $$$
)'

# CollectionCreateContentBookmark 컴포넌트 시그니처 확인
ast-grep --pattern $'fun CollectionCreateContentBookmark(
  $$$
)'

Repository: imflint/Flint-Android

Length of output: 841


🏁 Script executed:

# Search for CollectionCreateContentBookmark function definition
rg "fun CollectionCreateContentBookmark" -A 15

Repository: imflint/Flint-Android

Length of output: 11924


🏁 Script executed:

# Also check the actual file at the specified lines
cat -n app/src/main/java/com/flint/presentation/profile/SavedContentScreen.kt | sed -n '185,210p'

Repository: imflint/Flint-Android

Length of output: 1058


하드코딩된 값으로 인한 부정확한 정보 표시

bookmarkCount = 123director = "감독이름"이 하드코딩되어 있습니다. BookmarkedContentItemModel에 이 필드들이 없어서, 모든 북마크가 동일한 값으로 표시됩니다. 실제 데이터를 사용하도록 수정하거나, 이 파라미터들이 필요 없다면 제거해야 합니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/java/com/flint/presentation/profile/SavedContentScreen.kt`
around lines 192 - 202, The CollectionCreateContentBookmark invocation uses
hardcoded bookmarkCount=123 and director="감독이름", causing incorrect display;
update the call to pass real values from the BookmarkedContentItemModel (e.g.,
use content.bookmarkCount and content.director if those properties exist) or, if
the model truly lacks those fields, remove the bookmarkCount and director params
from the CollectionCreateContentBookmark call and from the component signature
(update the CollectionCreateContentBookmark composable to no longer require
those params). Locate the call at CollectionCreateContentBookmark and the
model/class BookmarkedContentItemModel and either map the actual fields or
remove the unused props consistently.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

북마크 api연결하면서 BookmarkedContentItemModel 추가할 예정

Copy link
Copy Markdown

@jongwoo2003-sidewalk jongwoo2003-sidewalk left a comment

Choose a reason for hiding this comment

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

코드 리뷰

[중간] SavedContentScreen.kt — 하드코딩된 플레이스홀더 값

CollectionCreateContentBookmark(
    isBookmarked = true,
    bookmarkCount = 123,       // 하드코딩
    director = "감독이름",      // 플레이스홀더
    ...
)
  • bookmarkCount = 123: 실제 API 응답 데이터와 연동이 필요합니다.
  • director = "감독이름": 플레이스홀더 문자열이 그대로 남아 있습니다. BookmarkedContentItemModeldirector 필드가 없는 것 같은데, 미구현 상태라면 TODO 처리 또는 PR 미구현 항목에 명시가 필요합니다.

[중간] SavedContentScreen.ktUiState.EmptyUiState.Failure 동일 처리

is UiState.Empty,
is UiState.Failure -> {
    FlintSearchEmptyView(title = "작품을 찾을 수 없어요")
}

Empty(저장 작품 없음)와 Failure(네트워크/서버 오류)를 동일한 UI로 처리하고 있습니다.

  • Empty는 "저장한 작품이 없어요" 같은 안내가 적절합니다.
  • Failure는 오류 안내 + 재시도 버튼이 필요합니다.

두 케이스를 분리해서 처리하는 것을 권장합니다.


[중간] SavedContentUiState.ktMIN_REQUIRED_COUNT와 모달 텍스트 불일치

// SavedContentUiState.kt
const val MIN_REQUIRED_COUNT = 5

// SavedContentScreen.kt
message = "취향 키워드 분석을 위해\n최소 5개의 작품을 저장해주세요"

MIN_REQUIRED_COUNT 상수를 정의해놓고 모달 텍스트에는 5가 하드코딩되어 있습니다. 값이 변경될 경우 두 곳을 동시에 수정해야 하므로 아래처럼 상수를 참조하는 것을 권장합니다.

message = "취향 키워드 분석을 위해\n최소 ${MIN_REQUIRED_COUNT}개의 작품을 저장해주세요"

@ckals413
Copy link
Copy Markdown
Contributor Author

ckals413 commented May 13, 2026

@kimjw2003

  1. bookmarkCount와 director는 모두 api 연동시 실제 데이터로 교체할 예정입니다! BookmarkedContentItemModel에 해당 필드 추가예정!
  2. 화면 설계 상 북마크한 목록이 Empty일 상황이 절대로 발생하지 않기 때문에 Failure와 동일하게 처리했습니다 !
  3. 상수값 반영하게 변경했습니다!

Copy link
Copy Markdown
Contributor

@kimjw2003 kimjw2003 left a comment

Choose a reason for hiding this comment

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

굳굳

@ckals413 ckals413 merged commit e10c479 into develop May 14, 2026
2 checks passed
@ckals413 ckals413 deleted the FLT-13-저장작품-리스트-화면 branch May 14, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feat ✨ 신규 기능을 추가하거나 기존 기능의 동작, 정책을 변경

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants