feat: 같은 설정으로 다시 면접 (재도전) - #176
Merged
Merged
Conversation
면접이 끝나거나 중단된 뒤 다음 행동이 "같은 조건으로 한 번 더"인데, 그러려면 설정 화면에서
모드·직군·질문 수·자료·JD 를 처음부터 다시 고르게 했다. 버튼 하나로 줄인다.
## 왜 서버 엔드포인트인가
`SessionResponse` 가 생성에 필요한 필드를 이미 전부 노출하고 있어서 프론트만으로도 가능해
보였지만, `linkContexts` 가 삭제된 문서에 `DOC_NOT_FOUND`(404), 분석 미완료에
`DOC_NOT_ANALYZED` 를 던진다. 원본 설정을 그대로 재전송하면 **그 사이 이력서 하나 지운
사용자는 재도전이 이유 없이 실패**한다. 무엇이 아직 살아있는지 아는 건 서버라서 거기서 정리한다.
- `POST /api/sessions/{id}/retry` → 201. 설정 복사 + 살아있고 ANALYZED 인 자료만 재연결
- 빠진 자료는 응답 `contextDocumentIds` 를 원본과 비교하면 드러난다 → 프론트가
"삭제된 자료 N개는 제외하고 시작합니다" 로 알린다. 모르고 시작하면 질문 근거가 달라진 걸
알 수 없다
## 프론트
- `useRetrySession(sourceContextCount?)` — 성공 시 새 세션으로 이동, 자료가 줄었으면 안내
- CTA 위치: 종료 패널(완료·중단 모두)과 피드백 화면 헤더. 중단 세션에서는 primary 로 —
피드백이 없으니 재도전이 사실상 유일한 다음 행동이다
## 테스트
- `SessionServiceTest` +3 — 설정 복사(JOB_TAILORED 의 JD 포함), 삭제·재분석 중 자료 제외,
타인 세션 거부
- `SessionEndedPanel.test.tsx` 신설 (5) — 완료/중단/취소별 기록·링크 노출, 재도전 호출,
자료 수 전달
backend `test` 통과, frontend vitest 86/86 · eslint 0 · tsc · build 통과.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경 사항
감사 백로그 B-2. 면접이 끝나거나 중단된 뒤 자연스러운 다음 행동은 "같은 조건으로 한 번 더"인데, 그러려면 설정 화면에서 모드·직군·질문 수·자료·JD 를 처음부터 다시 고르게 했다. 버튼 하나로 줄인다.
왜 서버 엔드포인트인가
처음엔 프론트만으로 될 줄 알았다 —
SessionResponse가 생성에 필요한 필드를 이미 전부 노출한다(mode·jobCategories·maxQuestions·generalQuestionCount·maxFollowupsPerQuestion·contextDocumentIds·targetCompanyName·targetJobDescription). 그런데SessionService.linkContexts를 보면:원본 설정을 그대로 재전송하면 그 사이 이력서 하나 지운 사용자는 재도전이 404 로 이유 없이 실패한다. 무엇이 아직 살아있는지 아는 건 서버라서 거기서 정리하는 게 맞다.
POST /api/sessions/{id}/retry→ 201. 설정을 복사하고 지금도 살아있으며 ANALYZED 인 자료만 다시 잇는다contextDocumentIds를 원본과 비교하면 드러난다 → 프론트가 "삭제된 자료 N개는 제외하고 시작합니다" 로 알린다. 조용히 빼면 질문 근거가 달라진 걸 사용자가 알 수 없다retry는create를 그대로 호출하므로 JD 필수 검증·질문 수 정합성 검증·SessionCreatedEvent(질문 풀 생성 트리거)가 전부 동일하게 적용된다.프론트
useRetrySession(sourceContextCount?)— 성공 시 새 세션으로 이동, 자료가 줄었으면 토스트로 안내직전 PR(#175)에서 "중단 세션 화면에 재도전 CTA 를 붙이면 자연스러운 자리"라고 적었던 그 자리다.
테스트
SessionServiceTest+3 — 설정 복사(JOB_TAILORED 의 회사명·JD 포함), 삭제·재분석 중 자료 제외, 타인 세션 거부SessionEndedPanel.test.tsx신설 (5) — 완료/중단/취소별 기록·링크 노출, 재도전 호출 인자, 자료 수 전달backend
test통과 (ArchUnit 포함), frontend vitest 86/86 · eslint 0 · tsc · build 통과.영향 범위
POST /api/sessions/{id}/retry)리뷰어 체크포인트