Skip to content

[Refactor] profile 외부 모듈로 분리 및 파일 오류 수정#1531

Open
TTRR1007 wants to merge 6 commits into
developfrom
feature/#1496-move-profile-to-external-module
Open

[Refactor] profile 외부 모듈로 분리 및 파일 오류 수정#1531
TTRR1007 wants to merge 6 commits into
developfrom
feature/#1496-move-profile-to-external-module

Conversation

@TTRR1007

@TTRR1007 TTRR1007 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

PR 개요

이슈 번호: #1496

PR 체크리스트

  • Code convention을 잘 지켰나요?
  • Lint check를 수행하였나요?
  • Assignees를 추가했나요?

작업사항

  • 버그 수정
  • 신규 기능
  • 코드 스타일 수정 (포맷팅 등)
  • 리팩토링 (기능 수정 X, API 수정 X)
  • 기타

작업사항의 상세한 설명

profile을 home 내부에서 외부 모듈로 분리했습니다
파일에 있는 사용하지 않는 코드 몇가지를 제거했습니다

논의 사항

스크린샷

추가내용

  • develop, sprint 브랜치를 향하고 있습니다
  • production 브랜치를 향하고 있습니다

Summary by CodeRabbit

  • 새 기능

    • 프로필 화면을 독립 기능으로 분리해 앱에 포함했습니다.
    • 프로필 전용 아바타 및 로그인·로그아웃·설정·알림 아이콘을 적용했습니다.
    • 프로필 화면에 시간표 섹션 관련 문자열 리소스를 추가했습니다.
  • 개선

    • 프로필 시간표 레이아웃/여백과 제목 스타일을 다듬어 보기 편하게 개선했습니다.
    • 강의 항목의 표시 방식과 식별 로직을 업데이트했습니다.
    • 알림 도트 및 아이콘 스타일을 프로필에 맞게 정리했습니다.

@TTRR1007 TTRR1007 requested a review from a team as a code owner July 13, 2026 14:43
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

프로필 기능을 feature/profile 모듈로 분리하고 관련 상태·모델·컴포넌트·리소스의 패키지를 이동했습니다. 앱 모듈 의존성과 ProfileFragment 참조를 갱신했으며, 프로필 화면과 시간표 UI 구성을 조정했습니다.

Changes

프로필 모듈 분리

Layer / File(s) Summary
모듈 빌드 및 앱 연결
feature/profile/build.gradle.kts, feature/profile/src/main/..., settings.gradle, koin/build.gradle.kts
feature/profile 모듈의 플러그인·의존성·Android 기본 구성을 추가하고 프로젝트와 앱 모듈에 연결했습니다.
프로필 상태 및 모델 이동
feature/profile/src/main/java/in/koreatech/koin/feature/profile/{Constant.kt,ProfileState.kt,ProfileSideEffect.kt,ProfileViewModel.kt}, feature/profile/src/main/java/in/koreatech/koin/feature/profile/{model,mapper}/*
프로필 관련 타입과 매퍼의 패키지를 feature.profile로 변경하고 ProfileState.showLogoutDialog를 제거했으며 ProfileTimetableColor@Immutable을 추가했습니다.
프로필 화면 및 UI 리소스
feature/profile/src/main/java/in/koreatech/koin/feature/profile/ProfileScreen.kt, feature/profile/src/main/java/in/koreatech/koin/feature/profile/component/*, feature/profile/src/main/res/{drawable,values}/*, koin/src/main/.../ProfileFragment.kt
프로필 화면·카드의 리소스와 레이아웃을 profile 전용 구성으로 변경하고 벡터 아이콘·문자열 리소스를 추가했습니다. 앱 Fragment의 ProfileScreen import도 갱신했습니다.
프로필 시간표 구성 변경
feature/profile/src/main/java/in/koreatech/koin/feature/profile/component/{ProfileTimetable.kt,ProfileTimetableDefaults.kt}
시간표 파생값 계산과 셀 패딩을 정리하고 색상 목록을 추가했으며, 강의 렌더링 키를 강의 속성 조합으로 변경했습니다.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ProfileFragment
  participant ProfileScreen
  participant ProfileViewModel
  participant ProfileCard
  participant ProfileTimetable
  ProfileFragment->>ProfileScreen: Compose 화면 호출
  ProfileScreen->>ProfileViewModel: 상태 관찰 및 시간표 로딩
  ProfileScreen->>ProfileCard: 프로필 카드 렌더링
  ProfileScreen->>ProfileTimetable: 강의 목록 전달
Loading

Possibly related PRs

Suggested labels: refactor

Suggested reviewers: kongwoojin, kym-p

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 프로필 기능의 외부 모듈 분리와 파일 오류 수정이라는 핵심 변경점을 잘 요약합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/#1496-move-profile-to-external-module

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.

@TTRR1007 TTRR1007 self-assigned this Jul 13, 2026
@bcsd-b-bot bcsd-b-bot Bot added the ci:passed label Jul 13, 2026
@bcsd-b-bot bcsd-b-bot Bot removed the ci:passed label Jul 14, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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
`@feature/profile/src/main/java/in/koreatech/koin/feature/profile/component/ProfileTimetableDefaults.kt`:
- Around line 6-11: Move the hardcoded Korean weekday values from
ProfileTimetableDefaults.days into a profile_timetable_days string array
resource, then remove that defaults property and load the localized array with
stringArrayResource in the ProfileTimetable composable. Preserve the existing
weekday ordering and usage.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 850f77de-98ad-45c9-ac56-be753385249a

📥 Commits

Reviewing files that changed from the base of the PR and between 2958922 and f9ef9c9.

📒 Files selected for processing (26)
  • feature/home/src/main/java/in/koreatech/koin/feature/home/profile/Constant.kt
  • feature/profile/build.gradle.kts
  • feature/profile/consumer-rules.pro
  • feature/profile/lint-baseline.xml
  • feature/profile/proguard-rules.pro
  • feature/profile/src/main/AndroidManifest.xml
  • feature/profile/src/main/java/in/koreatech/koin/feature/profile/Constant.kt
  • feature/profile/src/main/java/in/koreatech/koin/feature/profile/ProfileScreen.kt
  • feature/profile/src/main/java/in/koreatech/koin/feature/profile/ProfileSideEffect.kt
  • feature/profile/src/main/java/in/koreatech/koin/feature/profile/ProfileState.kt
  • feature/profile/src/main/java/in/koreatech/koin/feature/profile/ProfileViewModel.kt
  • feature/profile/src/main/java/in/koreatech/koin/feature/profile/component/ProfileCard.kt
  • feature/profile/src/main/java/in/koreatech/koin/feature/profile/component/ProfileTimetable.kt
  • feature/profile/src/main/java/in/koreatech/koin/feature/profile/component/ProfileTimetableDefaults.kt
  • feature/profile/src/main/java/in/koreatech/koin/feature/profile/mapper/ProfileTimetableMapper.kt
  • feature/profile/src/main/java/in/koreatech/koin/feature/profile/model/ProfileTimetableLecture.kt
  • feature/profile/src/main/res/drawable/ic_profile_avatar.xml
  • feature/profile/src/main/res/drawable/ic_profile_login.xml
  • feature/profile/src/main/res/drawable/ic_profile_logout.xml
  • feature/profile/src/main/res/drawable/ic_profile_notification.xml
  • feature/profile/src/main/res/drawable/ic_profile_notification_dot.xml
  • feature/profile/src/main/res/drawable/ic_profile_setting.xml
  • feature/profile/src/main/res/values/string.xml
  • koin/build.gradle.kts
  • koin/src/main/java/in/koreatech/koin/ui/newmain/fragment/ProfileFragment.kt
  • settings.gradle
💤 Files with no reviewable changes (1)
  • feature/home/src/main/java/in/koreatech/koin/feature/home/profile/Constant.kt

Comment thread feature/profile/src/main/AndroidManifest.xml Fixed
@bcsd-b-bot bcsd-b-bot Bot added the ci:passed label Jul 14, 2026

val timeCellPadding = remember { PaddingValues(horizontal = 8.dp, vertical = 6.dp) }
val headerCellPadding = remember { PaddingValues(horizontal = 8.dp, vertical = 6.dp) }
val cellPadding = PaddingValues(horizontal = 8.dp, vertical = 6.dp)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[Minor] PaddingValues 객체가 리컴포지션마다 새로 생성됩니다.

PaddingValues(...) 는 Composable 스코프에서 remember 없이 선언되면 매 리컴포지션마다 새 객체가 할당됩니다. 구조적 동등성 덕분에 하위 컴포저블의 리컴포지션을 유발하지는 않지만, 불필요한 힙 할당이 발생합니다.

Suggested change
val cellPadding = PaddingValues(horizontal = 8.dp, vertical = 6.dp)
val cellPadding = remember { PaddingValues(horizontal = 8.dp, vertical = 6.dp) }


lectures.forEachIndexed { index, lecture ->
key(index) {
key("${lecture.dayOfWeek}_${lecture.startTotalMinutes}_${lecture.name}") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[Minor] key() 에 문자열 보간 대신 다중 인자를 사용하세요.

"${a}_${b}_${c}" 형태의 문자열 보간은 리컴포지션마다 String 객체를 새로 할당합니다. Compose의 key() 는 여러 인자를 받아 CompoundKey 로 처리하므로, 문자열 할당 없이 동일한 안정성을 제공합니다.

또한 동명의 강의가 같은 요일·같은 시작 시간에 배치될 경우 키가 중복될 수 있습니다. 현실적으로 드문 케이스지만 Compose 런타임 경고의 원인이 됩니다.

Suggested change
key("${lecture.dayOfWeek}_${lecture.startTotalMinutes}_${lecture.name}") {
key(lecture.dayOfWeek, lecture.startTotalMinutes, lecture.name) {

Comment on lines +13 to +14
import kotlin.collections.firstOrNull
import kotlin.collections.orEmpty

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[Trivial] 불필요한 명시적 표준 라이브러리 임포트입니다.

kotlin.collections.firstOrNullkotlin.collections.orEmpty 는 Kotlin 기본 스코프에 자동으로 포함되어 있으므로 명시적으로 임포트할 필요가 없습니다. IDE가 자동 생성한 것으로 보이며, 삭제해도 컴파일에 영향 없습니다.

Suggested change
import kotlin.collections.firstOrNull
import kotlin.collections.orEmpty


Image(
imageVector = ImageVector.vectorResource(R.drawable.ic_koin_text),
contentDescription = ""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[Minor] 빈 문자열 contentDescription은 접근성을 해칩니다.

contentDescription = ""으로 설정하면 TalkBack이 해당 요소를 읽으려 시도하지만 아무것도 말하지 않아 스크린 리더 사용자에게 혼란을 줍니다. 장식용 이미지(로고 등)는 null로 설정해야 Compose가 접근성 트리에서 제외시킵니다. 위의 ic_bcsd_symbol 이미지도 동일하게 적용해야 합니다.

Suggested change
contentDescription = ""
contentDescription = null

Comment on lines +111 to +130
@Composable
private fun ProfileIcon(
imageVector: ImageVector,
modifier: Modifier = Modifier
) {
Box(
modifier = modifier
.clip(RoundedCornerShape(10.dp))
.background(RebrandKoinTheme.colors.neutral100)
.padding(vertical = 8.dp, horizontal = 8.dp),
contentAlignment = Alignment.Center
) {
Icon(
modifier = Modifier.size(24.dp),
imageVector = imageVector,
contentDescription = null,
tint = RebrandKoinTheme.colors.primary500
)
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[Info] ProfileIconHomeIcon의 로직을 중복합니다. core/designsystem으로 이동을 고려해주세요.

ProfileIconfeature/homeHomeIcon과 거의 동일한 구현입니다. 현재 feature/profilefeature/home에 의존할 수 없기 때문에 로컬 복제는 이해되지만, 이런 패턴이 다른 feature 모듈에도 반복될 경우 유지보수 비용이 증가합니다.

중장기적으로 HomeIcon (또는 더 범용적인 이름인 KoinIcon)을 core/designsystem으로 이동하면 모든 feature 모듈이 공유해서 사용할 수 있습니다. 이번 PR 스코프에서 즉시 해결할 필요는 없지만 별도 이슈로 추적을 권장합니다.

android:pathData="M17.499,9C18.427,9 19.317,8.631 19.973,7.975C20.63,7.319 20.999,6.428 20.999,5.5C20.999,4.572 20.63,3.681 19.973,3.025C19.317,2.369 18.427,2 17.499,2C16.57,2 15.68,2.369 15.024,3.025C14.367,3.681 13.998,4.572 13.998,5.5C13.998,6.428 14.367,7.319 15.024,7.975C15.68,8.631 16.57,9 17.499,9Z"
android:strokeLineJoin="round"
android:strokeWidth="1.5"
android:fillColor="#00000000"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[Minor] 알림 점(dot)의 색상이 하드코딩되어 있습니다.

strokeColor="#980AC9" 는 테마 색상 토큰과 연결되지 않은 매직 컬러입니다. Vector drawable에서 런타임 틴팅을 사용하는 것이 어렵다면, 최소한 디자인 시스템의 컬러 팔레트에 해당 값이 정의되어 있는지 확인하고 컬러 이름을 주석으로 남겨 추적 가능하게 해주세요.

android:strokeColor="#980AC9"

<string name="profile_setting">설정</string>
<string name="profile_timetable_section">내 시간표</string>
<string name="profile_username_default">익명</string>
</resources> No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[Trivial] 파일 끝에 개행 문자가 없습니다.

POSIX 표준 및 프로젝트 git 컨벤션에 따라 텍스트 파일의 마지막 줄에 개행 문자(\n)가 있어야 합니다. proguard-rules.proAndroidManifest.xml도 동일하게 수정이 필요합니다.

Comment on lines +168 to +172
Column(
modifier = modifier
.fillMaxWidth()
.padding(top = 16.dp, start = 24.dp, end = 24.dp),
verticalArrangement = Arrangement.spacedBy(12.dp)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[Info] TimetableSection 리팩토링 — 잘 처리했습니다.

HomeSection 컴포넌트(다른 모듈 의존성)를 제거하고 Column + Arrangement.spacedBy로 직접 구현한 것은 올바른 방향입니다. 타이포그래피도 medium18bold18로 교체하여 디자인 스펙을 더 정확히 반영했습니다. 👍

@sonarqubecloud

Copy link
Copy Markdown

@bcsd-b-bot bcsd-b-bot Bot added the ci:passed label Jul 14, 2026

@KYM-P KYM-P left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Padding 값 remember 과
문자열 단일 key 대신 다중 key 만 처리해주시면 될 거 같아요

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.

3 participants