피드백 대기를 이벤트 기반으로 — FEEDBACK_READY 구독 + 스켈레톤 - #204
Merged
Conversation
- 생성 대기 화면이 정적 텍스트 2줄뿐이라 최대 2분간 움직임이 없어 '멈췄나?' 로 읽혔다 — 리포트가 올 자리의 형태 + 경과 초 표시로 교체 - '완성되면 자동으로 표시됩니다' 안내는 후속 커밋의 FEEDBACK_READY 구독이 보장
- 백엔드가 session·user 채널로 발행하는 FEEDBACK_READY 를 프론트가 소비하지 않아(라이브 WS 는 세션 종료 시 닫힘) 피드백 대기가 3s 간격 404 폴링 최대 40회로만 동작했다 - useFeedbackLive: 세션 채널 SSE 구독 → 수신 즉시 재조회, 피드백 도착 시 스트림 종료. 표시 중 데이터를 늦은 이벤트가 리셋하지 않게 캐시 가드 - 폴링은 백스톱으로 강등 — 스트림 정상 15s / 단절 3s, 총 예산 ≈2분 유지 (소진 시 기존 재생성 복구 UI, 문구·주석 정합) - 세션 stream token 은 interview 슬라이스 소유라 페이지가 getToken 주입 (FSD 동일 레이어 금지), fetchSessionStreamToken 을 public API 로 승격 - 테스트 5케이스 (즉시 재조회·스트림 종료·늦은 이벤트 무시·스켈레톤)
3 tasks
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.
왜
FEEDBACK_READY는 백엔드가 세션·유저 두 채널로 발행하는데(FeedbackCallbackService) 프론트 소비처가 사실상 없었다 — 라이브 WS 의 redirect 경로는 세션이 끝나면 소켓이 닫혀(enabled: status === 'IN_PROGRESS') 발화하지 않는다. 그래서 피드백 페이지는 3초 간격으로 404 를 최대 40번 두드리는 폴링이 유일한 인지 수단이었고, 대기 화면은 정적 텍스트 2줄('최대 1분' — 실제 예산 2분과 불일치)이라 멈춘 것처럼 보였다.무엇
useFeedbackLive— 피드백 쿼리 + 세션 채널 SSE(/realtime/stream/sessions/{id}) 구독.FEEDBACK_READY수신 즉시 재조회(resetQueries— 재시도 대기를 끊고 바로 fetch), 피드백 도착 시 스트림 자동 종료. 데이터 도착~스트림 close 사이 좁은 창에서 늦게 온 이벤트가 표시 중 리포트를 스켈레톤으로 되돌리지 않도록 캐시 가드.getToken을 주입하고 feedback 은 interview 를 import 하지 않는다.fetchSessionStreamToken을 interview public API 로 승격.검증
npm run test159/159,npm run build성공,npm run lint0.