Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
Expand All @@ -30,10 +32,13 @@ fun PotiDivider(
styleType: PotiDividerStyle,
modifier: Modifier = Modifier,
) {
val shapeModifier = if (styleType == PotiDividerStyle.SMALL) Modifier.clip(CircleShape) else Modifier

Box(
modifier = modifier
.fillMaxWidth()
.height(styleType.height)
.then(shapeModifier)
.background(styleType.color),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.poti.android.R
import com.poti.android.core.designsystem.theme.Gray800
import com.poti.android.core.designsystem.theme.PotiTheme

@Composable
fun PotiRating(
rating: String,
modifier: Modifier = Modifier,
iconTint: Color = PotiTheme.colors.gray800,
textColor: Color = PotiTheme.colors.gray800,
) {
Row(
modifier = modifier,
Expand All @@ -30,12 +32,12 @@ fun PotiRating(
imageVector = ImageVector.vectorResource(id = R.drawable.ic_star),
contentDescription = null,
modifier = Modifier.size(21.dp),
tint = Gray800,
tint = iconTint,
)
Text(
text = rating,
style = PotiTheme.typography.body14m,
color = Gray800,
color = textColor,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.poti.android.domain.model.user

data class UserProfile(
val userId: Long,
val email: String,
val nickname: String,
val profileImageUrl: String,
val ratingAvg: Double,
val activityMessage: String,
val joinedAt: String,
val hasFavoriteArtist: Boolean,
val recruitSummary: HistorySummary,
)

data class HistorySummary(
val total: Int,
val inProgress: Int,
val completed: Int,
)
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ fun PotiNavHost(
)
profileNavGraph(
paddingValues = paddingValues,
onPopBackStack = navigator.navController::popBackStack,
)
Comment on lines 42 to 45
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# profileNavGraph 함수 정의 검색
rg -nP --type=kt '\bfun\s+profileNavGraph\s*\(' -C3

Repository: team-poti/POTI-ANDROID

Length of output: 92


🏁 Script executed:

# PotiNavHost 파일의 전체 컨텍스트 확인
find . -name "PotiNavHost.kt" -type f

Repository: team-poti/POTI-ANDROID

Length of output: 135


🏁 Script executed:

# navigator와 navController 정의 확인
rg -nP --type=kt '\bnavigator\b|NavController' app/src/main/java/com/poti/android/presentation/main/ -C2

Repository: team-poti/POTI-ANDROID

Length of output: 92


🏁 Script executed:

# PotiNavHost.kt 파일 전체 확인
cat -n ./app/src/main/java/com/poti/android/presentation/main/PotiNavHost.kt

Repository: team-poti/POTI-ANDROID

Length of output: 2115


🏁 Script executed:

# profileNavGraph 함수 검색 (rg without type)
rg -nP 'fun\s+profileNavGraph\s*\(' -C3

Repository: team-poti/POTI-ANDROID

Length of output: 48


🏁 Script executed:

# NavGraph 확장함수들 검색
rg -nP 'fun.*NavGraphBuilder.*profileNavGraph|fun.*profileNavGraph' -C3

Repository: team-poti/POTI-ANDROID

Length of output: 890


🏁 Script executed:

# NavController의 popBackStack 시그니처 확인
rg -n 'fun popBackStack'

Repository: team-poti/POTI-ANDROID

Length of output: 48


🏁 Script executed:

# 혹시 확장함수로 오버라이드되는 경우 확인
rg -n 'fun.*popBackStack\s*\(\s*\)\s*:\s*Unit'

Repository: team-poti/POTI-ANDROID

Length of output: 48


🏁 Script executed:

# PotiNavigator 클래스 정의 확인
rg -n 'class PotiNavigator|interface PotiNavigator' -C5

Repository: team-poti/POTI-ANDROID

Length of output: 1325


🏁 Script executed:

# ProfileNavigation.kt 전체 파일 확인
cat -n app/src/main/java/com/poti/android/presentation/user/profile/navigation/ProfileNavigation.kt

Repository: team-poti/POTI-ANDROID

Length of output: 1290


🏁 Script executed:

# 혹시 popBackStack 오버로드나 확장함수 확인
rg -n 'fun.*NavController.*popBackStack|popBackStack\s*\(.*\)\s*:\s*Unit'

Repository: team-poti/POTI-ANDROID

Length of output: 48


🏁 Script executed:

# 현재 코드 부분 다시 확인 (라인 22-25 전후)
sed -n '20,30p' app/src/main/java/com/poti/android/presentation/user/profile/navigation/ProfileNavigation.kt

Repository: team-poti/POTI-ANDROID

Length of output: 353


🏁 Script executed:

# ProfileScreenRoute 확인
rg -n 'fun ProfileScreenRoute|composable.*ProfileScreenRoute' -C5

Repository: team-poti/POTI-ANDROID

Length of output: 1379


🏁 Script executed:

# 혹시 컴파일러가 SAM 변환을 하는지 확인하기 위해
# 프로젝트의 build.gradle 또는 gradle.properties 확인
cat build.gradle.kts 2>/dev/null || cat build.gradle 2>/dev/null | head -50

Repository: team-poti/POTI-ANDROID

Length of output: 473


🏁 Script executed:

# 다른 navGraph 호출들과 비교하여 onPopBackStack 패턴 확인
rg -n 'onPopBackStack\s*=' -C2

Repository: team-poti/POTI-ANDROID

Length of output: 8484


🏁 Script executed:

# 다른 navGraph 호출들의 onPopBackStack 처리 확인
rg -n 'onPopBackStack\s*=\s*.*::popBackStack' -C1

Repository: team-poti/POTI-ANDROID

Length of output: 2264


🏁 Script executed:

# 혹시 타입 어댑터 또는 확장함수가 있는지 확인
rg -n 'fun.*Boolean.*Unit|popBackStack.*Unit'

Repository: team-poti/POTI-ANDROID

Length of output: 48


🏁 Script executed:

# NavController 확장함수 확인
rg -n 'fun NavController' app/src/main/java/com/poti/android/presentation/main/

Repository: team-poti/POTI-ANDROID

Length of output: 48


🏁 Script executed:

# NavController 타입 확인 및 popBackStack 확인
rg -n 'class NavController|interface NavController|typealias.*NavController'

Repository: team-poti/POTI-ANDROID

Length of output: 48


🏁 Script executed:

# OnboardingNavigation과 PartyDetailNavigation의 함수 시그니처 확인
rg -n 'fun.*OnboardingGuideRoute|fun.*OnboardingNicknameRoute|fun.*OnboardingArtistRoute|fun.*PartyDetailRoute' -A2 | head -40

Repository: team-poti/POTI-ANDROID

Length of output: 1518


🏁 Script executed:

# 혹시 build 오류가 있는지 확인
find . -name "*.log" -o -name "build_errors*" 2>/dev/null | head -5

Repository: team-poti/POTI-ANDROID

Length of output: 48


🏁 Script executed:

# OnboardingNavigation.kt의 OnboardingGuideRoute 호출 부분 전체 확인
sed -n '50,60p' app/src/main/java/com/poti/android/presentation/onboarding/navigation/OnboardingNavigation.kt

Repository: team-poti/POTI-ANDROID

Length of output: 575


🏁 Script executed:

# Kotlin 라이브러리 버전 확인
cat app/build.gradle.kts | grep -A5 -B5 'kotlin\|compose'

Repository: team-poti/POTI-ANDROID

Length of output: 2409


🏁 Script executed:

# NavHostController와 NavController의 관계 확인
rg -n 'NavHostController|typealias.*NavHostController'

Repository: team-poti/POTI-ANDROID

Length of output: 434


🏁 Script executed:

# 프로젝트에서 정의된 popBackStack 확장함수 확인
rg -n 'fun.*popBackStack\s*\(' -C2

Repository: team-poti/POTI-ANDROID

Length of output: 48


🏁 Script executed:

# libs.versions.toml 또는 libs.gradle 확인하여 navigation 버전 확인
find . -name "libs.versions.toml" -o -name "versions.gradle" 2>/dev/null | xargs cat 2>/dev/null | grep -i navigation

Repository: team-poti/POTI-ANDROID

Length of output: 389


명시적인 람다로 래핑하여 타입 안전성을 명확히 하세요.
navController::popBackStackBoolean을 반환하지만, onPopBackStack() -> Unit 타입입니다. 반환값을 명시적으로 무시하는 람다로 래핑하면 의도가 더 분명하고 타입 일관성도 개선됩니다.

🔧 제안 변경
-            onPopBackStack = navigator.navController::popBackStack,
+            onPopBackStack = { navigator.navController.popBackStack() },
🤖 Prompt for AI Agents
In `@app/src/main/java/com/poti/android/presentation/main/PotiNavHost.kt` around
lines 42 - 45, The call to profileNavGraph passes
navigator.navController::popBackStack (which returns Boolean) into
onPopBackStack (type () -> Unit); wrap the method reference in an explicit
lambda that invokes popBackStack and discards its Boolean result so the types
align and intent is clear—i.e., replace the method reference with a lambda that
calls navigator.navController.popBackStack() and does not return its value when
invoking profileNavGraph's onPopBackStack parameter.

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
package com.poti.android.presentation.user.component

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.poti.android.R
import com.poti.android.core.common.extension.noRippleClickable
import com.poti.android.core.designsystem.theme.PotiTheme

@Composable
fun BadgeButton(
bias: String,
onClick: () -> Unit,
modifier: Modifier = Modifier,
) {
Row(
modifier = modifier
.heightIn(min = 40.dp)
.clip(CircleShape)
.background(PotiTheme.colors.poti200)
.noRippleClickable(onClick)
.padding(vertical = 8.dp)
.padding(start = 16.dp, end = 8.dp),
horizontalArrangement = Arrangement.Center,
verticalAlignment = Alignment.CenterVertically,
) {
Text(
text = bias,
color = PotiTheme.colors.poti800,
style = PotiTheme.typography.body14m,
)

Icon(
imageVector = ImageVector.vectorResource(R.drawable.ic_arrow_right_sm),
contentDescription = null,
modifier = Modifier.size(20.dp),
tint = PotiTheme.colors.poti800,
)
}
}

@Preview(showBackground = true)
@Composable
private fun BadgeButtonPreview() {
PotiTheme {
Column(
modifier = Modifier.padding(16.dp),
verticalArrangement = Arrangement.spacedBy(12.dp),
) {
BadgeButton(
bias = "나의 최애 선택하기",
onClick = {},
modifier = Modifier,
)

BadgeButton(
bias = "아이브",
onClick = {},
modifier = Modifier,
)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
package com.poti.android.presentation.user.component

import androidx.compose.foundation.background
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.interaction.collectIsPressedAsState
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text
import androidx.compose.material3.VerticalDivider
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.poti.android.R
import com.poti.android.core.common.extension.noRippleClickable
import com.poti.android.core.designsystem.theme.PotiTheme
import com.poti.android.domain.model.user.HistorySummary

enum class HistorySummaryType {
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.

p3: 이 친구들은 어디 쓰여용?

Copy link
Copy Markdown
Contributor Author

@sonyerim sonyerim Jan 14, 2026

Choose a reason for hiding this comment

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

음 서버 연결할 때 쓰일까봐 만들어뒀는데 지금은 안 쓰이니까 일단 지울게용

ALL,
IN_PROGRESS,
FINISHED,
}

@Composable
fun HistorySummaryCard(
title: String,
summary: HistorySummary,
onItemClick: (HistorySummaryType) -> Unit,
modifier: Modifier = Modifier,
) {
Column(
modifier = modifier,
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.Start,
) {
Text(
text = title,
color = PotiTheme.colors.black,
style = PotiTheme.typography.body16sb,
)

Spacer(Modifier.height(12.dp))

Row(
modifier = Modifier
.fillMaxWidth()
.clip(RoundedCornerShape(12.dp))
.background(PotiTheme.colors.gray100)
.padding(8.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp),
verticalAlignment = Alignment.CenterVertically,
) {
HistoryItem(
title = stringResource(R.string.user_history_all),
count = summary.total,
onClick = { onItemClick(HistorySummaryType.ALL) },
modifier = Modifier.weight(1f),
)

VerticalDivider(
modifier = Modifier
.height(56.dp)
.clip(CircleShape),
thickness = 1.dp,
color = PotiTheme.colors.gray300,
)

HistoryItem(
title = stringResource(R.string.user_history_ongoing),
count = summary.inProgress,
onClick = { onItemClick(HistorySummaryType.IN_PROGRESS) },
modifier = Modifier.weight(1f),
)

VerticalDivider(
modifier = Modifier
.height(56.dp)
.clip(CircleShape),
thickness = 1.dp,
color = PotiTheme.colors.gray300,
)

HistoryItem(
title = stringResource(R.string.user_history_ended),
count = summary.completed,
onClick = { onItemClick(HistorySummaryType.FINISHED) },
modifier = Modifier.weight(1f),
)
}
}
}

@Composable
private fun HistoryItem(
title: String,
count: Int,
onClick: () -> Unit,
modifier: Modifier = Modifier,
) {
val interactionSource = remember { MutableInteractionSource() }
val isPressed by interactionSource.collectIsPressedAsState()
val backgroundColor = if (isPressed) PotiTheme.colors.gray300 else PotiTheme.colors.gray100

Column(
modifier = modifier
.widthIn(92.dp)
.clip(RoundedCornerShape(12.dp))
.background(backgroundColor)
.noRippleClickable(
interactionSource = interactionSource,
onClick = onClick,
)
.padding(vertical = 18.5.dp),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(8.dp),
) {
Text(
text = count.toString(),
color = PotiTheme.colors.poti600,
style = PotiTheme.typography.title18sb,
)
Text(
text = title,
color = PotiTheme.colors.gray800,
style = PotiTheme.typography.caption12m,
)
}
}

@Preview(showBackground = true)
@Composable
private fun HistorySummaryCardPreview() {
val summary = HistorySummary(
total = 7,
inProgress = 2,
completed = 5,
)

PotiTheme {
Column(
modifier = Modifier.padding(16.dp),
verticalArrangement = Arrangement.spacedBy(12.dp),
) {
HistorySummaryCard(
title = "참여 내역",
summary = summary,
onItemClick = {},
modifier = Modifier.width(328.dp),
)

HistorySummaryCard(
title = "참여 내역",
summary = summary,
onItemClick = {},
)
}
}
}
Loading