Skip to content

Conversation

@dmp100
Copy link
Contributor

@dmp100 dmp100 commented Nov 13, 2025

ISSUE

❗ WORK DESCRIPTIONAdd commentMore actions

  • HTTP 500은 진짜 개노답이라 나중에리팩해야함,,

📸 SCREENSHOT

시연영상으로 단톡방에오ㅓㄹ리겠습니다

📢 TO REVIEWERS

  • 손댈곳이 많아보여요,,

Summary by CodeRabbit

  • New Features

    • Enhanced onboarding flow with academic status selection (Enrolled, Graduated, Expected Graduation, Completed, Leave).
    • Integrated career editing functionality directly into the onboarding process with navigation support.
  • Chores

    • Updated application icon resources.
  • Bug Fixes

    • Resolved link display issue in onboarding screen.

@dmp100 dmp100 added fix 🛠️ 버그수정 규현 🐻 규현 전용 라벨 labels Nov 13, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 13, 2025

Walkthrough

This PR refactors the onboarding flow by replacing EmploymentStatus with AcademicStatus, integrates career edit navigation into the onboarding screen, updates CareerDto ID type from Long to Int, makes MentorItemDto's academicStatus nullable, and updates app icon resources from ic_launcher to ic_main with new drawable assets.

Changes

Cohort / File(s) Summary
App Icon Updates
app/src/main/AndroidManifest.xml, app/src/main/res/drawable/ic_main_background.xml, app/src/main/res/mipmap-anydpi-v26/ic_main.xml, app/src/main/res/mipmap-anydpi-v26/ic_main_round.xml
Updated icon references in manifest from ic_launcher to ic_main; added new adaptive icon XML definitions and green grid background drawable.
Academic Status Replacement
app/src/main/java/com/hsLink/hslink/presentation/onboarding/model/OnboardingState.kt, app/src/main/java/com/hsLink/hslink/presentation/onboarding/component/screen/EmploymentStatusScreen.kt, app/src/main/java/com/hsLink/hslink/presentation/onboarding/viewmodel/OnboardingViewModel.kt
Replaced EmploymentStatus enum with AcademicStatus (values: ENROLLED, GRADUATED, EXPECTED_GRADUATION, COMPLETED, LEAVE); updated corresponding state field and handler methods.
Onboarding DTO & Data Layer
app/src/main/java/com/hsLink/hslink/data/dto/request/onboarding/OnboardingRequest.kt, app/src/main/java/com/hsLink/hslink/data/dto/response/CareerResponse.kt, app/src/main/java/com/hsLink/hslink/data/dto/response/search/SearchResponseDto.kt, app/src/main/java/com/hsLink/hslink/data/repositoryimpl/search/SearchRepositoryImpl.kt
Added academicStatus field to OnboardingRequest; changed CareerDto id from Long to Int; made MentorItemDto academicStatus nullable with default null; updated repository mapping to use null coalescing for academicStatus.
Onboarding Navigation & Routing
app/src/main/java/com/hsLink/hslink/presentation/onboarding/navigation/OnboardingNavigation.kt, app/src/main/java/com/hsLink/hslink/presentation/mypage/navigation/career/CareerEditNavigation.kt, app/src/main/java/com/hsLink/hslink/presentation/main/MainActivity.kt
Added navController parameter to onboardingNavGraph and MainActivity's authNavGraph; wired new careerNavGraph; updated navigateToCareerEdit and CareerEdit route to use Int instead of Long for careerId.
Onboarding UI Screens
app/src/main/java/com/hsLink/hslink/presentation/onboarding/OnboardingScreen.kt, app/src/main/java/com/hsLink/hslink/presentation/onboarding/component/screen/CareerScreen.kt, app/src/main/java/com/hsLink/hslink/presentation/onboarding/component/screen/LinkScreen.kt
Added navController to OnboardingRoute; implemented safe career list conversion with error logging; updated CareerScreen to accept CareerDto list with onCareerClick callback; commented out link items rendering.

Sequence Diagram(s)

sequenceDiagram
    participant OnboardingScreen
    participant CareerScreen
    participant NavController
    participant CareerEditScreen

    OnboardingScreen->>OnboardingScreen: Receive navController
    OnboardingScreen->>CareerScreen: Pass careerList (CareerDto[])
    CareerScreen->>CareerScreen: Safe conversion with try-catch
    
    rect rgb(200, 220, 255)
    Note over CareerScreen,NavController: Career Selection Flow (NEW)
    CareerScreen->>OnboardingScreen: onCareerClick(CareerDto)
    OnboardingScreen->>NavController: navigateToCareerEdit(careerId: Int)
    NavController->>CareerEditScreen: Route to edit screen
    end
    
    rect rgb(240, 240, 240)
    Note over OnboardingScreen: State Updates
    OnboardingScreen->>OnboardingScreen: updateAcademicStatus(AcademicStatus)
    OnboardingScreen->>OnboardingScreen: Store academicStatus in OnboardingRequest
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Type conversions requiring validation: CareerDto id change from Long to Int across CareerResponse, navigation parameters, and route definitions; verify all call sites correctly handle the new Int type
  • Null handling: MentorItemDto academicStatus nullability and null-coalescing default ("") in SearchRepositoryImpl mapping; confirm handling is consistent across related code paths
  • Safe career list conversion: OnboardingScreen's try-catch with error logging for CareerDto conversion; verify error recovery and UI behavior
  • Navigation wiring: New careerNavGraph integration in MainActivity and navController threading through onboardingNavGraph and OnboardingRoute; ensure routing chain is complete and parameters propagate correctly
  • State management: Replacement of EmploymentStatus with AcademicStatus throughout viewmodel, screens, and DTO layers; confirm no missed references to old enum

Possibly related PRs

  • [feat/#12] my page UI #19: Introduces CareerCard component and career-related UI that this PR integrates into the onboarding flow with navigation wiring and type updates.
  • [feat/#16] Onboarding UI #17: Adds initial onboarding UI with EmploymentStatus that this PR refactors to AcademicStatus with expanded statuses.
  • [feat/#28] mypage api #35: Defines CareerDto and career APIs using Long IDs; this PR changes those IDs to Int, creating a direct type compatibility concern.

Poem

🐰 From employment to academic, the status grows,
With careers now editable as onboarding flows,
Icons gleam green on every device,
Career edits navigate oh so nice,
Safe conversions and null coalescing show,
The onboarding paths in their proper glow! ✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title contains offensive language and does not meaningfully describe the changeset, making it inappropriate and unclear. Replace with a clear, professional title such as 'Refactor onboarding flow with academic status and career navigation' to accurately reflect the major changes.
Docstring Coverage ⚠️ Warning Docstring coverage is 5.88% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive The description is vague and incomplete, mentioning HTTP 500 errors needing refactoring and referencing a video demo without proper technical details. Provide detailed technical description of changes: explain the EmploymentStatus to AcademicStatus rename, career editing integration, icon updates, and API modifications with rationale.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR addresses all major objectives from issue #38: updated app icon and resources, refactored onboarding UI with academicStatus, integrated career edit functionality, and modified relevant API/DTO structures.
Out of Scope Changes check ✅ Passed All changes align with issue #38 objectives: icon updates, onboarding UI refactoring, career edit feature integration, academicStatus implementation, and related DTO/API modifications are within scope.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/#38-FixFukingShjit

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 and usage tips.

@dmp100 dmp100 merged commit 810e198 into develop Nov 13, 2025
2 of 3 checks passed
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
app/src/main/java/com/hsLink/hslink/presentation/onboarding/component/screen/LinkScreen.kt (1)

115-139: Dead code: LinkItem composable is now unused.

Since the LazyColumn that calls LinkItem (line 68) has been commented out, this entire composable is now dead code.

If the link display functionality will be re-enabled (as it should be), keep this composable. Otherwise, remove it to avoid maintaining unused code.

app/src/main/java/com/hsLink/hslink/presentation/onboarding/viewmodel/OnboardingViewModel.kt (1)

235-256: Avoid academicStatus!! to prevent potential crashes

Dereferencing currentState.academicStatus!! will crash the app if, for any reason, the user reaches this step without having a status selected (or future changes alter the flow). Safer to guard and fail gracefully instead of relying on a hard invariant.

You can extract academicStatus with a null check before building the request:

     fun submitOnboarding() {
         viewModelScope.launch {
             val currentState = _state.value
+            val academicStatus = currentState.academicStatus ?: run {
+                // Option A: expose an error in state and bail out
+                _state.update { it.copy(apiError = "학적 상태가 선택되지 않았습니다.") }
+                return@launch
+            }
             val request = OnboardingRequest(
                 name = currentState.name, major = currentState.major, studentNumber = currentState.studentId,
                 jobSeeking = currentState.isJobSeeking ?: false, mentor = currentState.wantsMentorship ?: false,
-                email = currentState.email,
-                academicStatus = currentState.academicStatus!!
+                email = currentState.email,
+                academicStatus = academicStatus
             )

Adjust the error handling message / mechanism to match your UX pattern.

🧹 Nitpick comments (6)
app/src/main/java/com/hsLink/hslink/data/repositoryimpl/search/SearchRepositoryImpl.kt (1)

36-36: Reconsider defaulting null to empty string.

While the null-coalescing operator handles the newly nullable academicStatus field, defaulting to an empty string might obscure the fact that the data is actually missing. Consider:

  1. Whether MentorEntity.academicStatus could also be nullable to preserve this semantic distinction
  2. If empty string has a special meaning (e.g., "status unknown") vs. a legitimate empty value from the backend
  3. Consistency with how other optional fields are handled in entity mappings

Verify the target entity definition and consider keeping the nullability:

#!/bin/bash
# Check MentorEntity definition to see if academicStatus can be nullable
echo "=== Checking MentorEntity definition ==="
ast-grep --pattern $'data class MentorEntity(
  $$$
)'

echo -e "\n=== Checking how MentorEntity.academicStatus is used in UI ==="
rg -n "mentor\.academicStatus" --type=kt -C 3

If MentorEntity.academicStatus can be nullable, consider this alternative:

-                            academicStatus = dto.academicStatus ?: ""
+                            academicStatus = dto.academicStatus
app/src/main/java/com/hsLink/hslink/data/dto/request/onboarding/OnboardingRequest.kt (1)

20-22: Add trailing comma for consistency.

The email field is missing a trailing comma, which is recommended in Kotlin for easier future additions and cleaner diffs.

Apply this diff:

     @SerialName("email")
-    val email : String,
+    val email : String,
     @SerialName("academicStatus")
     val academicStatus: AcademicStatus
app/src/main/java/com/hsLink/hslink/presentation/onboarding/component/screen/CareerScreen.kt (1)

29-30: Remove commented code.

The commented line should be removed to keep the codebase clean.

Apply this diff:

-    //careerList: List<CareerItemEntity>,
     careerList: List<CareerDto>,
app/src/main/java/com/hsLink/hslink/presentation/onboarding/component/screen/EmploymentStatusScreen.kt (1)

37-42: Consider updating the title text for clarity.

The title asks "현재 재직 중이신가요?" (Are you currently employed?), but the field now uses AcademicStatus which includes academic statuses like "재학 중" (enrolled), "졸업" (graduated), "휴학" (leave), etc. Consider updating the title to better reflect academic status rather than employment status.

Example:

title = buildAnnotatedString {
    append("현재 학적 상태를 알려주세요 ")
    withStyle(style = SpanStyle(color = HsLinkTheme.colors.Red500)) {
        append("*")
    }
}
app/src/main/java/com/hsLink/hslink/presentation/onboarding/viewmodel/OnboardingViewModel.kt (1)

224-227: New updateAcademicStatus looks good; consider cleaning up commented code

The new updateAcademicStatus correctly updates academicStatus in state and replaces the old employment status path. The commented-out updateEmploymentStatus is now dead code and can be removed to reduce noise and avoid confusion about which path is active.

-    //fun updateEmploymentStatus(status: EmploymentStatus) { _state.update { it.copy(employmentStatus = status) } }
-    fun updateAcademicStatus(status: AcademicStatus) {
-        _state.update { it.copy(academicStatus = status) } // ← employmentStatus → academicStatus
-    }
+    fun updateAcademicStatus(status: AcademicStatus) {
+        _state.update { it.copy(academicStatus = status) }
+    }
app/src/main/java/com/hsLink/hslink/presentation/onboarding/OnboardingScreen.kt (1)

106-137: Career list mapping + edit navigation mostly solid; consider refining error handling

The new safeCareerList mapping to CareerDto and the onCareerClick navigation via navController.navigateToCareerEdit(career.id) correctly align with the updated career edit API (Int careerId) and CareerScreen’s onCareerClick contract.

The broad try { state.careerList.map { ... } } catch (e: Exception) that falls back to emptyList() can completely hide partially valid data if a single item is problematic, which may make debugging harder and silently degrade UX.

You might prefer a more targeted, item‑level safeguard so one bad item doesn’t drop the entire list, for example:

-            val safeCareerList = try {
-                state.careerList.map { career ->
-                    CareerDto(
-                        id = career.id,
-                        companyName = career.companyName,
-                        position = career.position,
-                        jobType = career.jobType,
-                        employed = career.employed,
-                        startYm = career.startYm,
-                        endYm = career.endYm
-                    )
-                }
-            } catch (e: Exception) {
-                Log.e("OnboardingRoute", "타입 변환 실패", e)
-                emptyList()
-            }
+            val safeCareerList = state.careerList.mapNotNull { career ->
+                try {
+                    CareerDto(
+                        id = career.id,
+                        companyName = career.companyName,
+                        position = career.position,
+                        jobType = career.jobType,
+                        employed = career.employed,
+                        startYm = career.startYm,
+                        endYm = career.endYm
+                    )
+                } catch (e: Exception) {
+                    Log.e("OnboardingRoute", "타입 변환 실패: $career", e)
+                    null
+                }
+            }

This keeps valid entries visible while still logging and skipping any that fail conversion.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between af154fe and f65add3.

⛔ Files ignored due to path filters (1)
  • app/src/main/ic_main-playstore.png is excluded by !**/*.png
📒 Files selected for processing (17)
  • app/src/main/AndroidManifest.xml (1 hunks)
  • app/src/main/java/com/hsLink/hslink/data/dto/request/onboarding/OnboardingRequest.kt (2 hunks)
  • app/src/main/java/com/hsLink/hslink/data/dto/response/CareerResponse.kt (1 hunks)
  • app/src/main/java/com/hsLink/hslink/data/dto/response/search/SearchResponseDto.kt (1 hunks)
  • app/src/main/java/com/hsLink/hslink/data/repositoryimpl/search/SearchRepositoryImpl.kt (1 hunks)
  • app/src/main/java/com/hsLink/hslink/presentation/main/MainActivity.kt (2 hunks)
  • app/src/main/java/com/hsLink/hslink/presentation/mypage/navigation/career/CareerEditNavigation.kt (2 hunks)
  • app/src/main/java/com/hsLink/hslink/presentation/onboarding/OnboardingScreen.kt (4 hunks)
  • app/src/main/java/com/hsLink/hslink/presentation/onboarding/component/screen/CareerScreen.kt (3 hunks)
  • app/src/main/java/com/hsLink/hslink/presentation/onboarding/component/screen/EmploymentStatusScreen.kt (3 hunks)
  • app/src/main/java/com/hsLink/hslink/presentation/onboarding/component/screen/LinkScreen.kt (1 hunks)
  • app/src/main/java/com/hsLink/hslink/presentation/onboarding/model/OnboardingState.kt (2 hunks)
  • app/src/main/java/com/hsLink/hslink/presentation/onboarding/navigation/OnboardingNavigation.kt (1 hunks)
  • app/src/main/java/com/hsLink/hslink/presentation/onboarding/viewmodel/OnboardingViewModel.kt (5 hunks)
  • app/src/main/res/drawable/ic_main_background.xml (1 hunks)
  • app/src/main/res/mipmap-anydpi-v26/ic_main.xml (1 hunks)
  • app/src/main/res/mipmap-anydpi-v26/ic_main_round.xml (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (4)
app/src/main/java/com/hsLink/hslink/presentation/mypage/navigation/career/CareerEditNavigation.kt (1)
app/src/main/java/com/hsLink/hslink/presentation/mypage/screen/career/CareerEditScreen.kt (1)
  • CareerEditRoute (56-93)
app/src/main/java/com/hsLink/hslink/presentation/main/MainActivity.kt (1)
app/src/main/java/com/hsLink/hslink/presentation/mypage/navigation/career/CareerEditNavigation.kt (1)
  • careerNavGraph (17-32)
app/src/main/java/com/hsLink/hslink/presentation/onboarding/navigation/OnboardingNavigation.kt (1)
app/src/main/java/com/hsLink/hslink/presentation/onboarding/OnboardingScreen.kt (1)
  • OnboardingRoute (45-224)
app/src/main/java/com/hsLink/hslink/presentation/onboarding/OnboardingScreen.kt (1)
app/src/main/java/com/hsLink/hslink/presentation/onboarding/component/screen/CareerScreen.kt (1)
  • CareerScreen (26-134)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-and-test
🔇 Additional comments (14)
app/src/main/res/drawable/ic_main_background.xml (1)

1-74: Well-formed adaptive icon background drawable.

The vector drawable is properly structured with valid SVG path syntax, appropriate use of opacity (0x33 alpha on white strokes), and clean geometric design. The green background and subtle grid pattern align with modern Material Design principles.

app/src/main/res/mipmap-anydpi-v26/ic_main.xml (1)

1-5: Adaptive icon structure is correct.

The XML properly defines an adaptive icon for API 26+. The background and foreground references follow Android conventions. Depends on verification that ic_main_foreground resource exists (flagged in companion review comment for ic_main_round.xml).

app/src/main/res/mipmap-anydpi-v26/ic_main_round.xml (1)

1-5: Adaptive icon correctly references existing foreground resource.

Verification confirms @mipmap/ic_main_foreground is properly defined across all required density buckets (hdpi, mdpi, xhdpi, xxhdpi, xxxhdpi). The adaptive icon will render correctly.

app/src/main/AndroidManifest.xml (1)

12-12: Icon resource updates verified and correct.

Verification confirms all new ic_main resources exist and are properly configured: ic_main_background.xml, adaptive icon definitions (ic_main.xml and ic_main_round.xml), and corresponding mipmap assets across all density buckets. Icon dependencies in the adaptive icon XML files correctly reference @mipmap/ic_main_foreground and @drawable/ic_main_background.

The manifest changes are safe and functional. Old ic_launcher resources remain in the codebase but are no longer referenced—these can be removed in a future cleanup if desired.

app/src/main/java/com/hsLink/hslink/presentation/main/MainActivity.kt (1)

164-172: LGTM!

The integration of career navigation into the onboarding flow is properly implemented. The navController is correctly passed through to enable navigation to career edit screens.

app/src/main/java/com/hsLink/hslink/presentation/onboarding/navigation/OnboardingNavigation.kt (1)

22-29: LGTM!

The navController parameter addition is correctly implemented and aligns with the changes in MainActivity.kt and OnboardingScreen.kt.

app/src/main/java/com/hsLink/hslink/presentation/onboarding/component/screen/CareerScreen.kt (1)

75-88: LGTM!

The integration of CareerCard with CareerDto is correctly implemented. The date range formatting properly handles both employed and completed careers.

app/src/main/java/com/hsLink/hslink/presentation/onboarding/component/screen/EmploymentStatusScreen.kt (1)

29-32: LGTM!

The type migration from EmploymentStatus to AcademicStatus is correctly implemented throughout the component.

Also applies to: 55-67

app/src/main/java/com/hsLink/hslink/presentation/onboarding/model/OnboardingState.kt (1)

11-11: Migration from EmploymentStatus to AcademicStatus is complete.

All enum type references have been properly updated to AcademicStatus. The ripgrep search shows no problematic references—only the screen component's name EmploymentStatusScreen remains, which is a UI naming convention unrelated to the enum type. The commented-out legacy function in the ViewModel is acceptable cleanup.

app/src/main/java/com/hsLink/hslink/presentation/onboarding/viewmodel/OnboardingViewModel.kt (2)

9-9: AcademicStatus import aligns with new state and UI usage

The new AcademicStatus import is correct and matches the updated state + UI wiring elsewhere in this PR. No issues here.


110-156: No behavioral change in CareerRequest construction

The only change in this block is the trailing comma on employed = s.tempIsEmployed, which doesn’t affect behavior. The overall request construction and submission flow remain consistent.

app/src/main/java/com/hsLink/hslink/presentation/onboarding/OnboardingScreen.kt (3)

3-30: Imports for NavController, CareerDto, and logging are consistent with new behavior

The added imports (NavController, CareerDto, navigateToCareerEdit, and Log) match the new navigation and error‑logging behavior introduced in this file and are used appropriately in the code below.


95-103: Academic status wiring into EmploymentStatusScreen looks correct

EmploymentStatusScreen now reads selectedStatus = state.academicStatus and writes back through viewModel::updateAcademicStatus, which is consistent with the ViewModel and request changes. Behavior should mirror the old employmentStatus flow with the new type.


46-56: All OnboardingRoute call sites already pass the navController parameter correctly

Verification confirms both usages at OnboardingNavigation.kt:25 and MainActivity.kt:161 are already updated to pass navController = navController. No compile errors should occur from this change.

@Serializable
data class CareerDto(
val id: Long,
val id: Int,
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify API contract supports Int range for career IDs.

The change from Long to Int could cause issues if the backend returns IDs exceeding Int.MAX_VALUE (2,147,483,647). Ensure the API specification guarantees career IDs will remain within the Int range.


🏁 Script executed:

#!/bin/bash
# Search for career ID usages that might still expect Long
rg -nP '\bcareer.*[iI]d.*Long\b|\bLong.*career.*[iI]d\b' --type=kotlin -C3

Length of output: 8992



Update careerId type from Long to Int across repository, service, and view model layers.

The change to use Int in CareerResponse.kt is incompletely migrated. Multiple layers still expect Long:

  • CareerRepository.kt: getCareer(careerId: Long) and updateCareer(careerId: Long, ...)
  • CareerService.kt: Service methods with @Path("careerId") careerId: Long
  • CareerRepositoryImpl.kt: Implementation methods still using Long
  • CareerViewModel.kt: updateCareer(careerId: Long) and loadCareer(careerId: Long)
  • CareerEditScreen.kt: Route parameter careerId: Long?

Workarounds like .toLong() conversions in navigation don't address the underlying type inconsistency. Update all method signatures and parameter types to use Int consistently.

🤖 Prompt for AI Agents
app/src/main/java/com/hsLink/hslink/data/dto/response/CareerResponse.kt around
line 31: the repository/service/viewmodel layers are still using Long for
careerId while CareerResponse now uses Int; update all method signatures,
parameters and route types to Int to maintain consistency — change
CareerRepository.kt (getCareer, updateCareer) and CareerRepositoryImpl.kt method
parameter types to Int, change CareerService.kt path parameter annotations and
method signatures to use Int, update CareerViewModel.kt (loadCareer,
updateCareer) and CareerEditScreen.kt route parameter parsing to Int (and remove
any .toLong() conversions), and ensure any callers and tests are adjusted
accordingly and project builds cleanly.

val jobSeeking: Boolean,
val employed: Boolean,
val academicStatus: String
val academicStatus: String? = null
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify backend API compatibility and null handling.

Making academicStatus nullable is a significant API change. While this likely addresses the HTTP 500 errors mentioned in the PR description by handling missing fields gracefully, please confirm:

  1. The backend API indeed returns null or omits this field in some responses
  2. All consumers of MentorItemDto properly handle null academicStatus values

Run the following script to check how academicStatus is used across the codebase:


🏁 Script executed:

#!/bin/bash
# Check MentorItemDto usage and academicStatus handling
echo "=== Searching for MentorItemDto usage ==="
rg -n "MentorItemDto" --type=kt -C 3

echo -e "\n=== Searching for academicStatus field access ==="
rg -n "\.academicStatus" --type=kt -C 2

Length of output: 146


🏁 Script executed:

#!/bin/bash
# Check MentorItemDto usage and academicStatus handling using corrected syntax
echo "=== Searching for MentorItemDto usage ==="
rg -n "MentorItemDto" -C 3

echo -e "\n=== Searching for academicStatus field access ==="
rg -n "\.academicStatus" -C 2

echo -e "\n=== Searching for SearchResponseDto and related DTOs ==="
rg -n "SearchResponseDto\|MentorItemDto" -C 2

Length of output: 6100


🏁 Script executed:

#!/bin/bash
# Check the function implementations that consume academicStatus
echo "=== Searching for buildStatusText function definition ==="
rg -n "fun buildStatusText" -C 5

echo -e "\n=== Searching for getAcademicStatusText function definition ==="
rg -n "fun getAcademicStatusText" -C 5

echo -e "\n=== Checking MentorItemDto data class full definition ==="
rg -n "data class MentorItemDto" -A 15

Length of output: 6221


Fix null handling in function consumers before release.

The change to make academicStatus nullable introduces type incompatibilities at multiple call sites:

  • SearchScreen.kt:196 passes nullable mentor.academicStatus to buildStatusText() which expects non-null String
  • ProfileCard.kt:174 passes nullable profile.academicStatus to getAcademicStatusText() which expects non-null String
  • MypageScreen.kt:175 passes nullable userSummary.academicStatus to buildStatusText() which expects non-null String

Update function signatures to accept String? or apply null-coalescing (e.g., ?: "") at call sites to match the non-null consumer functions' expectations.

🤖 Prompt for AI Agents
app/src/main/java/com/hsLink/hslink/data/dto/response/search/SearchResponseDto.kt
around line 27: academicStatus was made nullable (val academicStatus: String? =
null) but several consumers still require non-null String, causing type errors;
either update the consumer function signatures (buildStatusText,
getAcademicStatusText) to accept String? and handle null internally, or keep
consumers as-is and coalesce the nullable value at each call site (e.g., pass
academicStatus ?: "" or provide a sensible default). Modify only the call sites
in SearchScreen.kt:196, ProfileCard.kt:174, and MypageScreen.kt:175 or the three
consumer functions consistently so all usages compile and nulls are handled
explicitly.

Comment on lines +13 to 14
fun NavController.navigateToCareerEdit(careerId: Int, navOptions: NavOptions? = null) {
navigate(CareerEdit(careerId = careerId), navOptions)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

Incomplete type migration creates inconsistency.

The navigation layer now uses Int for careerId, but CareerEditRoute still expects Long?, requiring a conversion on line 29. This partial migration creates type inconsistency.

Consider completing the migration by updating CareerEditRoute and related components to use Int consistently. This would eliminate the need for type conversions and improve code clarity.

Also applies to: 23-29, 35-35


🏁 Script executed:

#!/bin/bash
# Find CareerEditRoute and related components that might need Int migration
rg -nP 'CareerEditRoute|careerId.*Long' --type=kotlin -C5

Length of output: 14660



Let me search directly in the repository:




Let me also check for CareerEdit:





Based on the script output from earlier, I can see line 35 shows:

app/src/main/java/com/hsLink/hslink/presentation/mypage/navigation/career/CareerEditNavigation.kt-34-@Serializable

Let me search for the full CareerEdit definition:

Type boundary change creates clarity issue, but verify design intent.

The migration changed navigation to use Int (line 13) while CareerEditRoute still expects Long? (line 60), requiring conversion on line 29. This pattern suggests an intentional type boundary—using smaller Int at UI layer while maintaining Long in business logic.

Before enforcing the suggested refactor to use Int consistently, clarify:

  • Is this intentional layer separation (UI: Int, data: Long) or incomplete migration?
  • If intentional, document this boundary decision in code comments for clarity
  • If incomplete, update both navigation and CareerEditRoute to use the same type

🏁 Script executed:

#!/bin/bash
# Find CareerDto definition to check id field type
fd -e '.kt' | xargs grep -l 'data class CareerDto\|class CareerDto'

Length of output: 71


🏁 Script executed:

#!/bin/bash
# Find CareerDto definition
rg -nP 'data class CareerDto|class CareerDto' --type=kotlin -A10 | head -50

Length of output: 1023


🏁 Script executed:

#!/bin/bash
# Find CareerEdit serializable data class
rg -nP '@Serializable.*\ndata class CareerEdit|@Serializable\s+data class CareerEdit' --type=kotlin -A5

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Search for CareerEdit more broadly
rg -nP 'data class CareerEdit|CareerEdit\s*\(' --type=kotlin -B2 -A2

Length of output: 3400


Complete the type migration: update CareerEditRoute to accept Int instead of Long.

The migration changed navigation to Int (CareerDto.id, CareerEdit class, navigateToCareerEdit function), but CareerEditRoute parameter still expects Long?. This requires an unnecessary .toLong() conversion on line 29. Update CareerEditRoute signature to accept Int? (CareerEditScreen.kt line 60) to align with the navigation layer and eliminate the type conversion.

CareerEditRoute(
    paddingValues = padding,
    navController = navController,
-   careerId = careerEdit.careerId.toLong() // removed: no longer needed
+   careerId = careerEdit.careerId
)

Separately, verify that the downstream ViewModel/Repository layer can accept Int or add conversion boundary at the ViewModel entry point if Long is required by backend.

🤖 Prompt for AI Agents
In
app/src/main/java/com/hsLink/hslink/presentation/mypage/navigation/career/CareerEditNavigation.kt
around lines 13-14 and related CareerEditScreen.kt at ~line 60, the navigation
layer was migrated to use Int for careerId but CareerEditRoute still expects
Long?, forcing a .toLong() conversion; update CareerEditRoute signature to
accept Int? instead of Long? (change parameter type in CareerEditScreen.kt at
the Route composable) and remove the unnecessary .toLong() call where
CareerEditRoute is invoked (pass careerEdit.careerId directly), then verify
downstream ViewModel/repository boundaries accept Int or perform conversion at
the ViewModel entry point if backend requires Long.

Comment on lines +62 to +71
// if (linkList.isNotEmpty()) {
// LazyColumn(
// modifier = Modifier.fillMaxSize(),
// verticalArrangement = Arrangement.spacedBy(12.dp)
// ) {
// items(linkList) { link ->
// LinkItem(link)
// }
// }
// }
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Critical: Link display functionality is completely disabled.

Commenting out the link list rendering removes essential functionality from the onboarding flow. Users can still add links via the button below (line 103-107), but they cannot view what they've added. This creates a confusing and broken user experience.

Based on the PR description mentioning HTTP 500 errors, this appears to be a temporary workaround rather than a proper fix. However:

  1. This should not be merged as-is - it degrades functionality without providing a solution
  2. If this is intentionally temporary, add a clear TODO/FIXME comment explaining:
    • Why it was disabled
    • What needs to be fixed
    • When it will be re-enabled
  3. Consider adding a loading state or error boundary instead of hiding the feature entirely

If the underlying issue is related to API errors when fetching/displaying links, please verify the actual error and implement proper error handling:


🏁 Script executed:

#!/bin/bash
# Search for LinkItemEntity usage and API calls that might be causing HTTP 500 errors
rg -n "LinkItemEntity" --type=kotlin -C3

# Search for related API/network calls in the onboarding flow
rg -n "linkList|getLlinks|fetchLinks" --type=kotlin -C3

Length of output: 15859


Critical: Link display functionality is completely disabled.

Commenting out the link list rendering removes essential functionality from the onboarding flow. Users can still add links via the button below (lines 103-107), but they cannot view what they've added. This creates a confusing and broken user experience.

Based on the PR description mentioning HTTP 500 errors, this appears to be a temporary workaround. However:

  1. This should not be merged as-is — it degrades functionality without providing a solution
  2. If this is intentionally temporary, add a clear TODO/FIXME comment explaining:
    • Why it was disabled
    • What needs to be fixed
    • When it will be re-enabled
  3. Consider adding a loading state or error boundary instead of hiding the feature entirely

The underlying infrastructure is intact (the getLinks() API call and LinkItem composable both exist), so the proper fix is to restore the rendering and handle any API errors appropriately.

🤖 Prompt for AI Agents
In
app/src/main/java/com/hsLink/hslink/presentation/onboarding/component/screen/LinkScreen.kt
around lines 62-71 the LazyColumn that renders linkList was commented out,
removing link display; restore the original rendering block (re-enable the if
(linkList.isNotEmpty()) { LazyColumn ... items(linkList) { LinkItem(link) } } )
so users can see added links, and add proper error/loading handling around the
data source (show a loading indicator while fetching, show an error message or
retry UI if getLinks() fails) to avoid re-commenting UI for backend errors; if
this disablement was intended as a temporary workaround, instead of deleting the
UI add a TODO/FIXME above the restored block stating why it was disabled, what
needs to be fixed, and the target re-enable condition.

@vvan2
Copy link
Member

vvan2 commented Nov 14, 2025

고생했으요.. 온보딩은 본선가면 내가 다 뜯어 고칠게..
영상까지 찍느라 고생많았어요!

@vvan2 vvan2 changed the title Fix/#38 fix fuking shjit [fix/#38] fix fuking shjit Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 🛠️ 버그수정 규현 🐻 규현 전용 라벨

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] 온보딩 , API 오류 해결

3 participants