Skip to content

[MOD#1594] BuildConfig.DEBUG 여부에 따른 앱잼탬프/일반 솝탬프 분기 처리 및 API 호출 로직 수정#1595

Merged
sonms merged 2 commits into
developfrom
mod/#1594-hide-appjamtamp
May 29, 2026
Merged

[MOD#1594] BuildConfig.DEBUG 여부에 따른 앱잼탬프/일반 솝탬프 분기 처리 및 API 호출 로직 수정#1595
sonms merged 2 commits into
developfrom
mod/#1594-hide-appjamtamp

Conversation

@sonms
Copy link
Copy Markdown
Member

@sonms sonms commented May 28, 2026

Related issue 🛠

Work Description ✏️

  • SoptLogUrl 및 MySoptLogItemType에서 DEBUG 모드일 때만 "appjamtamp" URL을 사용하도록 변경
  • SoptLogScreen 내 데이터 로딩 및 에러 재시도 로직에서 DEBUG 여부에 따라 getSoptLogInfoData와 getSoptLogInfo를 구분하여 호출하도록 수정

To Reviewers 📢

급한 처리가 필요하여 부득이하게 해당 방법을 채택하였습니다
release, debug 모드에서 모두 빌드 확인은 하였으나 release 버전에서 솝탬프를 볼 수 없는 관계로 해당 내용까지 확인 완료하였습니다

- SoptLogUrl 및 MySoptLogItemType에서 DEBUG 모드일 때만 "appjamtamp" URL을 사용하도록 변경
- SoptLogScreen 내 데이터 로딩 및 에러 재시도 로직에서 DEBUG 여부에 따라 getSoptLogInfoData와 getSoptLogInfo를 구분하여 호출하도록 수정
@sonms sonms requested a review from a team as a code owner May 28, 2026 11:41
Copy link
Copy Markdown
Member

@1971123-seongmin 1971123-seongmin left a comment

Choose a reason for hiding this comment

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

고생하셨습니다

Copy link
Copy Markdown
Member

@seungjunGong seungjunGong left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 !! 무.박(무한박수)

Copy link
Copy Markdown
Member

@vvan2 vvan2 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다! 그에게 주어지는 무.박

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

Review Change Stack

Summary by CodeRabbit

릴리스 노트

  • 버그 수정
    • Sopt 로그 데이터 로드 및 에러 재시도 로직 개선
    • 빌드 구성에 따른 적절한 데이터 소스 처리 개선

기능 요약

SoptLog 기능이 BuildConfig.DEBUG 플래그에 따라 환경별로 다른 URL과 데이터 페칭 메서드를 사용하도록 변경되었습니다. 디버그 빌드에서는 "appjamtamp", 그 외에는 "soptamp"를 사용합니다.

변경 사항

SoptLog 앱잼탬프 조건부 처리

레이어 / 파일 요약
네비게이션 URL 상수 정의
feature/soptlog/src/main/java/org/sopt/official/feature/soptlog/navigation/SoptLogUrl.kt
SoptLogUrl.SOPTAMP의 URL이 BuildConfig.DEBUG에 따라 "appjamtamp"(디버그) 또는 "soptamp"(그 외)로 동적으로 결정되도록 변경되었습니다.
로그 아이템 타입 URL 설정
feature/soptlog/src/main/java/org/sopt/official/feature/soptlog/model/MySoptLogItemType.kt
COMPLETED_MISSION의 URL이 BuildConfig.DEBUG 조건식으로 선택되도록 변경되었습니다.
화면 라우트 데이터 페칭 로직
feature/soptlog/src/main/java/org/sopt/official/feature/soptlog/SoptLogScreen.kt
초기 데이터 로딩과 에러 재시도 시 BuildConfig.DEBUG에 따라 다른 ViewModel 메서드를 호출하도록 변경되었습니다.

예상 코드 리뷰 시간

🎯 2 (단순) | ⏱️ ~10분

체리

🐰 앱잼탬프를 숨겨내고
빌드 플래그로 갈라 놓고
디버그와 릴리스 사이를
우아하게 드나드네 🎩
기능 분기는 깔끔하게!

🚥 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
Title check ✅ Passed PR 제목이 변경사항의 핵심을 명확하게 설명하고 있습니다: BuildConfig.DEBUG 여부에 따른 앱잼탬프/솝탬프 분기 처리 및 API 호출 로직 수정.
Description check ✅ Passed PR 설명이 변경사항과 관련있으며, 관련 이슈, 수행된 작업, 검증 현황을 포함하고 있습니다.
Linked Issues check ✅ Passed PR의 코드 변경사항이 #1594 이슈의 요구사항을 충족합니다: SoptLogUrl, MySoptLogItemType, SoptLogScreen에서 DEBUG 모드 분기 처리 구현 완료.
Out of Scope Changes check ✅ Passed 모든 변경사항이 #1594 이슈의 범위 내에 있으며, 앱잼탬프 숨기기라는 명확한 목표에 맞게 이루어졌습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 mod/#1594-hide-appjamtamp

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.

Copy link
Copy Markdown

@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.

🧹 Nitpick comments (2)
feature/soptlog/src/main/java/org/sopt/official/feature/soptlog/model/MySoptLogItemType.kt (1)

41-41: ⚡ Quick win

중복된 DEBUG/URL 분기 로직 — 단일 출처로 통합 권장.

if (BuildConfig.DEBUG) "appjamtamp" else "soptamp" 식은 SoptLogUrl.SOPTAMP(L33)와 완전히 동일합니다. 두 곳에 분산되어 있으면 TODO 제거(앱잼탬프 기간 종료 시) 시점에 한쪽만 수정되어 어긋날 위험이 있습니다. SoptLogUrl.SOPTAMP.url을 재사용해 단일 출처로 만드는 것을 권장합니다.

♻️ 제안 변경
-    COMPLETED_MISSION(title = "완료미션", category = SoptLogCategory.SOPTAMP, url = if (BuildConfig.DEBUG) "appjamtamp" else "soptamp", count = { it.soptampCount ?: 0 }),
+    COMPLETED_MISSION(title = "완료미션", category = SoptLogCategory.SOPTAMP, url = SoptLogUrl.SOPTAMP.url, count = { it.soptampCount ?: 0 }),

통합 시 BuildConfig import는 제거 가능하며, SoptLogUrl import 추가가 필요합니다.

🤖 Prompt for 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.

In
`@feature/soptlog/src/main/java/org/sopt/official/feature/soptlog/model/MySoptLogItemType.kt`
at line 41, The COMPLETED_MISSION enum entry in MySoptLogItemType uses an inline
if(BuildConfig.DEBUG) URL branch which duplicates logic in SoptLogUrl.SOPTAMP;
replace the inline expression in COMPLETED_MISSION (in MySoptLogItemType) with a
reference to SoptLogUrl.SOPTAMP.url to centralize the URL logic, and remove the
now-unnecessary BuildConfig import while adding/importing SoptLogUrl if not
already imported.
feature/soptlog/src/main/java/org/sopt/official/feature/soptlog/SoptLogScreen.kt (1)

73-79: ⚡ Quick win

DEBUG 게이팅 분기 중복 제거 + 릴리즈 경로 테스트 커버 필요

SoptLogScreen.kt의 SoptLogRoute에서 BuildConfig.DEBUG에 따른 호출이 초기 로딩(라인 14-20)과 에러 재시도(NetworkErrorDialog onConfirm, 라인 49-54) 모두에서 getSoptLogInfoData() vs getSoptLogInfo()로 중복됩니다. 또한 두 메서드는 실제 동작이 달라서(getSoptLogInfoData()getMyAppjamInfo()도 함께 호출하고 isAppjamJoined를 갱신, getSoptLogInfo()getSoptLogInfo()만 호출) 릴리즈에서만 보이는 경로가 디버그 빌드로는 검증되기 어렵습니다.

♻️ 제안 변경
+    val fetchSoptLogInfo: () -> Unit = {
+        // Todo : 앱잼탬프 기간일 때 다시 열기 if Build.Debug 제거
+        if (BuildConfig.DEBUG) viewModel.getSoptLogInfoData() else viewModel.getSoptLogInfo()
+    }
+
     LaunchedEffect(Unit) {
-        if (BuildConfig.DEBUG) { // Todo : 앱잼탬프 기간일 때 다시 열기 if Build.Debug 제거
-            viewModel.getSoptLogInfoData()
-        } else {
-            viewModel.getSoptLogInfo()
-        }
+        fetchSoptLogInfo()
     }

NetworkErrorDialog(onConfirm = ...)도 동일하게 onConfirm = fetchSoptLogInfo로 통일하는 방향이 안전합니다.

🤖 Prompt for 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.

In
`@feature/soptlog/src/main/java/org/sopt/official/feature/soptlog/SoptLogScreen.kt`
around lines 73 - 79, There is duplicated BuildConfig.DEBUG branching calling
getSoptLogInfoData() vs getSoptLogInfo() in multiple places; create a single
helper function (e.g., fetchSoptLogInfo) inside the SoptLogRoute/SoptLogScreen
composable that encapsulates the if (BuildConfig.DEBUG) ->
viewModel.getSoptLogInfoData() else -> viewModel.getSoptLogInfo() logic, replace
the LaunchedEffect call and NetworkErrorDialog(onConfirm = ...) to call
fetchSoptLogInfo(), and ensure the helper invokes the release path so the
getSoptLogInfo() behavior is exercisable in Release builds.
🤖 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.

Nitpick comments:
In
`@feature/soptlog/src/main/java/org/sopt/official/feature/soptlog/model/MySoptLogItemType.kt`:
- Line 41: The COMPLETED_MISSION enum entry in MySoptLogItemType uses an inline
if(BuildConfig.DEBUG) URL branch which duplicates logic in SoptLogUrl.SOPTAMP;
replace the inline expression in COMPLETED_MISSION (in MySoptLogItemType) with a
reference to SoptLogUrl.SOPTAMP.url to centralize the URL logic, and remove the
now-unnecessary BuildConfig import while adding/importing SoptLogUrl if not
already imported.

In
`@feature/soptlog/src/main/java/org/sopt/official/feature/soptlog/SoptLogScreen.kt`:
- Around line 73-79: There is duplicated BuildConfig.DEBUG branching calling
getSoptLogInfoData() vs getSoptLogInfo() in multiple places; create a single
helper function (e.g., fetchSoptLogInfo) inside the SoptLogRoute/SoptLogScreen
composable that encapsulates the if (BuildConfig.DEBUG) ->
viewModel.getSoptLogInfoData() else -> viewModel.getSoptLogInfo() logic, replace
the LaunchedEffect call and NetworkErrorDialog(onConfirm = ...) to call
fetchSoptLogInfo(), and ensure the helper invokes the release path so the
getSoptLogInfo() behavior is exercisable in Release builds.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c304a8f4-35da-4f1d-a3c2-822265dae810

📥 Commits

Reviewing files that changed from the base of the PR and between a3f8cdc and 57f9efe.

📒 Files selected for processing (3)
  • feature/soptlog/src/main/java/org/sopt/official/feature/soptlog/SoptLogScreen.kt
  • feature/soptlog/src/main/java/org/sopt/official/feature/soptlog/model/MySoptLogItemType.kt
  • feature/soptlog/src/main/java/org/sopt/official/feature/soptlog/navigation/SoptLogUrl.kt

@sonms sonms merged commit de81cee into develop May 29, 2026
2 checks passed
@sonms sonms deleted the mod/#1594-hide-appjamtamp branch May 29, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MOD] 앱잼탬프 숨기기

4 participants