feat(stats): 질문 revision 기반 반응 통계 및 대시보드 추가 - #235
Merged
Conversation
daily_questions의 현재 상태를 revision 1 baseline으로 저장하고 이후 질문 수정 이력을 보존할 수 있도록 구성함. baseline 이후의 INITIAL·REROLL 노출만 기록하도록 제한함
V1·V2 질문 할당과 교체 시 INITIAL·REROLL 노출을 저장하고 답변 시 노출 revision을 AnswerEntry에 연결함. baseline 이전 할당은 자동 편입하지 않으며 질문 조회와 LLM 입력이 실제 노출 revision을 사용하도록 수정함
질문별 누적 노출·답변·교체·미응답과 답변 비율을 집계함. daily_question_revisions 기준 LEFT JOIN으로 노출이 없는 revision도 수정 이력에 포함하고 선택 질문의 전체 합계 ViewModel을 제공함
/stats/question에서 질문 ID·문구 검색과 전체 및 revision별 노출·답변·교체·미응답 지표를 조회하도록 추가함. 모든 stats 화면에 질문 탭을 연결하고 Revision·baseline 해석 가이드, 반응형 검색 결과 목록, MVC 템플릿 회귀 테스트를 함께 추가함
Question ID별 현재 Revision 반응과 전체 Revision 누적을 분리 집계하는 read model을 추가함. 질문 검색·관심사·레벨·활성 상태·최소 노출 필터와 반응 지표별 정렬을 지원하고 repository 통합 테스트와 service 테스트로 집계 및 표본 필터 동작을 검증함
현재 Revision 반응과 전체 Revision 누적을 비교하는 전체 질문 현황 표를 추가하고 검색·필터·양방향 정렬 및 상세 화면 이동을 지원함. 질문 상세를 기본 탭으로 유지하고 오름차순 화살표를 빨간색으로 구분하며 조회 조건 검증과 Thymeleaf 렌더링 테스트를 보강함
전체 질문 현황의 필터·정렬 조건을 재사용하는 Excel 호환 CSV 다운로드를 구현하고, 최초 Revision 1 적용 시각을 질문 반응 통계의 집계 시작 기준으로 표시함
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.
📝 요약(Summary)
주요 변경사항
질문 revision 및 노출 데이터 모델
daily_questions.current_revision_no,daily_question_revisions,daily_question_exposures를 추가했습니다.answer_entries.question_revision_id를 추가해 신규 답변이 실제 노출된 revision을 참조하도록 했습니다.ON DELETE SET NULL을 적용했습니다.할당·교체·답변 흐름
AnswerEntry에 연결합니다.질문 반응 통계
통계 대시보드 및 CSV
검증
git diff --check통과DailyQuestionRevisionRepositoryTest통과DailyQuestionExposureRepositoryTest통과DailyQuestionExposureServiceTest통과QuestionCommandExposureServiceTest통과DailyReportTxServiceTest통과DailyReportServiceTest통과QuestionStatsRepositoryTest통과QuestionStatsServiceTest통과StatsControllerTemplateTest통과DailyQuestionOverviewCsvExporterTest통과참고 / 리스크
V20260825_1200적용 전에 생성된 할당과 답변은 추정하거나 현재 revision에 소급하지 않습니다.🔗 Related Issue
💬 공유사항
✅ PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.