Skip to content

Conversation

@mark77234
Copy link
Collaborator

@mark77234 mark77234 commented Jan 8, 2026

작업내용

  • ai 요약 api 연동 및 추가
  • 필수정보입력 선호, 비선호 필드 직업 추가
  • 매칭 조회 실패 시 토스트 제거

추후 업데이트 필요

  • 로그인 시 성별 업데이트
  • ai 요약 섹션 UI 업데이트
  • ai 요약 성별에 따라 따로 처리
Screenshot_20260108_155234

Copilot AI review requested due to automatic review settings January 8, 2026 06:57
@mark77234 mark77234 linked an issue Jan 8, 2026 that may be closed by this pull request
1 task
@mark77234 mark77234 added the feat 기능 추가 작업 label Jan 8, 2026
@mark77234 mark77234 self-assigned this Jan 8, 2026
@mark77234 mark77234 merged commit 611f5b5 into dev Jan 8, 2026
1 check failed
@mark77234 mark77234 deleted the feat/68 branch January 8, 2026 06:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds AI summary functionality to display user profile summaries in Korean and Japanese, expands job options in the required info form, and implements gender-based control for matching selection. The changes include API integration, UI updates, and data persistence improvements.

Key changes:

  • AI summary API integration with bilingual (Korean/Japanese) display in the waiting screen
  • Expanded job options from 5 to 24 choices in the required info form
  • Gender storage in DataStore and gender-based matching selection controls
  • Removed toast notifications when matching queries fail

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
AiSummaryResponse.kt New data model for AI summary API response with Korean and Japanese text fields
MatchingService.kt Added AI summary endpoint and renamed matching selection method to gender-specific name
DataStoreManager.kt Added gender storage and retrieval functionality
RequiredInfoMapper.kt Expanded job mapping from 5 to 24 job types including healthcare, education, and public service roles
Step5Content.kt Updated UI job options list to match expanded mapper entries
RequiredInfoViewModel.kt Added gender persistence when submitting required info form
HomeViewModel.kt Added AI summary fetching logic and refactored state updates to use update pattern
HomeScreen.kt Added AI summary display in waiting screen with loading and error states
MainRouteScreen.kt Added gender-based control flow for enabling/disabling matching selection
Localization.kt Added Japanese translations for AI summary UI text

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +62 to +78
_uiState.update {
it.copy(
isLoading = false,
matchings = emptyList(),
selectedMatching = null,
isWaiting = true
)
}
} else {
_uiState.value = HomeUiState(matchings = data)
_uiState.update {
it.copy(
isLoading = false,
matchings = data,
selectedMatching = null,
isWaiting = false
)
}
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The state updates in fetchFemaleMatchings don't preserve the AI summary fields (aiSummaryKo, aiSummaryJa, isAiSummaryLoading, aiSummaryError). When matchings data is updated, these fields will be reset to their default null/false values because the copy operation only specifies isLoading, matchings, selectedMatching, and isWaiting. This will cause the AI summary to disappear if matchings are refreshed after the AI summary has loaded.

Copilot uses AI. Check for mistakes.
Comment on lines +81 to +88
_uiState.update {
it.copy(
isLoading = false,
matchings = emptyList(),
selectedMatching = null,
isWaiting = true
)
}
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The state updates don't preserve the AI summary fields (aiSummaryKo, aiSummaryJa, isAiSummaryLoading, aiSummaryError). When matchings fail to load, these fields will be reset to their default values, causing the AI summary to disappear.

Copilot uses AI. Check for mistakes.
isLoading = false,
matchings = emptyList(),
selectedMatching = null,
isWaiting = true
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The state updates don't preserve the AI summary fields (aiSummaryKo, aiSummaryJa, isAiSummaryLoading, aiSummaryError). When a matching is selected, these fields will be reset to their default values, causing the AI summary to disappear from the waiting screen if the user returns to it.

Suggested change
isWaiting = true
isWaiting = true,
aiSummaryKo = it.aiSummaryKo,
aiSummaryJa = it.aiSummaryJa,
isAiSummaryLoading = it.isAiSummaryLoading,
aiSummaryError = it.aiSummaryError

Copilot uses AI. Check for mistakes.

@GET("members/status")
suspend fun getMyStatus(): MyStatusResponse
fun femaleSelectMatching(@Path("matchingId") matchingId: Long): Call<Void>
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

Function name 'femaleSelectMatching' uses gender-specific naming which may not scale well if male users need similar functionality in the future. Consider a more generic name like 'selectMatching' or 'confirmMatching' that doesn't encode gender into the API method name.

Suggested change
fun femaleSelectMatching(@Path("matchingId") matchingId: Long): Call<Void>
fun selectMatching(@Path("matchingId") matchingId: Long): Call<Void>

Copilot uses AI. Check for mistakes.
Comment on lines 148 to 175
fun job(koreanLabel: String): String? = when (koreanLabel) {
"의사" -> "DOCTOR"
"약사" -> "PHARMACIST"
"간호사" -> "NURSE"
"교사" -> "TEACHER"
"교수" -> "PROFESSOR"
"변호사" -> "LAWYER"
"회계사" -> "ACCOUNTANT"
"엔지니어" -> "ENGINEER"
"개발자" -> "DEVELOPER"
"디자이너" -> "DESIGNER"
"공무원" -> "CIVIL_SERVANT"
"경찰" -> "POLICE"
"소방관" -> "FIREFIGHTER"
"군인" -> "MILITARY"
"사업가" -> "ENTREPRENEUR"
"경영인" -> "CEO"
"금융인" -> "FINANCE"
"연구원" -> "RESEARCHER"
"예술가" -> "ARTIST"
"운동선수" -> "ATHLETE"
"프리랜서" -> "FREELANCER"
"학생" -> "STUDENT"
"무직" -> "UNEMPLOYED"
"상관없음" -> "ANY"
"상관 없음" -> "ANY"
"기타" -> "OTHER"
else -> null
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The mapping for "상관없음" and "상관 없음" (with different spacing) both map to "ANY". This duplication could be avoided by normalizing whitespace in the input string before checking, which would make the mapping more maintainable and handle other potential spacing variations.

Suggested change
fun job(koreanLabel: String): String? = when (koreanLabel) {
"의사" -> "DOCTOR"
"약사" -> "PHARMACIST"
"간호사" -> "NURSE"
"교사" -> "TEACHER"
"교수" -> "PROFESSOR"
"변호사" -> "LAWYER"
"회계사" -> "ACCOUNTANT"
"엔지니어" -> "ENGINEER"
"개발자" -> "DEVELOPER"
"디자이너" -> "DESIGNER"
"공무원" -> "CIVIL_SERVANT"
"경찰" -> "POLICE"
"소방관" -> "FIREFIGHTER"
"군인" -> "MILITARY"
"사업가" -> "ENTREPRENEUR"
"경영인" -> "CEO"
"금융인" -> "FINANCE"
"연구원" -> "RESEARCHER"
"예술가" -> "ARTIST"
"운동선수" -> "ATHLETE"
"프리랜서" -> "FREELANCER"
"학생" -> "STUDENT"
"무직" -> "UNEMPLOYED"
"상관없음" -> "ANY"
"상관 없음" -> "ANY"
"기타" -> "OTHER"
else -> null
fun job(koreanLabel: String): String? {
val normalized = koreanLabel.replace("\\s+".toRegex(), "")
return when (normalized) {
"의사" -> "DOCTOR"
"약사" -> "PHARMACIST"
"간호사" -> "NURSE"
"교사" -> "TEACHER"
"교수" -> "PROFESSOR"
"변호사" -> "LAWYER"
"회계사" -> "ACCOUNTANT"
"엔지니어" -> "ENGINEER"
"개발자" -> "DEVELOPER"
"디자이너" -> "DESIGNER"
"공무원" -> "CIVIL_SERVANT"
"경찰" -> "POLICE"
"소방관" -> "FIREFIGHTER"
"군인" -> "MILITARY"
"사업가" -> "ENTREPRENEUR"
"경영인" -> "CEO"
"금융인" -> "FINANCE"
"연구원" -> "RESEARCHER"
"예술가" -> "ARTIST"
"운동선수" -> "ATHLETE"
"프리랜서" -> "FREELANCER"
"학생" -> "STUDENT"
"무직" -> "UNEMPLOYED"
"상관없음" -> "ANY"
"기타" -> "OTHER"
else -> null
}

Copilot uses AI. Check for mistakes.
Comment on lines +65 to +67
if (canSelectMatching) {
onConfirm(selectedMatching.matchingId)
}
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The canSelectMatching check is redundant here. The button is already disabled when canSelectMatching is false (via the 'enabled' parameter on line 369), so this conditional check will never prevent the action from executing - disabled buttons don't trigger onClick. This extra check adds unnecessary complexity.

Suggested change
if (canSelectMatching) {
onConfirm(selectedMatching.matchingId)
}
onConfirm(selectedMatching.matchingId)

Copilot uses AI. Check for mistakes.
aiSummaryKo = null,
aiSummaryJa = null,
isAiSummaryLoading = false,
aiSummaryError = "AI 요약본을 불러오지 못했습니다."
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

Error message is hardcoded in Korean and won't be localized for Japanese users. The error message should use the AppLocalizer system like other UI text, especially since this is displayed in the WaitingContent which is visible to all users.

Copilot uses AI. Check for mistakes.
aiSummaryKo = null,
aiSummaryJa = null,
isAiSummaryLoading = false,
aiSummaryError = "AI 요약본을 불러오지 못했습니다."
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

Error message is hardcoded in Korean and won't be localized for Japanese users. The error message should use the AppLocalizer system like other UI text, especially since this is displayed in the WaitingContent which is visible to all users.

Copilot uses AI. Check for mistakes.
val memberId: Long,
@SerializedName(value = "name")
val name: String,
@SerializedName(value = "aiSummaryKo", alternate = ["ai_summary_ko", "aiSummary", "ai_summary"])
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The SerializedName annotation includes multiple alternate field names for aiSummaryKo (including "aiSummary" and "ai_summary"), which suggests uncertainty about the API contract. This can lead to maintenance issues if the API changes or if different endpoints return different field names. Consider clarifying the API specification to use a consistent field name.

Suggested change
@SerializedName(value = "aiSummaryKo", alternate = ["ai_summary_ko", "aiSummary", "ai_summary"])
@SerializedName(value = "aiSummaryKo", alternate = ["ai_summary_ko"])

Copilot uses AI. Check for mistakes.
Comment on lines +134 to +137
text = "한국어",
type = CustomTextType.label,
color = CustomColor.gray400
)
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The text "한국어" used as a label for the Korean language summary section lacks a localization entry. When the app is in Japanese mode, this label should display "韓国語" (Korean language), but will remain as "한국어" instead. Add a localization mapping for this context.

Copilot uses AI. Check for mistakes.
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.

[feat] 홈 매칭중 화면

2 participants