feat: 웹/앱 버전 표시 기능 - #178
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No description provided. |
|
Warning Review limit reached
More reviews will be available in 53 minutes and 40 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
WalkthroughNative app의 WebView User-Agent를 Expo 버전 기반으로 상수화하고, web 애플리케이션 버전을 자동 관리하며, WebBridge 메시지 통신을 표준화합니다. 마이페이지에 동적 버전 표시 기능을 추가하고 API 엔드포인트를 통합합니다. ChangesNative App User-Agent 관리
Web 버전 관리 및 WebBridge 통신
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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.
Inline comments:
In `@apps/web/package.json`:
- Around line 7-10: The Turborepo cache key isn't sensitive to the
VERCEL_GIT_COMMIT_REF (or derived NEXT_PUBLIC_WEB_VERSION) so prebuild
(apps/web/scripts/prebuild.mjs) may not run on cache hits; update the root
turbo.json to include VERCEL_GIT_COMMIT_REF in globalEnv or modify the apps/web
build.inputs to include NEXT_PUBLIC_WEB_VERSION (or the .env* value) so the
cache key changes when the commit ref/version changes, ensuring the prebuild
script runs and .env.local-derived NEXT_PUBLIC_WEB_VERSION is refreshed.
In `@apps/web/scripts/prebuild.mjs`:
- Around line 57-58: When getWebVersion() returns null, the script currently
does nothing and leaves a stale NEXT_PUBLIC_WEB_VERSION in .env.local; update
the logic around getWebVersion() / insertWebVersionIntoEnv to explicitly clear
or remove the NEXT_PUBLIC_WEB_VERSION entry (e.g., set it to an empty string or
delete the key) when webVersion is null so the old value is not preserved in
.env.local. Ensure you modify the code that calls insertWebVersionIntoEnv
(and/or the insertWebVersionIntoEnv implementation) to handle the null case and
write the updated .env content accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 946eb354-8246-4ee4-9c5f-bad4c13a27f7
📒 Files selected for processing (14)
apps/app/app.jsonapps/app/app/index.tsxapps/app/constants/userAgent.tsapps/app/utils/handleImage.tsapps/web/package.jsonapps/web/scripts/prebuild.mjsapps/web/src/app/login/_components/LoginButtons.tsxapps/web/src/app/mypage/_components/AppVersionFooter.tsxapps/web/src/app/mypage/_consts/mypage.tsapps/web/src/app/mypage/_utils/appVersion.tsapps/web/src/app/mypage/edit/_apis/getNicknameCheck.tsapps/web/src/app/mypage/page.tsxapps/web/src/consts/api.tsapps/web/src/hooks/useImagePicker.ts
💤 Files with no reviewable changes (1)
- apps/web/src/app/mypage/_consts/mypage.ts
| getAuthUrl('kakao').then(({ url }) => { | ||
| window.location.href = url; | ||
| }); |
There was a problem hiding this comment.
handleKakaoLogin / handleGoogleLogin에서 async 함수 안에 .then()을 쓰면 getAuthUrl이 실패했을 때 에러가 잡히지 않는 것 같아
저번에 테스트할 때 카카오 로그인 버튼 눌렀는데 아무 반응 없었던 것도 이 때문일 수 있을 것 같은데 이미 async를 쓰고 있으니 await으로 통일하고 try/catch로 토스트 띄어주는 식으로 에러 처리를 해주는건 어떨까?
There was a problem hiding this comment.
아 내가 추가한거였구나.. 따로 해서 올릴게
| if (!tag.startsWith(WEB_VERSION_TAG_PREFIX)) return null; | ||
|
|
||
| const webVersion = tag.slice(WEB_VERSION_TAG_PREFIX.length); | ||
| console.log('[WEB VERSION] ', webVersion); |
There was a problem hiding this comment.
콘솔 필요하다면 console.warn 으로 수정해줭
cd86302 to
b925d2f
Compare
작업 요약
작업 세부 내용
웹·앱 버전 표시
웹 버전 추출 방식
web-v*git 태그에서 웹 버전을 추출하여.env.local의NEXT_PUBLIC_WEB_VERSION에 자동 주입dev/build실행 전prebuild스크립트 연동 (apps/web, 루트prebuild:web)앱 버전 추출 방식
앱 User-Agent에 Expo 앱 버전 포함 (
WEBVIEW_UA_TOKEN/{version})user agent 정보 파싱을 통해 버전 앱 버전 확인
마이페이지 하단
AppVersionFooter에서 버전 표시v{webVersion}v{appVersion} (w{webVersion})하드코딩된
APP_VERSION_LABEL상수 제거프로필·이미지 관련 수정
BaseImage:src변경 시 이전 로딩/에러 fallback이 계속 노출되던 문제 수정 (key기반 remount)ENDPOINTS.USER_NICKNAME_CHECK상수 사용 및params주입 방식으로 변경usePatchMe: 프로필 수정 성공 후invalidateQueries비동기 처리 추가기타 리팩토링
LoginButtons:ReactNativeWebView.postMessage직접 호출 →WebBridge+isWebview()유틸로 통일div→main시맨틱 태그 적용RECORD_AUDIO권한 제거 (미사용)연관 이슈
closes #179