Skip to content

Feat(client): 직무 선택 API 연결 (기존/신규 사용자)#276

Merged
constantly-dev merged 6 commits intodevelopfrom
feat/#275/job-selection-api
Feb 26, 2026
Merged

Feat(client): 직무 선택 API 연결 (기존/신규 사용자)#276
constantly-dev merged 6 commits intodevelopfrom
feat/#275/job-selection-api

Conversation

@constantly-dev
Copy link
Member

@constantly-dev constantly-dev commented Feb 25, 2026

📌 Related Issues

관련된 Issue를 태그해주세요. (e.g. - close #25)

📄 Tasks

  • 직무 선택 API 연결 (기존/신규 사용자)

⭐ PR Point (To Reviewer)

신규

신규 사용자는 온보딩에서 직무를 선택해요. 이를 위해 기존 온보딩에서 이전에 직무 선택 UI를 추가했었고, 이번에는 /api/v3/auth/signup end point를 가진 api에 job field를 추가만 해줬어요.

기존

기존 사용자는 대시보드에서 새로운 funnel로 직무를 선택해요. 이에 따라 직무를 선택하고 마지막 완료 버튼에서 해당 선택된 직무를 제출하도록 했습니다.

Summary by CodeRabbit

  • 새로운 기능

    • 온보딩에서 선택한 직무가 제출 및 저장되도록 직무 전송 기능이 추가되었습니다.
    • 사용자 직무를 서버에 업데이트하는 신규 호출을 앱 전반에 추가했습니다.
  • 리팩토링

    • 가입 관련 서버 엔드포인트가 v3로 변경되어 흐름이 갱신되었습니다.
    • 확장 기능 코드에서 불필요한 회원가입 호출이 제거되고 관련 호출 목록이 정리되었습니다.

@vercel
Copy link

vercel bot commented Feb 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pinback-client-client Ready Ready Preview, Comment Feb 26, 2026 5:59am
pinback-client-landing Ready Ready Preview, Comment Feb 26, 2026 5:59am

@github-actions github-actions bot added the feat 기능 개발하라 개발 달려라 달려 label Feb 25, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 25, 2026

Walkthrough

온보딩 플로우에 사용자의 직무(selectedJob)를 상태로 추가하고, 이를 최종 제출 시 API로 패치(patchUserJob) 및 signup payload에 포함하도록 클라이언트와 확장 프로그램의 인증 엔드포인트를 v2에서 v3로 업데이트했습니다.

Changes

Cohort / File(s) Summary
클라이언트 - 온보딩 훅 & 컴포넌트
apps/client/src/pages/onBoarding/hooks/useOnboardingFunnel.ts, apps/client/src/shared/components/jobSelectionFunnel/JobSelectionFunnel.tsx
온보딩 훅에 selectedJob 상태 추가. 최종 단계에서 job을 포함한 payload 전송. JobSelectionFunnel이 usePatchUserJob을 호출해 선택된 직무를 PATCH로 저장하도록 비동기화. 버튼 비활성화 로직에 패치 상태 반영.
클라이언트 - API 레이어
apps/client/src/shared/apis/axios.ts, apps/client/src/shared/apis/queries.ts, apps/client/src/shared/apis/setting/axiosInstance.ts
signup 요청 타입에 job: string 추가, /api/v2/auth/signup/api/v3/auth/signup로 변경. patchUserJob API 및 usePatchUserJob React Query 훅 추가. no-auth 예외 리스트에 v3 엔드포인트 반영.
확장 프로그램 - API 정리 및 버전 업데이트
apps/extension/src/apis/axios.ts, apps/extension/src/apis/axiosInstance.ts, apps/extension/src/apis/query/queries.ts
확장쪽에서 더 이상 사용되지 않는 postSignup/usePostSignup 제거. signup 엔드포인트를 v3로 변경. PutArticleRequest 인터페이스 필드 변경(문자열화된 memo/now 등) 및 포맷팅 정리.

Sequence Diagram(s)

sequenceDiagram
    participant User as User
    participant UI as JobSelectionFunnel (Client)
    participant Hook as useOnboardingFunnel
    participant API as Client API Layer (/api/v3)
    participant Server as Backend

    User->>UI: 직무 선택 및 다음/완료 클릭
    UI->>Hook: selectedJob 업데이트 / 완료 트리거
    Hook->>API: (if final step) PATCH /api/v3/users/job { job: selectedJob }
    API->>Server: HTTP PATCH 요청
    Server-->>API: 200 OK
    API-->>Hook: 성공 응답
    Hook->>API: PATCH /api/v3/auth/signup (postSignUp 포함 job 필드)
    API->>Server: signup 요청
    Server-->>API: 201 Created
    API-->>Hook: signup 응답
    Hook-->>UI: onComplete / 이동 완료
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

🛠️ Feature, api

Suggested reviewers

  • jllee000
  • jjangminii
  • karnelll

Poem

🐰 나는 깡충, 직무 골라 찰칵,

v3 길 따라 데이터가 달려가네.
patchUserJob 톡, signup에 job 싣고,
온보딩 끝엔 반짝이는 완료의 당근,
햇살처럼 저장되네, 껑충껑충 ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Out of Scope Changes check ❓ Inconclusive 변경사항은 #275의 직무 선택 API 연결 목표에 범위 내에 있습니다. 다만 #25(Progress 컴포넌트)는 현재 PR의 주요 목표와 무관하며, apps/extension의 postSignup 제거는 명확한 설명이 필요합니다. apps/extension 파일의 postSignup 함수 제거 이유와 #275와의 관계를 명확히 설명해주세요. #25는 현재 PR 범위와 별개입니다.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 직무 선택 API 연결이라는 주요 변경사항을 명확하게 표현하고 있으며, 신규/기존 사용자 범위를 포함해 변경의 범위를 잘 요약하고 있습니다.
Description check ✅ Passed PR 설명은 관련 이슈, 작업 내용, 그리고 리뷰어를 위한 세부 사항을 포함하고 있으며 제시된 템플릿의 주요 섹션을 모두 충족하고 있습니다.
Linked Issues check ✅ Passed 코드 변경사항이 #275의 직무 선택 API 연결 요구사항을 충족합니다. 신규 사용자는 /api/v3/auth/signup에 job 필드 추가, 기존 사용자는 jobSelectionFunnel에서 patchUserJob 호출로 직무 제출을 구현했습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/#275/job-selection-api

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 Feb 25, 2026

✅ Storybook chromatic 배포 확인:
🐿️ 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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
apps/client/src/shared/components/jobSelectionFunnel/JobSelectionFunnel.tsx (1)

31-40: ⚠️ Potential issue | 🟠 Major

mutateAsync 호출에 try/catch 누락 — 에러 시 UI 미복구

mutateAsync는 Promise를 반환하며, 실패 시 에러를 직접 처리해야 합니다. 현재 구현에서는 patchUserJob API 호출이 실패할 경우 unhandled rejection이 발생하고, 사용자에게 오류 메시지도 표시되지 않습니다. 또한 isPatchUserJobPendingfalse로 돌아가지만 onComplete가 호출되지 않아 사용자가 다음 단계로 진행할 수 없게 됩니다.

🛡️ 에러 처리 추가 제안
-  const handleNext = async () => {
+  const handleNext = async () => {
     if (isLastStep) {
       if (selectedJob) {
-        await patchUserJob({ job: selectedJob });
+        try {
+          await patchUserJob({ job: selectedJob });
+        } catch (error) {
+          // TODO: 사용자에게 오류 피드백 제공 (e.g. toast 알림)
+          console.error('직무 선택 저장 실패:', error);
+          return;
+        }
       }
       onComplete?.();
       return;
     }
     goNext();
   };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/client/src/shared/components/jobSelectionFunnel/JobSelectionFunnel.tsx`
around lines 31 - 40, The handleNext function calls patchUserJob (mutateAsync)
without try/catch, causing unhandled rejections and leaving the UI stuck; wrap
the await patchUserJob({ job: selectedJob }) call in a try/catch inside
handleNext, handle errors by setting appropriate error state or calling an error
notification (so users see the failure), ensure you still clear any pending
flags and avoid calling onComplete when the mutation fails, and keep use of
isPatchUserJobPending (or the mutation's reset) consistent so the UI can recover
and allow retries.
apps/client/src/pages/onBoarding/hooks/useOnboardingFunnel.ts (1)

116-133: ⚠️ Potential issue | 🟡 Minor

job: selectedJob ?? '' — 코드 레벨 검증 없이 UI 검증에만 의존

JOB 스텝의 버튼 비활성화 로직으로 jobShareAgree=trueselectedJob이 설정될 때까지 진행을 막고 있습니다. 그러나 nextStep 함수(116-133줄)에서는 selectedJob이 null인지 확인하는 프로그래밍 수준의 검증이 없으므로, 만약 UI 검증이 우회되거나 실패하면 빈 문자열이 API에 전송될 수 있습니다. postSignUpRequest 인터페이스에서 job: string으로 필수 필드이기 때문에, 백엔드가 빈 문자열을 거부할 경우 400 오류가 발생합니다. selectedJob이 null인 상황에 대한 명시적인 검증이나 처리 로직을 추가하는 것이 좋습니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/client/src/pages/onBoarding/hooks/useOnboardingFunnel.ts` around lines
116 - 133, The final-step submit in nextStep calls postSignData with job:
selectedJob ?? '' which can send an empty string if selectedJob is null; add a
programming-level guard in nextStep (the block that runs when isFinalStep is
true) to explicitly validate selectedJob is non-null/non-empty before calling
postSignData—if selectedJob is falsy, abort submission and surface an error
(e.g., set an error state or show a toast) or redirect back to the JOB step;
ensure the check references selectedJob and postSignData so the API never
receives an empty job string.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/extension/src/apis/axios.ts`:
- Around line 14-18: The exported interface postSignupRequest is unused after
postSignup was removed; delete the postSignupRequest interface declaration to
avoid dead code and unused exports. Locate the interface named postSignupRequest
in apps/extension/src/apis/axios.ts and remove the entire interface block (the
exported declaration and its properties) so no orphaned type remains; ensure no
other modules import or reference postSignupRequest before committing.

---

Outside diff comments:
In `@apps/client/src/pages/onBoarding/hooks/useOnboardingFunnel.ts`:
- Around line 116-133: The final-step submit in nextStep calls postSignData with
job: selectedJob ?? '' which can send an empty string if selectedJob is null;
add a programming-level guard in nextStep (the block that runs when isFinalStep
is true) to explicitly validate selectedJob is non-null/non-empty before calling
postSignData—if selectedJob is falsy, abort submission and surface an error
(e.g., set an error state or show a toast) or redirect back to the JOB step;
ensure the check references selectedJob and postSignData so the API never
receives an empty job string.

In `@apps/client/src/shared/components/jobSelectionFunnel/JobSelectionFunnel.tsx`:
- Around line 31-40: The handleNext function calls patchUserJob (mutateAsync)
without try/catch, causing unhandled rejections and leaving the UI stuck; wrap
the await patchUserJob({ job: selectedJob }) call in a try/catch inside
handleNext, handle errors by setting appropriate error state or calling an error
notification (so users see the failure), ensure you still clear any pending
flags and avoid calling onComplete when the mutation fails, and keep use of
isPatchUserJobPending (or the mutation's reset) consistent so the UI can recover
and allow retries.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a1ee533 and 7d98278.

📒 Files selected for processing (8)
  • apps/client/src/pages/onBoarding/hooks/useOnboardingFunnel.ts
  • apps/client/src/shared/apis/axios.ts
  • apps/client/src/shared/apis/queries.ts
  • apps/client/src/shared/apis/setting/axiosInstance.ts
  • apps/client/src/shared/components/jobSelectionFunnel/JobSelectionFunnel.tsx
  • apps/extension/src/apis/axios.ts
  • apps/extension/src/apis/axiosInstance.ts
  • apps/extension/src/apis/query/queries.ts

Copy link
Collaborator

@jjangminii jjangminii left a comment

Choose a reason for hiding this comment

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

확인했습니다-!

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.

🧹 Nitpick comments (1)
apps/extension/src/apis/axios.ts (1)

19-23: 인터페이스 네이밍을 PascalCase로 통일하세요.

postCategoriesRequestPostCategoriesRequest로 변경해야 합니다. 파일 내 다른 인터페이스들(PostArticleRequest, PutArticleRequest)은 모두 PascalCase를 따르고 있어 현재 명명은 일관성을 깨뜨립니다. 변경 시 apps/extension/src/apis/axios.ts(19, 23줄)와 apps/extension/src/apis/query/queries.ts(8, 22줄)에서 모두 수정되어야 합니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/extension/src/apis/axios.ts` around lines 19 - 23, Rename the interface
postCategoriesRequest to PostCategoriesRequest and update all references: change
the declaration export interface postCategoriesRequest { ... } to export
interface PostCategoriesRequest { ... } and update the postCategories function
signature to accept (data: PostCategoriesRequest). Also update any
usages/imports in the related queries module where postCategoriesRequest is
referenced (e.g., types used at the top of queries.ts) to use
PostCategoriesRequest so naming is consistent with PostArticleRequest and
PutArticleRequest.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/extension/src/apis/axios.ts`:
- Around line 19-23: Rename the interface postCategoriesRequest to
PostCategoriesRequest and update all references: change the declaration export
interface postCategoriesRequest { ... } to export interface
PostCategoriesRequest { ... } and update the postCategories function signature
to accept (data: PostCategoriesRequest). Also update any usages/imports in the
related queries module where postCategoriesRequest is referenced (e.g., types
used at the top of queries.ts) to use PostCategoriesRequest so naming is
consistent with PostArticleRequest and PutArticleRequest.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7d98278 and 6a82805.

📒 Files selected for processing (1)
  • apps/extension/src/apis/axios.ts

@constantly-dev constantly-dev merged commit 5a38bab into develop Feb 26, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat 기능 개발하라 개발 달려라 달려

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 직무 선택 API 연결 (기존/신규 사용자)

2 participants