Skip to content

Comments

통계 상세 화면 구현#98

Open
chanho0908 wants to merge 21 commits intofeat/#88-stats-detailfrom
feat/#88-stats-detail-feature
Open

통계 상세 화면 구현#98
chanho0908 wants to merge 21 commits intofeat/#88-stats-detailfrom
feat/#88-stats-detail-feature

Conversation

@chanho0908
Copy link
Member

이슈 번호

#88

작업내용

  • 통계 상세 화면 구현

결과물

default.mp4

리뷰어에게 추가로 요구하는 사항 (선택)

TODO

-[ ] 목표 수정 & 끝내기 기능 연동

- 이전/다음 달로 이동이 가능한지 확인하기 위해 `hasNext`와 `hasPrevious` 속성을 추가
- 기존 `isInProgressStatsDetail` 로직을 `selectedDate` null 체크에서 초기 로딩 상태를 나타내는 boolean 값으로 변경
- `fetchStatsDetail` 호출 시 이전 Job을 취소하여 중복 호출 방지
- 목표 완료/삭제 시 `StatsRefreshBus`에 `Publisher` 정보를 전달하여 분기 처리 추가
@chanho0908 chanho0908 self-assigned this Feb 24, 2026
@chanho0908 chanho0908 added the Feature Extra attention is needed label Feb 24, 2026
@chanho0908
Copy link
Member Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot]

This comment was marked as resolved.

@chanho0908
Copy link
Member Author

@coderabbitai review

@YAPP-Github YAPP-Github deleted a comment from coderabbitai bot Feb 24, 2026
coderabbitai[bot]

This comment was marked as resolved.

@chanho0908 chanho0908 requested a review from dogmania February 24, 2026 08:21
@YAPP-Github YAPP-Github deleted a comment from coderabbitai bot Feb 24, 2026
@YAPP-Github YAPP-Github deleted a comment from coderabbitai bot Feb 24, 2026
@YAPP-Github YAPP-Github deleted a comment from coderabbitai bot Feb 24, 2026
Copy link
Member

@dogmania dogmania left a comment

Choose a reason for hiding this comment

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

고생하셨습니다~!

}

StatsDetailScreen(
uiSate = uiState,
Copy link
Member

Choose a reason for hiding this comment

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

여기 오타났어요!

Copy link
Member Author

Choose a reason for hiding this comment

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

리뷰 반영 커밋 : 769dde4

private val statsRefreshBus: StatsRefreshBus,
private val goalRepository: GoalRepository,
private val statsRepository: StatsRepository,
savedSateHandle: SavedStateHandle,
Copy link
Member

Choose a reason for hiding this comment

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

여기도 오타 있어요!

Copy link
Member Author

Choose a reason for hiding this comment

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

리뷰 반영 커밋 : 9f42116

Copy link
Member

Choose a reason for hiding this comment

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

지금 여기 전체적으로 왼쪽을 따로 Column으로 묶고 오른쪽을 따로 Column으로 묶으면 수직 정렬이 안 맞아서 UI가 이상하게 렌더링될 수 있어요

Image

실제 기기에서 보면 오른쪽 Column이 왼쪽보다 밑으로 내려가 있어서 이 부분은 수정해주세요!

Copy link
Member Author

Choose a reason for hiding this comment

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

리뷰 반영 커밋 : 3b9d4c4

Modifier
.fillMaxSize()
.background(GrayColor.C050)
.verticalScroll(scrollState),
Copy link
Member

Choose a reason for hiding this comment

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

여기에 스크롤을 주면 상단바도 같이 스크롤돼서 상단바는 스크롤 영역에서 빼주세요!

Copy link
Member Author

Choose a reason for hiding this comment

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

리뷰 반영 커밋 : e87c2a6

Comment on lines 48 to 62
init {
viewModelScope.launch {
monthChangeFlow
.distinctUntilChanged()
.debounce(DEBOUNCE_INTERVAL)
.collect { date ->
fetchStatsDetail(date)
}
}
}

init {
reduceNavArguments()
fetchStatsDetail(argDate?.let { LocalDate.parse(it) })
}
Copy link
Member

Choose a reason for hiding this comment

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

init 블록은 하나로 통일해도 될 거 같아요

Copy link
Member Author

Choose a reason for hiding this comment

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

리뷰 반영 커밋 : 7371166


private val argDate: String? = savedSateHandle.get<String>(NavRoutes.StatsDetailRoute.ARG_DATE)

private val cache = mutableMapOf<LocalDate, StatsDetail>()
Copy link
Member

Choose a reason for hiding this comment

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

이게 나중에 Repository 로직이 어떻게 수정될지에 따라 다르겠지만 캐시의 기준이 월 단위 캐시면 LocalDate보다는 YearMonth를 key로 쓰는 건 어떨까요

Copy link
Member Author

Choose a reason for hiding this comment

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

API 호출할 때 YearMonth로 호출해야해서 변경했어 !

리뷰 반영 커밋 : db67239


companion object {
private const val GOAL_ID_NOT_FOUND = "Goal Id Argument Not Found"
private const val DEBOUNCE_INTERVAL = 600L
Copy link
Member

Choose a reason for hiding this comment

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

600은 살짝 느린감이 있어서 보통 디바운싱할 떄 300 정도를 많이 사용하던데 수정하는 건 어떠신가요

Copy link
Member Author

Choose a reason for hiding this comment

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

좋은 것 같아 !

리뷰 반영 커밋 : c200a14

# Conflicts:
#	feature/stats/detail/src/main/java/com/twix/stats/detail/StatsDetailRoute.kt
#	feature/stats/detail/src/main/java/com/twix/stats/detail/StatsDetailScreen.kt
#	feature/stats/detail/src/main/java/com/twix/stats/detail/StatsDetailViewModel.kt
#	feature/stats/detail/src/main/java/com/twix/stats/detail/component/SummaryContent.kt
#	feature/stats/detail/src/main/java/com/twix/stats/detail/contract/StatsDetailIntent.kt
#	feature/stats/detail/src/main/java/com/twix/stats/detail/di/StatsDetailModule.kt
@YAPP-Github YAPP-Github deleted a comment from coderabbitai bot Feb 25, 2026
- `savedSateHandle`을 `savedStateHandle`로 수정
- `verticalScroll` 수식 범위를 `Box`로 이동하여 Topbar는 스크롤되지 않도록 수정
- `monthChangeFlow`를 구독하고 처리하는 로직을 별도의 `collectMonthChangeFlow` 메서드로 분리하여 `init` 블록의 가독성을 개선했습니다.
- `init` 블록 내 메서드 호출 순서를 조정했습니다.
- `DEBOUNCE_INTERVAL` 값을 600L에서 300L로 수정
- 월별 통계 데이터를 캐시할 때, `LocalDate` 대신 `YearMonth`를 키로 사용하여 월 단위 캐싱의 정확성을 개선
- `SummaryRow` 컴포저블을 새로 추가하여 반복되는 UI 로직을 개선
- 기존의 복잡한 `Row`/`Column` 구조를 `SummaryRow`를 사용하도록 수정하여 코드 가독성 및 재사용성 향상
@YAPP-Github YAPP-Github deleted a comment from coderabbitai bot Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants