From 73b895c613846cee4565b5be984b48333f2a8412 Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Wed, 29 Apr 2026 13:17:44 +0900 Subject: [PATCH] =?UTF-8?q?fix(study):=20=EC=83=88=20=ED=9A=8C=EC=B0=A8=20?= =?UTF-8?q?=EC=A7=84=EC=9E=85=20=EC=8B=9C=20dropdown=20=EC=97=90=20(?= =?UTF-8?q?=EC=8B=A0=EA=B7=9C)=20=EC=98=B5=EC=85=98=20=ED=91=9C=EC=8B=9C?= =?UTF-8?q?=20=E2=80=94=20mode=20=EC=A0=84=ED=99=98=20=EB=8C=80=EC=8B=A0?= =?UTF-8?q?=20=EC=98=B5=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 이전 fix(4c26b91)는 query 회차명이 examRounds 에 없을 때 mode='new' 자동 전환했지만, 사용자 화면은 여전히 select 모드 노출 (캐시 또는 동선 이슈). 더 직관적인 방식으로 수정: - onMount 의 mode='new' 자동 전환 제거. - select dropdown markup 에 query 회차가 examRounds 에 없으면 "(신규)" 라벨 옵션 추가. - 사용자는 select 모드 그대로 유지하면서 신규 회차도 보임. 폼 제출 시 그 값 그대로 박힘. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../study/topics/[id]/questions/new/+page.svelte | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/frontend/src/routes/study/topics/[id]/questions/new/+page.svelte b/frontend/src/routes/study/topics/[id]/questions/new/+page.svelte index 92fcfcb..37cbc9f 100644 --- a/frontend/src/routes/study/topics/[id]/questions/new/+page.svelte +++ b/frontend/src/routes/study/topics/[id]/questions/new/+page.svelte @@ -203,15 +203,6 @@ f_qnum = found.next_question_number; } } - // FIX: 새 회차 시작 동선 — query 로 받은 회차명이 기존 examRounds 에 없으면 - // 신규 회차로 보고 mode='new' + new input 에 채움 (dropdown 에 옵션이 없어서 안 보이는 회귀 차단). - if (f_exam_round) { - const exists = examRounds.some((r) => r.exam_round === f_exam_round); - if (!exists) { - f_exam_round_mode = 'new'; - f_exam_round_new = f_exam_round; - } - } // 진입 시점은 사용자가 input 박스를 만진 적 없음 — false 로 reset. f_qnum_user_edited = false; // $effect 의 lastExamRound 를 현재 값으로 sync — 첫 실행이 또 reset 하지 않도록. @@ -481,6 +472,11 @@ {r.exam_round} ({r.question_count}{topicExamRoundSize ? `/${topicExamRoundSize}` : ''}) {/each} + + {#if f_exam_round && !examRounds.some((r) => r.exam_round === f_exam_round)} + + {/if}