Skip to content

Remote Config force_update 플래그 기반 업데이트 팝업 제어#376

Merged
unam98 merged 3 commits intodevelopfrom
feature/force-update-remote-config
Apr 3, 2026
Merged

Remote Config force_update 플래그 기반 업데이트 팝업 제어#376
unam98 merged 3 commits intodevelopfrom
feature/force-update-remote-config

Conversation

@unam98
Copy link
Copy Markdown
Collaborator

@unam98 unam98 commented Apr 3, 2026

작업 배경

  • 기존에는 앱 버전이 다르기만 하면 무조건 강제 업데이트 팝업이 떠서 사용성을 저해
  • Firebase Remote Config의 force_update 파라미터로 팝업 노출 여부를 서버에서 제어할 수 있도록 개선

변경 사항

구분 파일 내용
수정 MainActivity.kt force_update == true && 버전 다름 조건일 때만 팝업 표시
수정 MainActivity.kt REMOTE_KEY_FORCE_UPDATE 상수 추가

영향 범위

  • 앱 진입 시 업데이트 팝업 노출 조건 변경
  • force_update = false (기본값) → 팝업 미노출
  • force_update = true + 버전 불일치 → 강제 업데이트 팝업 (외부 터치 차단)
  • 앱 배포 없이 Firebase Remote Config 콘솔에서 즉시 제어 가능

Test Plan

  • 디버그 빌드 성공 확인
  • Remote Config force_update = false 시 팝업 미노출 확인
  • Remote Config force_update = true + 구버전 시 팝업 노출 확인
  • 팝업 외부 영역 터치 시 닫히지 않는 것 확인

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Update prompt behavior refined: the app will now only show a mandatory update dialog when a remote "force update" flag is enabled and a newer app version is detected. This reduces unnecessary prompts and makes mandatory update enforcement more deliberate.

- force_update가 true이고 버전이 다를 때만 강제 업데이트 팝업 표시
- 기본값 false — 불필요한 팝업으로 사용성 저해 방지
- 팝업은 외부 터치 차단(setCancelable false) 유지
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 3, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8cca573c-1b21-4636-8f9b-2dafa63a7e29

📥 Commits

Reviewing files that changed from the base of the PR and between abb1740 and 720cd30.

📒 Files selected for processing (4)
  • .github/workflows/CD.yml
  • .github/workflows/CI.yml
  • app/build.gradle
  • app/src/main/java/com/runnect/runnect/presentation/MainActivity.kt

📝 Walkthrough

Walkthrough

A new Remote Config boolean flag (REMOTE_KEY_FORCE_UPDATE) was added and gating the update-dialog in MainActivity; CI workflows now inject this value into local.properties; app/build.gradle exposes it as BuildConfig.REMOTE_KEY_FORCE_UPDATE via a new buildConfigField.

Changes

Cohort / File(s) Summary
Remote Config Update Logic
app/src/main/java/com/runnect/runnect/presentation/MainActivity.kt
Added constant REMOTE_KEY_FORCE_UPDATE and changed the update-dialog condition to require forceUpdate be true in addition to a version mismatch.
CI Workflows
.github/workflows/CD.yml, .github/workflows/CI.yml
Added steps to read REMOTE_KEY_FORCE_UPDATE from GitHub Secrets and append it into local.properties.
Build Config
app/build.gradle
Added buildConfigField "String", "REMOTE_KEY_FORCE_UPDATE", properties["REMOTE_KEY_FORCE_UPDATE"] so the key is available as BuildConfig.REMOTE_KEY_FORCE_UPDATE.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I nibble at keys the CI seeds,
A tiny flag for update deeds,
Versions checked with gentle thump,
If force is true — the dialog jumps!
Hooray, one constant, one small leap — 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: implementing Remote Config force_update flag-based control for the update popup, which directly matches the primary objective of the PR.

✏️ 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 feature/force-update-remote-config

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.

@unam98 unam98 self-assigned this Apr 3, 2026
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 (1)
app/src/main/java/com/runnect/runnect/presentation/MainActivity.kt (1)

139-141: Define an explicit local default for force_update.

The new condition is good, but force_update should also be included in setDefaultsAsync so default behavior is deterministic even before backend config is available.

♻️ Proposed change
             setDefaultsAsync( //remote config 기본값 설정
                 mapOf(REMOTE_KEY_APP_VERSION to getString(R.string.default_version))
+                    + mapOf(REMOTE_KEY_FORCE_UPDATE to false)
             )
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/java/com/runnect/runnect/presentation/MainActivity.kt` around
lines 139 - 141, The remote `force_update` key (REMOTE_KEY_FORCE_UPDATE) lacks
an explicit local default, so add it to the Remote Config local defaults used in
setDefaultsAsync so behavior is deterministic before backend config loads;
locate the code where setDefaultsAsync is called (e.g., in MainActivity
initialization or in the Remote Config setup function), add an entry mapping
REMOTE_KEY_FORCE_UPDATE to a boolean default (false or true per product
decision), and ensure the code that reads val forceUpdate =
getBoolean(REMOTE_KEY_FORCE_UPDATE) will see that default value immediately.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/src/main/java/com/runnect/runnect/presentation/MainActivity.kt`:
- Around line 139-141: The remote `force_update` key (REMOTE_KEY_FORCE_UPDATE)
lacks an explicit local default, so add it to the Remote Config local defaults
used in setDefaultsAsync so behavior is deterministic before backend config
loads; locate the code where setDefaultsAsync is called (e.g., in MainActivity
initialization or in the Remote Config setup function), add an entry mapping
REMOTE_KEY_FORCE_UPDATE to a boolean default (false or true per product
decision), and ensure the code that reads val forceUpdate =
getBoolean(REMOTE_KEY_FORCE_UPDATE) will see that default value immediately.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3eb3e7d7-afb1-4087-8cc9-3a7d30ed69d1

📥 Commits

Reviewing files that changed from the base of the PR and between 9c62c23 and abb1740.

📒 Files selected for processing (1)
  • app/src/main/java/com/runnect/runnect/presentation/MainActivity.kt

unam98 added 2 commits April 3, 2026 15:19
- local.properties에 REMOTE_KEY_FORCE_UPDATE 추가
- build.gradle에 buildConfigField 등록
- MainActivity에서 상수 제거, BuildConfig 참조로 변경
@unam98 unam98 merged commit 4651fca into develop Apr 3, 2026
1 of 2 checks passed
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.

1 participant