You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
외국인 유학생 수요를 보려고 웹(Moadong/moadong#1920)은 기기 언어를 device_locale super property로 이미 수집합니다. 앱은 mixpanel-react-native로 웹과 별개의 Mixpanel 인스턴스를 써서, 네이티브에서만 나는 이벤트에는 이 값이 붙지 않았습니다. 특히 구독(SUBSCRIBE_BUTTON_CLICKED)은 웹에 없는 앱 전용 기능이라, 이 작업 전에는 "유학생의 구독 전환율"을 볼 수 없었습니다.
바뀐 것
expo-localization ~17.0.9 추가 (expo install, SDK 54 호환 버전)
utils/mixpanel.ts: init() 직후 getLocales()[0].languageTag를 device_locale super property로 등록
Locale.current는 쓰지 않습니다. 앱이 선언한 현지화(developmentRegion = en 하나)와 협상된 값이라 기기 언어와 무관하게 en이 될 수 있습니다
등록은 자체 try/catch로 감쌌습니다. init과 같은 try 안에서 throw하면 getMixpanel()이 계속 null이 돼 네이티브 이벤트가 전부 빠집니다
값이 없으면 등록하지 않습니다 (빈 문자열 세그먼트 방지)
ios/Podfile.lock, ios/app.xcodeproj/project.pbxproj: pod install 산출물 (ExpoLocalization pod, privacy bundle 복사 줄 2개). RCT-Folly checksum은 Xcode Cloud 값 그대로입니다
외국인 유학생 수요를 보려고 웹(Moadong/moadong#1920)은 device_locale을
super property로 이미 수집한다. 앱은 웹과 별개의 Mixpanel 인스턴스를 써서
구독처럼 네이티브에서만 나는 이벤트에는 이 값이 없었다.
- expo-localization의 getLocales()[0].languageTag(iOS Locale.preferredLanguages
첫 값)를 init 직후 super property로 등록한다. Locale.current는 앱이 선언한
현지화(en 하나)와 협상된 값이라 기기 언어와 무관하게 en이 될 수 있어 쓰지 않는다
- 등록은 자체 try/catch로 감싼다. init과 같은 try 안에서 throw하면
getMixpanel()이 계속 null을 돌려줘 네이티브 이벤트가 전부 빠진다
- 값이 없으면 등록하지 않아 빈 문자열 세그먼트를 만들지 않는다
- Podfile.lock, project.pbxproj는 pod install 산출물이다(ExpoLocalization pod,
privacy bundle 복사 줄)
이슈에 있던 웹뷰 window.deviceLocale 주입은 하지 않는다. WebKit의
navigator.language가 이미 호스트 앱의 AppleLanguages를 읽어 정확도 이득이 없고,
홈·범용 웹뷰의 학생 토큰 주입과 같은 prop을 나눠 써야 해 위험만 늘어난다.
Closes#30
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review was skipped as selected files did not have any reviewable changes.
Files ignored due to path filters: 2
ios/Podfile.lock is excluded by !**/*.lock
package-lock.json is excluded by !**/package-lock.json
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 20932524-7da0-495d-9a8f-6cafbb8d6c85
Commits
Reviewing files that changed from the base of the PR and between 045aaa7 and f8c051b.
Files ignored due to path filters: 2
ios/Podfile.lock is excluded by !**/*.lock
package-lock.json is excluded by !**/package-lock.json
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
expo-localization을 추가했습니다. Mixpanel 초기화 성공 후 기기 선호 언어의 첫 번째 languageTag를 device_locale super property로 등록합니다. iOS 리소스 복사 목록에 ExpoLocalization privacy bundle을 추가했습니다.
Changes
기기 locale 수집
Layer / File(s)
Summary
기기 locale 조회 및 Mixpanel 등록 package.json, utils/mixpanel.ts, ios/app.xcodeproj/project.pbxproj
expo-localization을 추가하고 getLocales()의 첫 번째 languageTag가 있을 때 device_locale로 등록합니다. 등록 중 오류는 기록하고 초기화 흐름에 전파하지 않습니다. iOS 리소스 복사 입력 및 출력 목록에 ExpoLocalization_privacy.bundle 경로를 추가합니다.
The app now records the device's preferred language on native analytics events. Failures in this registration are contained and should not interrupt analytics initialization. Before release, confirm the events in TestFlight and check Android. No merge-blocking risk is evident.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
PR 제목은 네이티브 Mixpanel 이벤트에 기기 언어(device_locale) 속성을 추가한다는 핵심 변경을 정확히 설명합니다. 변경 내용은 expo-localization 추가, utils/mixpanel.ts의 registerDeviceLocale 추가, Xcode 프로젝트의 리소스 경로 추가이며, 제목과 모두 관련됩니다. 제목은 한국어로 작성되어…
- package.json: expo-localization ~17.0.9 의존성 추가. 요구사항 1과 일치합니다. - utils/mixpanel.ts: registerDeviceLocale 추가 및 init 직후 호출. 요구사항 2와 일치합니다. - ios/app.xcodeproj/project.pbxp…
Full details: Title check
Explanation
PR 제목은 네이티브 Mixpanel 이벤트에 기기 언어(device_locale) 속성을 추가한다는 핵심 변경을 정확히 설명합니다. 변경 내용은 expo-localization 추가, utils/mixpanel.ts의 registerDeviceLocale 추가, Xcode 프로젝트의 리소스 경로 추가이며, 제목과 모두 관련됩니다. 제목은 한국어로 작성되어 있고 한 문장이며, 길이도 적절합니다.
네이티브 Mixpanel super property 등록: utils/mixpanel.ts의 init 직후 registerDeviceLocale가 getLocales()[0]의 languageTag를 device_locale로 등록합니다. 값이 없으면 등록하지 않습니다. 등록 오류는 자체 try/catch로 처리하여 init 흐름에 전파하지 않습니다. 이슈 요구사항을 충족합니다.
WebView window.deviceLocale 주입: 이번 PR에는 포함되지 않습니다. 이슈는 이 항목을 "정확도 개선용이며 폴백이 있으므로 선택"으로 명시합니다. PR 설명은 WebKit이 navigator.language에 기기 선호 언어를 반영한다고 주장하며, 이 주장은 이번 검토에서 검증하지 않았습니다. 이슈의 긴급도와 선택 항목 표시를 고려하면 이 제외는 이슈 요구사항 위반으로 보지 않습니다.
이슈가 명시한 비코딩 항목(dev client 재빌드, TestFlight에서 Mixpanel 이벤트 확인, Android 회귀 확인)은 평가 대상이 아닙니다.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: ff17589f-f26c-4e22-9423-50322dc4a5cd
Commits
Reviewing files that changed from the base of the PR and between ff9e37f and 045aaa7.
Files ignored due to path filters: 2
ios/Podfile.lock is excluded by !**/*.lock
package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 3
ios/app.xcodeproj/project.pbxproj
package.json
utils/mixpanel.ts
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #30
왜 필요한지
외국인 유학생 수요를 보려고 웹(Moadong/moadong#1920)은 기기 언어를
device_localesuper property로 이미 수집합니다. 앱은mixpanel-react-native로 웹과 별개의 Mixpanel 인스턴스를 써서, 네이티브에서만 나는 이벤트에는 이 값이 붙지 않았습니다. 특히 구독(SUBSCRIBE_BUTTON_CLICKED)은 웹에 없는 앱 전용 기능이라, 이 작업 전에는 "유학생의 구독 전환율"을 볼 수 없었습니다.바뀐 것
expo-localization ~17.0.9추가 (expo install, SDK 54 호환 버전)utils/mixpanel.ts:init()직후getLocales()[0].languageTag를device_localesuper property로 등록Locale.current는 쓰지 않습니다. 앱이 선언한 현지화(developmentRegion = en하나)와 협상된 값이라 기기 언어와 무관하게en이 될 수 있습니다getMixpanel()이 계속null이 돼 네이티브 이벤트가 전부 빠집니다ios/Podfile.lock,ios/app.xcodeproj/project.pbxproj:pod install산출물 (ExpoLocalization pod, privacy bundle 복사 줄 2개). RCT-Folly checksum은 Xcode Cloud 값 그대로입니다allowDynamicLocaleChangesAndroid: true로 Android MainActivityconfigChanges가 바뀝니다이슈와 다르게 한 것: 웹뷰
window.deviceLocale주입은 뺐습니다navigator.language는 호스트 앱의AppleLanguages(= 기기 선호 언어)를 웹 프로세스로 넘겨받습니다 (LanguageCF.cpp의CFLocaleCopyPreferredLanguages,AuxiliaryProcessProxyCocoa.mm). 번들 현지화와 협상하지 않으니, 웹 폴백만으로 이미 정확합니다injectedJavaScriptBeforeContentLoaded로 학생 토큰을 넣고 있어, 같은 prop을 나눠 쓰다 잘못 합치면 토큰 주입이 깨집니다. 이득 없이 위험만 늘어서 뺐습니다검증
npx tsc --noEmit통과npm run lint: 오류 0건, 기존 경고 5건 (변경 파일엔 없음)iOS 26.2 시뮬레이터에서
Locale.preferredLanguages(expo가 쓰는 API)를 직접 찍어 확인:kokoenenzh-Hanszh-Hanszh-Hantzh-Hantko-KR기기 언어 목록의 첫 값이 가공 없이 나옵니다. 지역 코드는 API가 붙이지 않고, 목록 값에 들어 있을 때만 나옵니다
분석할 때 주의
en-KR,zh-Hans-KR처럼 지역이 붙을 수 있습니다.-앞 언어 코드로 묶어서 보는 게 안전합니다. 중국어는zh-Hans(간체)/zh-Hant(번체)로 갈립니다navigator.language는 WebKit이 줄여 쓰므로 같은 사람이라도 웹/앱 값 형식이 다를 수 있습니다ko로 잡힙니다. 유학생 수의 하한선으로만 읽어야 합니다device_locale값 확인🤖 Generated with Claude Code
Summary by CodeRabbit