Skip to content

[feat] #103 자소서 제목 입력 페이지 추가 - #104

Merged
nayeon653 merged 5 commits into
mainfrom
feat/#103
Jul 29, 2026
Merged

[feat] #103 자소서 제목 입력 페이지 추가#104
nayeon653 merged 5 commits into
mainfrom
feat/#103

Conversation

@nayeon653

@nayeon653 nayeon653 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

☘️ 작업한 이슈

🍀 작업한 내용

  1. Figma 시안대로 자소서 제목 입력 페이지(Step3) 신규 추가 — 활동 선택(Step2) 이후, 문항/글자수 입력 이전 단계
  2. 기존 Step3(문항/글자수)Step5(개별 문항 상세)를 Step4Step6으로 재정렬
  3. 제목 state를 CoverLetterPage에서 관리하도록 연결, 뒤로가기/다음 단계 이동 시에도 유지

🍃 작업 포인트

  • 제목 미입력 시 "다음으로" 버튼 비활성화 처리
  • 제목 50자 제한 (maxLength + slice로 이중 방어)
  • Enter 입력 시 줄바꿈 허용 (일반 textarea 동작)
  • 버튼은 Step1과 동일하게 radius.full 완전 pill 형태로 Figma와 동일하게 맞춤

📷 작업 GIF

Feature 시연 영상
자소서 제목 입력 (로컬 환경에 브라우저 자동화 도구 없어 스크린샷 생략 — lint/build 통과로 검증)

Summary by CodeRabbit

  • 새로운 기능
    • 진행 단계가 6단계로 확장되어, 문항별 초안을 목록에서 선택해 확인할 수 있습니다.
    • 문항 입력 후(최대 5개) 초안 목록에서 선택한 항목을 복사해 사용할 수 있습니다.
  • 화면 개선
    • 3단계는 자소서 제목 입력으로 변경되며 제목이 비어 있으면 “다음으로”가 비활성화됩니다(입력 길이 제한 상향 및 비활성 스타일 반영).
    • 4~5단계는 문항 추가/수정/삭제 흐름과 안내 문구, 버튼 구성이 재구성되었습니다.

@nayeon653

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
sprout-efub Ready Ready Preview, Comment Jul 28, 2026 11:03am

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: edd51342-0a5f-4864-88de-f21a64aa570b

📥 Commits

Reviewing files that changed from the base of the PR and between 0f15f7d and e942501.

📒 Files selected for processing (1)
  • src/features/coverLetter/components/CoverLetterStep3.jsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/features/coverLetter/components/CoverLetterStep3.jsx

Walkthrough

자소서 작성 플로우가 4단계에서 5단계로 확장되었다. 제목 입력 단계가 추가되었고, 문항 입력과 초안 선택 단계가 뒤로 이동했다. 선택한 질문의 초안을 상세히 조회하는 CoverLetterStep6도 추가되었다.

Changes

자소서 작성 플로우

Layer / File(s) Summary
제목 입력 및 단계 라우팅
src/pages/ai/CoverLetterPage.jsx, src/features/coverLetter/components/CoverLetterStep3.jsx
title 상태를 추가하고 제목 입력 화면을 연결했다. 제목은 최대 50자로 제한되며 공백만 입력하면 다음 버튼이 비활성화된다.
문항 입력 및 초안 생성
src/features/coverLetter/components/CoverLetterStep4.jsx
문항 추가·삭제, 내용 및 글자 수 수정을 지원하고 문항이 5개 미만일 때 추가 버튼을 표시한다. 입력된 문항이 없으면 초안 생성 버튼이 비활성화된다.
초안 선택 및 상세 조회
src/features/coverLetter/components/CoverLetterStep5.jsx, src/features/coverLetter/components/CoverLetterStep6.jsx
여러 초안의 선택·복사·저장을 위한 목록 화면과 선택된 질문의 초안·설명을 표시하는 상세 화면을 추가했다.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  actor 작성자
  participant CoverLetterPage
  participant CoverLetterStep3
  participant CoverLetterStep4
  participant CoverLetterStep5
  participant CoverLetterStep6
  작성자->>CoverLetterStep3: 제목 입력
  CoverLetterStep3->>CoverLetterPage: 제목 저장 및 다음 단계 요청
  CoverLetterPage->>CoverLetterStep4: 문항 입력 화면 표시
  작성자->>CoverLetterStep4: 문항과 글자 수 입력
  CoverLetterStep4->>CoverLetterPage: 초안 생성 단계로 진행
  CoverLetterPage->>CoverLetterStep5: 초안 목록 표시
  작성자->>CoverLetterStep5: 질문 선택
  CoverLetterPage->>CoverLetterStep6: 선택된 질문과 초안 표시
Loading

Suggested labels: 🎨 design

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 자소서 제목 입력 페이지 추가라는 핵심 변경을 정확히 요약해 PR 내용과 잘 맞습니다.
Linked Issues check ✅ Passed 제목 입력 Step 추가, Step3~5 재정렬, 제목 state 연결, 50자 제한, 비활성화 요구가 모두 반영되었습니다.
Out of Scope Changes check ✅ Passed 핵심 요구사항 범위 내에서 단계 재정렬과 관련 UI·스타일 수정만 보이며, 별도 무관한 변경은 보이지 않습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#103

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

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

⚠️ Outside diff range comments (2)
src/features/coverLetter/components/CoverLetterStep5.jsx (1)

1-50: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

"모두 선택" 기능이 실제로는 아무 동작도 안 해요.

selectedIds/isAllSelected/handleToggleSelectAll을 만들어서 "모두 선택" 버튼으로 카드 스타일(selected prop)을 바꿔주긴 하는데, 그 이후에 selectedIds를 사용하는 코드가 없어요. DraftQuestionCard의 클릭 핸들러(onSelect)는 onSelectQuestion(페이지의 setActiveQuestionId)에 바로 연결되어 있어서 상세보기로 이동하는 용도이고, selectedIds와는 별개예요. 복사(handleCopy)도 개별 id 기준으로만 동작하고 선택된 여러 항목을 한 번에 복사하는 로직은 없습니다.

즉 사용자가 "모두 선택"을 눌러도 카드 테두리만 바뀔 뿐 실질적으로 얻는 게 없어서, 이 리뷰 스택에서 의도한 "여러 문항 초안을 선택해서 복사"하는 기능은 아직 안 붙어있는 상태로 보여요. 선택된 항목들을 모아서 복사하는 버튼(예: "선택 항목 복사하기")을 추가하거나, 아니면 이번 PR 범위에서 "모두 선택" UI 자체를 빼는 방향으로 정리가 필요할 것 같아요.

🤖 Prompt for 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.

In `@src/features/coverLetter/components/CoverLetterStep5.jsx` around lines 1 -
50, Connect selectedIds to a meaningful action in CoverLetterStep5 by adding a
button that copies the selected draft answers together, using the existing
handleCopy logic or an equivalent multi-item handler; ensure the action is
disabled or safely handles an empty selection. If multi-copy is out of scope,
remove selectedIds, isAllSelected, handleToggleSelectAll, the select-all button,
and the selected prop instead of keeping nonfunctional selection UI.
src/pages/ai/CoverLetterPage.jsx (1)

55-101: 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

페이지 컴포넌트가 점점 무거워지고 있어요.

title, questions, draftAnswers, draftVariant, activeQuestionId 상태와 handleGenerateDrafts, handleRegenerateDrafts, handleFinish, goBack, renderStep 로직이 전부 페이지 컴포넌트 안에 몰려 있어요. 지금 PR에서 단계가 4→5로 늘고 title 상태까지 추가되면서 페이지 파일이 점점 더 커지고 있습니다.

useCoverLetterFlow 같은 커스텀 훅을 만들어 features/coverLetter/hooks 하위로 상태/핸들러를 옮기면, 페이지는 훅에서 값을 받아 렌더링만 담당하게 되어 유지보수가 훨씬 쉬워져요.

// features/coverLetter/hooks/useCoverLetterFlow.js
export function useCoverLetterFlow(navigate) {
  const [step, setStep] = useState(1);
  const [title, setTitle] = useState('');
  // ...나머지 상태/핸들러
  return { step, title, setTitle, goNext, goBack, /* ... */ };
}

당장 급한 버그는 아니라서 이번 PR에서 꼭 처리하지 않아도 되지만, 다음 단계가 추가될 걸 생각하면 미리 정리해두는 게 좋을 것 같아요!

As per path instructions: "페이지 컴포넌트는 얇게 유지하는 것이 이 프로젝트의 원칙입니다. 비즈니스 로직이나 복잡한 UI가 페이지에 직접 들어 있으면 features/ 하위 도메인 폴더로 분리하도록 제안해주세요."

🤖 Prompt for 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.

In `@src/pages/ai/CoverLetterPage.jsx` around lines 55 - 101, 페이지 컴포넌트의 상태와 비즈니스
로직이 과도하게 집중되어 있으므로, `features/coverLetter/hooks`에 `useCoverLetterFlow` 커스텀 훅을
추가해 `title`, `questions`, `draftAnswers`, `draftVariant`, `activeQuestionId` 상태와
`handleGenerateDrafts`, `handleRegenerateDrafts`, `handleFinish`, `goBack`,
`renderStep` 로직을 이동하세요. 훅은 페이지가 렌더링에 필요한 상태와 핸들러를 반환하고, `CoverLetterPage`는 이를 받아
단계 UI를 렌더링하는 얇은 컴포넌트로 유지하세요.

Source: Path instructions

🧹 Nitpick comments (2)
src/pages/ai/CoverLetterPage.jsx (1)

77-87: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

activeIndex가 -1이 될 가능성도 살짝 방어해두면 좋아요.

questions.findIndex가 못 찾으면 -1을 반환하는데, 이 경우 questions[-1]undefined가 되어 CoverLetterStep6question.content에서 에러가 날 수 있어요. 지금 흐름에서는 activeQuestionId가 항상 questions 배열에서 온 id라 실제로 터질 일은 없어 보이지만, 나중에 로직이 바뀌면 조용히 문제가 될 수 있으니 참고해주세요.

🤖 Prompt for 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.

In `@src/pages/ai/CoverLetterPage.jsx` around lines 77 - 87, In the case 5 branch
of CoverLetterPage, guard the activeIndex result from questions.findIndex before
rendering CoverLetterStep6. If activeIndex is -1, avoid passing
questions[activeIndex] and follow the existing safe fallback behavior; preserve
the current rendering path when the question is found.
src/features/coverLetter/components/CoverLetterStep4.jsx (1)

32-68: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

문항 내용이 비어있어도 다음 단계로 넘어갈 수 있어요.

Step3에서는 제목이 비어있으면 disabled={title.trim() === ''}로 막아주는데, 여기 "초안 생성하기" 버튼은 문항 내용이 하나도 없어도 그냥 눌려요. 그러면 빈 문항으로 초안 생성이 진행돼서 다음 화면(Step5/6)에 빈 카드가 뜰 수 있어요.

Step3와 같은 패턴으로 맞춰주면 좋을 것 같아요:

+  const hasEmptyContent = questions.some((q) => q.content.trim() === '');
+
   const handleGenerateDraft = () => {
     // TODO: 백엔드 연동 시 AI 초안 생성 API 요청
     onNext();
   };
       <BottomArea>
-        <PrimaryButton onClick={handleGenerateDraft}>
+        <PrimaryButton onClick={handleGenerateDraft} disabled={hasEmptyContent}>
           자소서 초안 생성하기

(Step3처럼 PrimaryButton:disabled 스타일도 함께 추가해주면 좋아요!)

🤖 Prompt for 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.

In `@src/features/coverLetter/components/CoverLetterStep4.jsx` around lines 32 -
68, Update handleGenerateDraft and the “자소서 초안 생성하기” PrimaryButton so draft
generation is disabled when every question’s trimmed content is empty, matching
Step3’s title validation pattern. Pass the disabled state to PrimaryButton and
add the corresponding disabled styling consistent with Step3, while preserving
generation when at least one question contains content.
🤖 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.

Outside diff comments:
In `@src/features/coverLetter/components/CoverLetterStep5.jsx`:
- Around line 1-50: Connect selectedIds to a meaningful action in
CoverLetterStep5 by adding a button that copies the selected draft answers
together, using the existing handleCopy logic or an equivalent multi-item
handler; ensure the action is disabled or safely handles an empty selection. If
multi-copy is out of scope, remove selectedIds, isAllSelected,
handleToggleSelectAll, the select-all button, and the selected prop instead of
keeping nonfunctional selection UI.

In `@src/pages/ai/CoverLetterPage.jsx`:
- Around line 55-101: 페이지 컴포넌트의 상태와 비즈니스 로직이 과도하게 집중되어 있으므로,
`features/coverLetter/hooks`에 `useCoverLetterFlow` 커스텀 훅을 추가해 `title`,
`questions`, `draftAnswers`, `draftVariant`, `activeQuestionId` 상태와
`handleGenerateDrafts`, `handleRegenerateDrafts`, `handleFinish`, `goBack`,
`renderStep` 로직을 이동하세요. 훅은 페이지가 렌더링에 필요한 상태와 핸들러를 반환하고, `CoverLetterPage`는 이를 받아
단계 UI를 렌더링하는 얇은 컴포넌트로 유지하세요.

---

Nitpick comments:
In `@src/features/coverLetter/components/CoverLetterStep4.jsx`:
- Around line 32-68: Update handleGenerateDraft and the “자소서 초안 생성하기”
PrimaryButton so draft generation is disabled when every question’s trimmed
content is empty, matching Step3’s title validation pattern. Pass the disabled
state to PrimaryButton and add the corresponding disabled styling consistent
with Step3, while preserving generation when at least one question contains
content.

In `@src/pages/ai/CoverLetterPage.jsx`:
- Around line 77-87: In the case 5 branch of CoverLetterPage, guard the
activeIndex result from questions.findIndex before rendering CoverLetterStep6.
If activeIndex is -1, avoid passing questions[activeIndex] and follow the
existing safe fallback behavior; preserve the current rendering path when the
question is found.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 75bd2500-8fd7-448e-b34d-fe3636dfa147

📥 Commits

Reviewing files that changed from the base of the PR and between 79b8896 and 8b7bce0.

📒 Files selected for processing (5)
  • src/features/coverLetter/components/CoverLetterStep3.jsx
  • src/features/coverLetter/components/CoverLetterStep4.jsx
  • src/features/coverLetter/components/CoverLetterStep5.jsx
  • src/features/coverLetter/components/CoverLetterStep6.jsx
  • src/pages/ai/CoverLetterPage.jsx

@nayeon653 nayeon653 self-assigned this Jul 26, 2026
dearosmar
dearosmar previously approved these changes Jul 27, 2026
@nayeon653
nayeon653 merged commit 6b159dd into main Jul 29, 2026
3 checks passed
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.

[feat] 자소서 제목 입력 페이지 추가

2 participants