Skip to content

fix: (QA/3) 온보딩 뒤로가기 분기처리#382

Merged
heesunee merged 1 commit intodevelopfrom
fix/#380/onboarding-go-prev
Sep 7, 2025
Merged

fix: (QA/3) 온보딩 뒤로가기 분기처리#382
heesunee merged 1 commit intodevelopfrom
fix/#380/onboarding-go-prev

Conversation

@bongtta
Copy link
Contributor

@bongtta bongtta commented Sep 7, 2025

#️⃣ Related Issue

Closes #380

☀️ New-insight

분기처리 개많다 진짜.....
온보딩 지옥임
D2203CFF-AF2E-41AC-95E6-BCF4328BFC66

💎 PR Point

완료화면, 그룹역할 선택화면, 그룹원 완료화면에서 뒤로가기 클릭시 홈화면으로 이동합니다~

📸 Screenshot

Summary by CodeRabbit

  • 버그 수정
    • 온보딩 ‘완료’ 단계에서 뒤로가기 시 이전 단계로 돌아가던 동작을 수정하여, 홈으로 이동하도록 변경했습니다.
    • 그룹 역할 선택 단계에서도 뒤로가기 시 홈으로 이동하도록 동작을 통일했습니다.
    • 불필요한 단계 이동이나 루프를 방지해 온보딩 종료 흐름이 더 명확하고 예측 가능해졌습니다.

@bongtta bongtta self-assigned this Sep 7, 2025
@bongtta bongtta requested a review from heesunee as a code owner September 7, 2025 17:47
@bongtta bongtta added the 채은 label Sep 7, 2025
@bongtta bongtta added the fix label Sep 7, 2025
@bongtta bongtta linked an issue Sep 7, 2025 that may be closed by this pull request
@coderabbitai
Copy link

coderabbitai bot commented Sep 7, 2025

Walkthrough

온보딩 뒤로가기 동작을 분기 처리. 완료(COMPLETE) 단계(및 그룹 온보딩의 GROUP_ROLE 단계)에서 뒤로가기 시 홈으로 라우팅하도록 로직을 추가하고, 해당 핸들러로 OnboardingHeader의 onClick을 교체.

Changes

Cohort / File(s) Summary
Onboarding 뒤로가기 분기
src/pages/onboarding/onboarding-group.tsx, src/pages/onboarding/onboarding.tsx
새로운 handlePrev 분기 추가. COMPLETE(공통) 및 GROUP_ROLE(그룹) 단계에서 뒤로가기 클릭 시 ROUTES.HOME으로 이동. 그 외 단계는 기존 goPrev 동작 유지. OnboardingHeader의 onClick을 handlePrev로 교체.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor U as User
    participant H as OnboardingHeader
    participant P as handlePrev
    participant F as Onboarding Flow
    participant R as Router

    U->>H: Back 클릭
    H->>P: onClick()
    alt 단계 == COMPLETE (공통) 또는 GROUP_ROLE (그룹)
        P->>R: navigate(ROUTES.HOME)
        Note right of R: 홈으로 리디렉션
    else 기타 단계
        P->>F: goPrev()
        Note right of F: 이전 온보딩 단계로 이동
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Assessment against linked issues

Objective Addressed Explanation
뒤로가기 분기처리 [#380]

Assessment against linked issues: Out-of-scope changes

(해당 없음)

Possibly related PRs

Suggested reviewers

  • Dubabbi
  • yeeeww
  • heesunee

Poem

삐약-아니, 깡충! 토끼는 뒤를 보았네
COMPLETE면 집으로, GROUP_ROLE도 집으로 가네
그 외엔 한 칸 뒤로 퐁당퐁당—
헤더 버튼 톡, 라우터는 쏙
온보딩 숲길, 길찾기 완성! 🐰🏠

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/#380/onboarding-go-prev

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.

@github-actions
Copy link

github-actions bot commented Sep 7, 2025

MATEBALL-STORYBOOK
⚾ Storybook 배포가 완료되었습니다!

Copy link

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
src/pages/onboarding/onboarding.tsx (1)

49-52: 브라우저 뒤로가기로 완료 화면으로 되돌아오는 것 방지: replace 옵션 사용 권장

history 스택에 COMPLETE가 남지 않도록 replace를 써주세요.

다음처럼 변경을 제안합니다:

-      navigate(ROUTES.HOME);
+      navigate(ROUTES.HOME, { replace: true });
src/pages/onboarding/onboarding-group.tsx (2)

34-41: replace 옵션으로 히스토리 정리 권장

홈 이동 시 스택을 대체해 재진입을 방지하세요.

제안 diff:

-      navigate(ROUTES.HOME);
+      navigate(ROUTES.HOME, { replace: true });

34-41: 매직 스트링 축소 제안

'GROUP_ROLE' | 'COMPLETE' 문자열 반복을 상수/유니온 타입(예: StepName enum)으로 묶으면 오타 리스크를 줄일 수 있습니다.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 283d55e and 9ac8446.

📒 Files selected for processing (2)
  • src/pages/onboarding/onboarding-group.tsx (1 hunks)
  • src/pages/onboarding/onboarding.tsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
src/pages/onboarding/onboarding-group.tsx (1)
src/shared/routes/routes-config.ts (1)
  • ROUTES (1-23)
src/pages/onboarding/onboarding.tsx (1)
src/shared/routes/routes-config.ts (1)
  • ROUTES (1-23)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: chromatic
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (4)
src/pages/onboarding/onboarding.tsx (2)

49-52: COMPLETE 단계 뒤로가기는 홈으로 리다이렉트(LGTM)

요구사항과 일치합니다. 헤더 뒤로가기 시 완료 화면에서 홈으로 이동하도록 분기한 점 확인했습니다.


49-59: 하드웨어/브라우저 뒤로가기 동작 확인 요청

헤더 버튼 외에 브라우저/디바이스 뒤로가기로 COMPLETE에서 다시 온보딩으로 돌아올 수 있는지 QA로 확인 부탁드립니다. 필요 시 COMPLETE 마운트 시 replace로 홈 이동 또는 전역 라우팅 가드로 보완 가능합니다.

src/pages/onboarding/onboarding-group.tsx (2)

34-41: GROUP_ROLE·COMPLETE 단계 뒤로가기는 홈으로 리다이렉트(LGTM)

요구사항(그룹 역할 선택/완료 화면에서 뒤로가기 시 홈 이동) 충족합니다.


46-46: 헤더 onClick을 handlePrev로 교체(LGTM)

의도한 분기 로직을 일관되게 적용합니다.

@heesunee heesunee merged commit a06ba4b into develop Sep 7, 2025
7 checks passed
@heesunee heesunee deleted the fix/#380/onboarding-go-prev branch September 7, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: 최초매칭조건 설정 뒤로가기를 분기처리합니다.

2 participants