Skip to content

[Deploy] 스프린트2 종료 후 배포 #82

Merged
LeeWxx merged 37 commits into
prodfrom
dev
Mar 7, 2026
Merged

[Deploy] 스프린트2 종료 후 배포 #82
LeeWxx merged 37 commits into
prodfrom
dev

Conversation

@LeeWxx
Copy link
Copy Markdown
Collaborator

@LeeWxx LeeWxx commented Mar 7, 2026

이슈 번호

#MM-1234

작업내용

  • 변경한 주요 내용 목록

리뷰어에게 전할 말

스크린샷 (선택사항)

MM-181 S2 기본 온보딩 화면을 구현했습니다.
MM-180 채팅 애착유형 테스트 알림
…-test-cta

Revert "MM-180 채팅 애착유형 테스트 알림"
@LeeWxx LeeWxx merged commit 6b4f8a0 into prod Mar 7, 2026
3 checks passed
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 Pull Request는 스프린트2 종료 후 배포를 위한 기능 업데이트를 포함합니다. 주요 변경 사항은 사용자 온보딩 경험을 확장하고 프로필 관리 기능을 강화하는 것입니다. 특히, 사용자의 연애 상태와 MBTI 정보를 수집하고 관리할 수 있도록 새로운 온보딩 플로우와 마이페이지 내 프로필 관리 섹션을 도입했습니다. 또한, 채팅 기능의 안정성과 사용자 경험을 개선하기 위해 메시지 스트리밍 로직을 최적화하고, 애착유형 테스트 유도 방식을 사용자 친화적으로 변경했습니다. 전반적으로 사용자 데이터의 풍부함을 더하고, 앱의 핵심 기능인 채팅 경험을 더욱 견고하게 만드는 데 중점을 두었습니다.

Highlights

  • 새로운 온보딩 및 프로필 관리 기능 추가: 사용자의 연애 상태, MBTI, 상대방 MBTI를 입력받는 새로운 온보딩 단계를 추가하고, 마이페이지에서 이 정보를 관리할 수 있는 프로필 관리 페이지를 신설했습니다.
  • 채팅 스트리밍 로직 개선 및 튜토리얼 모달 제거: 채팅 메시지 스트리밍 처리 로직을 개선하여 특정 채팅방에 대한 스트리밍을 명확히 관리하도록 변경했으며, 기존의 애착유형 테스트 필수 튜토리얼 모달을 제거하고 메시지 목록 내 CTA로 대체했습니다.
  • 애착유형 테스트 결과 페이지에 유입 경로 추적 기능 추가: 애착유형 테스트 질문 및 결과 페이지에 from 파라미터를 추가하여 사용자가 어떤 경로로 테스트에 진입했는지 추적할 수 있도록 개선했습니다.
  • 홈 화면에 필수 프로필 정보 입력 유도 다이얼로그 추가: 홈 화면 진입 시 필수 프로필 정보(연애 상태, MBTI 등)가 누락된 경우, 정보 입력을 유도하는 알림 다이얼로그를 표시하도록 구현했습니다.
  • API 클라이언트 및 환경 변수 설정 업데이트: OpenAPI Generator 버전을 업데이트하고, API 요청 헤더에서 불필요한 Accept 필드를 제거했습니다. 또한, 모바일 앱의 API 기본 URL을 테스트 환경 변수로 변경했습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • apps/mobile/app/features/auth/lib/auth-client.ts
    • API 기본 URL 환경 변수를 테스트 환경 변수로 변경했습니다.
  • apps/mobile/app/index.tsx
    • 주석 처리된 웹뷰 URL 환경 변수 선언을 제거했습니다.
  • apps/react/src/app/__root.tsx
    • 새로운 온보딩 경로('/onboarding/relationship-status', '/onboarding/mbti', '/onboarding/partner-mbti')를 추가했습니다.
    • 경로 매칭의 견고성을 높이기 위해 normalizePath 유틸리티 함수를 추가하고 matchRoute에서 사용하도록 업데이트했습니다.
  • apps/react/src/app/attachment-test/question/page.tsx
    • URL 검색 파라미터 유효성 검사를 위해 zod 스키마를 추가했습니다.
    • useSearch 훅을 사용하여 from 파라미터를 가져오고 useAttachmentQuestions 훅에 전달하도록 수정했습니다.
  • apps/react/src/app/attachment-test/result/my/page.tsx
    • URL 검색 파라미터 유효성 검사를 위해 zod 스키마를 추가했습니다.
    • from 파라미터를 가져와 isFromChat 여부를 판단하고 AttachmentResultContent 컴포넌트에 전달하도록 수정했습니다.
  • apps/react/src/app/chat/page.tsx
    • useAuth 임포트와 chattingModal 컨텍스트 사용을 제거했습니다.
    • 메시지 목록 생성 로직에서 chattingModal.showChattingTutorialauth.userInfo.loveTypeCategory 의존성을 제거했습니다.
    • 채팅 스크롤 훅(useChatScroll)의 sendingMessage, streamingMessage, awaitingResponse 파라미터를 스트리밍 대상 채팅방에 따라 조건부로 적용하도록 변경했습니다.
    • 채팅방 언마운트 시 메시지 쿼리를 무효화하는 useEffect 훅을 추가했습니다.
    • 채팅 튜토리얼 모달 렌더링 로직을 제거했습니다.
  • apps/react/src/app/mbti/page.tsx
    • 사용자의 MBTI를 편집하고 저장하는 새로운 페이지를 추가했습니다.
    • 필수 프로필 입력 플로우와 연동하여 다음 단계로 이동하거나 이전 페이지로 돌아가는 로직을 구현했습니다.
  • apps/react/src/app/my-page/profile/page.tsx
    • 프로필 관리 메뉴를 제공하는 새로운 페이지를 추가했습니다.
    • 연애 상태, 내 성향(MBTI), 상대 성향(MBTI)을 편집할 수 있는 링크를 포함했습니다.
  • apps/react/src/app/onboarding/complete/page.tsx
    • 온보딩 완료 메시지를 사용자의 연애 상태에 따라 동적으로 표시하도록 변경했습니다.
    • 온보딩 완료 API 호출 로직을 추가하고, 제출 중 상태를 관리하는 isSubmitting 상태를 도입했습니다.
  • apps/react/src/app/onboarding/mbti/page.tsx
    • 온보딩 과정에서 사용자의 MBTI를 입력받는 새로운 페이지를 추가했습니다.
  • apps/react/src/app/onboarding/partner-mbti/page.tsx
    • 온보딩 과정에서 상대방의 MBTI를 입력받는 새로운 페이지를 추가했습니다.
  • apps/react/src/app/onboarding/relationship-status/page.tsx
    • 온보딩 과정에서 사용자의 연애 상태를 입력받는 새로운 페이지를 추가했습니다.
  • apps/react/src/app/page.tsx
    • 필수 프로필 정보가 누락된 경우 홈 화면 진입 시 알림 다이얼로그를 표시하는 useEffect 훅을 추가했습니다.
    • 알림 다이얼로그에 사용될 이미지를 추가했습니다.
    • 필수 프로필 플로우 관련 검색 스키마 및 시작 경로 유틸리티를 임포트했습니다.
  • apps/react/src/app/partner-mbti/page.tsx
    • 상대방의 MBTI를 편집하고 저장하는 새로운 페이지를 추가했습니다.
    • 필수 프로필 입력 플로우와 연동하여 다음 단계로 이동하거나 이전 페이지로 돌아가는 로직을 구현했습니다.
  • apps/react/src/app/relationship-status/page.tsx
    • 사용자의 연애 상태를 편집하고 저장하는 새로운 페이지를 추가했습니다.
    • 필수 프로필 입력 플로우와 연동하여 다음 단계로 이동하거나 이전 페이지로 돌아가는 로직을 구현했습니다.
  • apps/react/src/app/tutorial/page.tsx
    • 튜토리얼 이미지 경로를 assets/icons에서 assets/images/tutorial로 변경했습니다.
  • apps/react/src/features/attachment/hooks/use-attachment-questions.ts
    • useAttachmentQuestions 훅에 from 옵션을 추가하여 애착유형 테스트 결과 페이지로 이동 시 유입 경로를 전달하도록 수정했습니다.
  • apps/react/src/features/attachment/ui/result/attachment-result-content.tsx
    • AttachmentResultContent 컴포넌트에 isFromChat prop을 추가하여 CTA 텍스트를 동적으로 변경하도록 수정했습니다.
  • apps/react/src/features/auth/hooks/use-auth.tsx
    • UserInfo 타입에 relationshipStatus, personalityType, otherPersonalityType 필드를 추가했습니다.
    • initialUserInfo 및 사용자 정보 로딩 로직에 새로운 프로필 필드를 반영했습니다.
  • apps/react/src/features/bookmark/ui/bookmark-sheet.tsx
    • 북마크 시트의 기본 높이를 50vh에서 354px로 조정했습니다.
    • 시트 드래그 핸들 및 편집/완료 버튼의 UI 위치를 조정했습니다.
  • apps/react/src/features/chat/context/chatting-context.tsx
    • chattingModal 관련 로직을 컨텍스트에서 제거했습니다.
    • 채팅 스트리밍 중인 채팅방 ID를 관리하는 streamingChatRoomId 상태와 setStreamingTargetChatRoomId 함수를 추가했습니다.
    • 채팅 응답 처리(handleChatResponse, handleResponseId) 로직이 streamingChatRoomIdRef를 사용하여 특정 채팅방의 스트리밍에만 반응하도록 수정했습니다.
    • 스트리밍 종료 또는 에러 발생 시 streamingChatRoomId를 초기화하도록 변경했습니다.
  • apps/react/src/features/chat/hooks/use-chatting-modal.tsx
    • 애착유형 테스트 필수 모달(testRequiredModal) 및 관련 로직을 제거했습니다.
  • apps/react/src/features/chat/ui/chat-bubble.tsx
    • 메시지 북마크 ID 업데이트 로직에서 nextBookmarkIdundefined를 허용하도록 타입을 변경했습니다.
    • 메시지 타임스탬프와 북마크 아이콘 표시 로직을 MessageMetadata 컴포넌트로 분리했습니다.
    • AiChatBubbleMyChatBubble 컴포넌트에 showTimestamp prop을 추가했습니다.
  • apps/react/src/features/chat/ui/chat-entry-card.tsx
    • 새 채팅방 생성 전 userInfo.loveTypeCategory 확인 로직을 제거했습니다.
  • apps/react/src/features/chat/ui/chat-message-list.tsx
    • 메시지 목록에 애착유형 테스트 유도 CTA를 조건부로 표시하는 로직을 추가했습니다.
    • 메시지 타임스탬프 표시 여부를 shouldShowMessageTimestamp 함수를 통해 동적으로 결정하도록 변경했습니다.
    • 날짜 구분선에 mb-5 마진을 추가했습니다.
  • apps/react/src/features/chat/ui/date-divider.tsx
    • 날짜 비교를 위해 isSameCalendarDay 유틸리티 함수를 사용하도록 변경했습니다.
    • 날짜 구분선에 하단 마진을 추가했습니다.
  • apps/react/src/features/chat/util/chat-format.ts
    • ISO 8601 형식의 타임스탬프에서 날짜 및 시간 구성 요소를 추출하는 getDateParts 함수를 추가했습니다.
    • 두 타임스탬프가 같은 날짜인지 확인하는 isSameCalendarDay 함수를 추가했습니다.
    • 두 타임스탬프가 같은 분 단위 시각인지 확인하는 isSameTimestampMinute 함수를 추가했습니다.
  • apps/react/src/features/onboarding/contexts/onboarding-context.tsx
    • OnboardingDatarelationshipStatus, personalityType, otherPersonalityType 필드를 추가했습니다.
    • 온보딩 완료 여부를 나타내는 isOnboardingCompleted 상태를 추가했습니다.
    • 새로운 프로필 필드를 업데이트하는 updateRelationshipStatus, updatePersonalityType, updateOtherPersonalityType 함수를 추가했습니다.
    • completeOnboarding 함수가 새로운 프로필 필드를 SignUpRequestDto에 포함하도록 수정하고, 온보딩 완료 시 isOnboardingCompletedtrue로 설정하도록 변경했습니다.
  • apps/react/src/features/onboarding/hooks/use-onboarding-navigation.ts
    • 온보딩 단계를 사용자의 연애 상태에 따라 동적으로 결정하도록 ONBOARDING_STEPS 로직을 변경했습니다.
    • 특정 온보딩 단계로 직접 이동하는 goToStep 함수를 추가했습니다.
    • 온보딩 완료 페이지에서 뒤로가기 시 조건부 라우팅 로직을 추가했습니다.
    • 상대방 MBTI 페이지 이후 연애 상태에 따른 조건부 라우팅 로직을 추가했습니다.
  • apps/react/src/features/onboarding/ui/mbti-form.tsx
    • MBTI 선택을 위한 재사용 가능한 폼 컴포넌트를 추가했습니다.
  • apps/react/src/features/onboarding/ui/relationship-status-form.tsx
    • 연애 상태 선택을 위한 재사용 가능한 폼 컴포넌트를 추가했습니다.
  • apps/react/src/features/onboarding/ui/title-section.tsx
    • description prop의 타입을 string에서 ReactNode로 변경하여 더 유연하게 콘텐츠를 전달할 수 있도록 했습니다.
  • apps/react/src/features/profile/hooks/use-my-page-menu.ts
    • 마이페이지 메뉴에 '프로필 관리' 항목을 추가했습니다.
  • apps/react/src/features/profile/lib/required-profile-flow.ts
    • 필수 프로필 입력 플로우의 검색 스키마와 시작 경로를 정의하는 유틸리티 파일을 추가했습니다.
  • apps/react/src/routeTree.gen.ts
    • 새로 추가된 페이지(mbti, my-page/profile, partner-mbti, relationship-status) 및 온보딩 단계(onboarding/mbti, onboarding/partner-mbti, onboarding/relationship-status)에 대한 라우트 정의를 업데이트했습니다.
  • apps/react/src/shared/analytics/constants.ts
    • 새로운 온보딩 단계 및 프로필 관리 페이지에 대한 분석용 페이지 이름과 버튼 이름을 추가했습니다.
  • apps/react/src/shared/analytics/route-tracker.ts
    • 새로운 온보딩 및 프로필 관리 경로에 대한 페이지 매핑을 업데이트했습니다.
  • apps/react/src/shared/lib/api.ts
    • API 요청 및 응답 로깅 시 safeStringify 함수를 사용하여 객체를 안전하게 JSON 문자열로 변환하도록 개선했습니다.
  • apps/react/src/shared/lib/global-alert-dialog.tsx
    • AlertDialogOpenOptionspreventClose 옵션을 추가하여 모달이 외부 클릭이나 ESC 키로 닫히는 것을 방지할 수 있도록 했습니다.
    • GlobalAlertDialog 컴포넌트가 preventClose 옵션을 존중하도록 수정했습니다.
  • packages/data/user-api-axios/api/.openapi-generator/VERSION
    • OpenAPI Generator 버전을 7.18.0에서 7.16.0으로 변경했습니다.
  • packages/data/user-api-axios/api/apis/bookmarks-api.ts
    • API 요청 헤더에서 불필요한 Accept: '*/*' 필드를 제거했습니다.
  • packages/data/user-api-axios/api/apis/chatroom-api.ts
    • API 요청 헤더에서 불필요한 Accept: '*/*' 필드를 제거했습니다.
  • packages/data/user-api-axios/api/apis/couples-api.ts
    • API 요청 헤더에서 불필요한 Accept: '*/*' 필드를 제거했습니다.
  • packages/data/user-api-axios/api/apis/logins-api.ts
    • API 요청 헤더에서 불필요한 Accept: '*/*' 필드를 제거했습니다.
  • packages/data/user-api-axios/api/apis/love-types-api.ts
    • API 요청 헤더에서 불필요한 Accept: '*/*' 필드를 제거했습니다.
  • packages/data/user-api-axios/api/apis/members-alarms-api.ts
    • API 요청 헤더에서 불필요한 Accept: '*/*' 필드를 제거했습니다.
  • packages/data/user-api-axios/api/apis/members-api.ts
    • API 요청 헤더에서 불필요한 Accept: '*/*' 필드를 제거했습니다.
  • packages/data/user-api-axios/api/apis/questions-api.ts
    • API 요청 헤더에서 불필요한 Accept: '*/*' 필드를 제거했습니다.
  • packages/data/user-api-axios/api/apis/refresh-api.ts
    • API 요청 헤더에서 불필요한 Accept: '*/*' 필드를 제거했습니다.
  • packages/data/user-api-axios/api/apis/sign-ups-api.ts
    • API 요청 헤더에서 불필요한 Accept: '*/*' 필드를 제거했습니다.
  • packages/data/user-api-axios/api/apis/sseconnection-apiapi.ts
    • API 요청 헤더에서 불필요한 Accept: 'text/event-stream' 필드를 제거했습니다.
  • packages/data/user-api-axios/api/apis/terms-api.ts
    • API 요청 헤더에서 불필요한 Accept: '*/*' 필드를 제거했습니다.
  • packages/data/user-api-axios/api/apis/test-api.ts
    • API 요청 헤더에서 불필요한 Accept 필드를 제거했습니다.
  • packages/data/user-api-axios/api/configuration.ts
    • AWSv4 관련 설정 및 인터페이스를 제거했습니다.
  • packages/data/user-api-axios/api/models/create-chat-room-data.ts
    • CreateChatRoomDataChatRoomStateEnumBeforeInit 상태를 추가했습니다.
  • packages/data/user-api-axios/api/models/member-data.ts
    • MemberData 인터페이스에 relationshipStatus, personalityType, otherPersonalityType 필드를 추가했습니다.
    • MemberDataRelationshipStatusEnum을 정의했습니다.
  • packages/data/user-api-axios/api/models/sign-up-request-dto.ts
    • SignUpRequestDto 인터페이스에 relationshipStatus, personalityType, otherPersonalityType 필드를 추가했습니다.
    • SignUpRequestDtoRelationshipStatusEnum을 정의했습니다.
  • packages/data/user-api-axios/api/models/update-member-request-dto.ts
    • UpdateMemberRequestDto 인터페이스에 nickname 필드를 선택적으로 변경하고 relationshipStatus, personalityType, otherPersonalityType 필드를 추가했습니다.
    • UpdateMemberRequestDtoRelationshipStatusEnum을 정의했습니다.
Ignored Files
  • Ignored by pattern: .github/workflows/** (5)
    • .github/workflows/ci-react.yml
    • .github/workflows/deploy-react-dev.yml
    • .github/workflows/deploy-react-prod.yml
    • .github/workflows/deploy-react.yml
    • .github/workflows/react-deploy-reusable.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

이번 PR은 스프린트2의 결과물을 배포하기 위한 변경으로 보입니다. 새로운 온보딩 플로우(연애 상태, MBTI)와 프로필 관리 기능이 추가되었고, 채팅 컨텍스트가 리팩터링되어 안정성이 향상되었습니다. 전반적으로 많은 기능 개선과 코드 품질 향상이 이루어진 점이 인상적입니다. 하지만, API client 구현에서 민감한 사용자 데이터와 인증 토큰이 콘솔에 로깅되는 보안 취약점이 발견되었습니다. 이는 프로덕션 환경에서 데이터 노출로 이어질 수 있으므로, 개발 환경에서만 로깅되도록 처리하는 것이 권장됩니다. 또한, 홈 화면에서 필수 프로필 정보 입력을 유도하는 로직에 잠재적인 버그가 있어 수정이 필요해 보입니다. 온보딩 네비게이션 훅에서 경로를 정규화하는 로직이 중복 구현되어 있어 공통 유틸리티로 분리하면 더 좋을 것 같습니다. 자세한 내용은 각 파일에 남긴 리뷰 코멘트를 참고해주세요.

Comment on lines +69 to +99
useEffect(() => {
if (!requiredProfileStartPath) {
hasOpenedRequiredProfileDialog = false
return
}

if (hasOpenedRequiredProfileDialog) return
if (isAlertDialogOpen) return

hasOpenedRequiredProfileDialog = true

openAlertDialog({
title: '모모의 연애 상담이 새로워졌어요',
description: (
<>
모모가 기억할 연애 정보를 입력하고
<br />
연애 상담을 시작해 보세요
</>
),
image: (
<img src={momoHomeChattingImage} alt="연애 상담 정보 입력" className="h-[164px] w-[184px] object-contain" />
),
confirmText: '정보 입력하러 가기',
onConfirm: wrapWithTracking(BUTTON_NAMES.GO_REQUIRED_PROFILE_FLOW, CATEGORIES.MAIN, () => {
const parsedSearch = requiredProfileFlowSearchSchema.parse({ requiredProfileFlow: true })
navigate({ to: requiredProfileStartPath, search: parsedSearch, replace: true })
}),
preventClose: true,
})
}, [isAlertDialogOpen, navigate, openAlertDialog, requiredProfileStartPath])
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

필수 프로필 정보 입력 플로우를 제어하기 위해 모듈 스코프의 hasOpenedRequiredProfileDialog 플래그를 사용하고 계신데요, 이 방식에는 잠재적인 버그가 있습니다.
유저가 정보 입력을 일부만 완료하고 홈으로 돌아올 경우, hasOpenedRequiredProfileDialogtrue로 유지되어 더 이상 다이얼로그가 표시되지 않습니다. 이로 인해 필수 정보 입력 프로세스가 중단될 수 있습니다.

isAlertDialogOpen 체크만으로도 다이얼로그가 중복으로 열리는 것을 방지할 수 있으므로, hasOpenedRequiredProfileDialog 플래그와 관련 로직을 제거하는 것을 제안합니다. 이렇게 하면 프로필 정보가 불완전할 때마다 홈 화면에서 항상 다이얼로그를 띄워 필수 플로우를 확실하게 유도할 수 있습니다.

preventClose: true 옵션 덕분에 사용자가 다이얼로그를 무시하기 어려우므로, 매번 띄워도 사용자 경험을 크게 해치지 않을 것입니다.

아래와 같이 수정하는 것을 제안합니다. (35번째 줄의 hasOpenedRequiredProfileDialog 변수 선언도 함께 제거해주세요.)

  useEffect(() => {
    if (!requiredProfileStartPath) {
      return
    }

    if (isAlertDialogOpen) return

    openAlertDialog({
      title: '모모의 연애 상담이 새로워졌어요',
      description: (
        <>
          모모가 기억할 연애 정보를 입력하고
          <br />
          연애 상담을 시작해 보세요
        </>
      ),
      image: (
        <img src={momoHomeChattingImage} alt="연애 상담 정보 입력" className="h-[164px] w-[184px] object-contain" />
      ),
      confirmText: '정보 입력하러 가기',
      onConfirm: wrapWithTracking(BUTTON_NAMES.GO_REQUIRED_PROFILE_FLOW, CATEGORIES.MAIN, () => {
        const parsedSearch = requiredProfileFlowSearchSchema.parse({ requiredProfileFlow: true })
        navigate({ to: requiredProfileStartPath, search: parsedSearch, replace: true })
      }),
      preventClose: true,
    })
  }, [isAlertDialogOpen, navigate, openAlertDialog, requiredProfileStartPath])

Comment on lines +55 to +60
console.log(
`API Request: ${safeStringify({
url: config.url,
payload: config.data,
})}`
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

security-medium medium

The API request interceptor logs the entire request payload to the console. This data can contain sensitive information such as social login tokens (in login requests) and Personally Identifiable Information (PII) like nicknames or relationship details (in profile update requests). These logs are active in production environments, which could lead to the exposure of sensitive user data in the browser console or log aggregation systems.

Suggested change
console.log(
`API Request: ${safeStringify({
url: config.url,
payload: config.data,
})}`
)
if (import.meta.env.DEV) {
console.log(
`API Request: ${safeStringify({
url: config.url,
payload: config.data,
})}`
)
}

apiInstance.interceptors.response.use(
(response) => {
console.log('API Response:', response.data)
console.log(`API Response: ${safeStringify(response.data)}`)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

security-medium medium

The API response interceptor logs the entire response body to the console. This can include sensitive user data (PII) returned by the server, such as email addresses and detailed profile information. Logging this data in production is a security risk as it exposes user information in the client-side environment.

      if (import.meta.env.DEV) {
        console.log(`API Response: ${safeStringify(response.data)}`)
      }

const currentPath = window.location.pathname
return ONBOARDING_STEPS.findIndex((step) => currentPath.endsWith(step))
// trailing slash 제거 후 비교
const currentPath = location.pathname.replace(/\/$/, '')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

경로의 마지막 슬래시를 제거하기 위해 replace(/\/$/, '')를 사용하고 계십니다. apps/react/src/app/__root.tsx 파일에서도 동일한 목적의 normalizePath 함수가 구현되어 있습니다.

코드 중복을 피하고 일관성을 유지하기 위해, 이 normalizePath 함수를 shared/lib/와 같은 공통 유틸리티 파일로 분리하고, __root.tsx와 이 파일 양쪽에서 재사용하는 것을 권장합니다.

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.

2 participants