Skip to content

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

Merged
TTRR1007 merged 9 commits into
developfrom
feature/#1496-move-profile-to-external-module
Jul 18, 2026
Merged

[Refactor] profile 외부 모듈로 분리 및 파일 오류 수정#1531
TTRR1007 merged 9 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

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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/{ProfileState.kt,ProfileSideEffect.kt,ProfileViewModel.kt,Constant.kt}, .../model/*, .../mapper/*
프로필 관련 타입과 매퍼를 feature.profile 패키지로 이동하고 ProfileStateshowLogoutDialog를 제거했습니다.
프로필 화면 및 UI 리소스
feature/profile/src/main/java/in/koreatech/koin/feature/profile/ProfileScreen.kt, .../component/ProfileCard.kt, feature/profile/src/main/res/*, koin/src/main/.../ProfileFragment.kt
프로필 전용 문자열·아이콘 리소스를 추가하고 화면의 로그인 이동, 알림 아이콘, 카드 렌더링 및 Fragment import를 갱신했습니다.
프로필 시간표 구성 변경
feature/profile/src/main/java/in/koreatech/koin/feature/profile/component/{ProfileTimetable.kt,ProfileTimetableDefaults.kt}
시간표 파생값 계산과 셀 패딩을 정리하고, 강의 렌더링 key를 강의 속성 조합으로 변경했습니다.

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

Possibly related PRs

Suggested labels: chore, ci:passed

Suggested reviewers: kongwoojin, jaeyoung290

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 프로필 기능을 home 내부에서 외부 모듈로 분리하고 오류를 정리한다는 핵심 변경을 잘 요약합니다.
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.
✨ Finishing Touches
🧪 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 ci:passed and removed ci:passed labels Jul 13, 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로 교체하여 디자인 스펙을 더 정확히 반영했습니다. 👍

@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 만 처리해주시면 될 거 같아요

@bcsd-b-bot bcsd-b-bot Bot removed the ci:passed label Jul 15, 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: 2

🤖 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/ProfileTimetable.kt`:
- Line 151: Update the key call in the timetable composition to add spaces after
each comma, matching the ktlint formatting style while preserving its existing
arguments.
- Line 151: Update the key in the ProfileTimetableLecture rendering block to use
lecture.id as the stable unique identifier, or include another field that
guarantees uniqueness alongside the existing values. Preserve the surrounding
timetable rendering behavior.
🪄 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: ce5e1bbc-9b7d-45fe-8101-2cb3095bf5cc

📥 Commits

Reviewing files that changed from the base of the PR and between a9ec158 and 1b60334.

📒 Files selected for processing (1)
  • feature/profile/src/main/java/in/koreatech/koin/feature/profile/component/ProfileTimetable.kt

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

val timeCellPadding = remember { PaddingValues(horizontal = 8.dp, vertical = 6.dp) }
val headerCellPadding = remember { PaddingValues(horizontal = 8.dp, vertical = 6.dp) }
val cellPadding = remember { 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.

[Info] ✅ remember 제거 — 올바른 결정

ProfileTimetableDefaults.START_HOUR / END_HOURconst val, daysobjectval (한 번만 초기화)이므로 remember 로 캐싱할 이유가 없습니다. 불필요한 remember 를 제거한 것이 정확합니다. cellPaddingPaddingValues 객체 할당이므로 remember 유지가 적절합니다.

Comment thread feature/profile/src/main/java/in/koreatech/koin/feature/profile/Constant.kt Outdated

@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/ProfileScreen.kt`:
- Around line 80-84: Update the onSettingClick callback in ProfileScreen so
non-logged-in users navigate to the login flow after logging the LOGIN_PROMPT
event, without calling onNavigateToSetting; invoke onNavigateToSetting only when
uiState.isLoggedIn is true.
🪄 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: e342ffda-02f2-46ed-aef7-5593294ae8b0

📥 Commits

Reviewing files that changed from the base of the PR and between 1b60334 and b37cf9c.

📒 Files selected for processing (4)
  • 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/component/ProfileTimetable.kt
  • koin/src/main/java/in/koreatech/koin/ui/newmain/fragment/ProfileFragment.kt
🚧 Files skipped from review as they are similar to previous changes (2)
  • feature/profile/src/main/java/in/koreatech/koin/feature/profile/Constant.kt
  • feature/profile/src/main/java/in/koreatech/koin/feature/profile/component/ProfileTimetable.kt

Comment thread feature/profile/src/main/java/in/koreatech/koin/feature/profile/ProfileScreen.kt Outdated
@sonarqubecloud

Copy link
Copy Markdown

@bcsd-b-bot bcsd-b-bot Bot added the ci:passed label Jul 18, 2026
@TTRR1007
TTRR1007 merged commit 530c4b7 into develop Jul 18, 2026
10 checks passed
@TTRR1007
TTRR1007 deleted the feature/#1496-move-profile-to-external-module branch July 18, 2026 14:00
@coderabbitai coderabbitai Bot mentioned this pull request Jul 18, 2026
10 tasks
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