From 447f067ae9c73da782fb8584f2196808b9ad329e Mon Sep 17 00:00:00 2001 From: th-kim0823 Date: Mon, 27 Apr 2026 21:23:10 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20admin=20stage=20=EC=A7=84=ED=96=89=20?= =?UTF-8?q?=E2=80=94=20radio=20+=20=EC=A0=81=EC=9A=A9=20=EB=B2=84=ED=8A=BC?= =?UTF-8?q?=20=EC=A0=9C=EA=B1=B0=20(session=5Fstate=20mismatch=20=EB=B2=84?= =?UTF-8?q?=EA=B7=B8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 이전/다음 두 버튼만 유지. radio key 고정으로 stage 변경 후 session_state가 stale → 적용 버튼이 의도치 않게 뜨던 문제 제거. Co-Authored-By: Claude Opus 4.7 (1M context) --- app.py | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/app.py b/app.py index e2eed6b..093ac7e 100644 --- a/app.py +++ b/app.py @@ -644,26 +644,22 @@ def render_admin(): stage_order = list(VALID_STAGES) # ("intro", "topics", "vote") idx = stage_order.index(cur) if cur in stage_order else 0 - sc1, sc2, sc3 = st.columns(3) + sc1, sc2 = st.columns(2) with sc1: - if st.button("← 이전 stage", disabled=(idx == 0)): + if st.button( + "← 이전 stage", + disabled=(idx == 0), + use_container_width=True, + ): set_stage(stage_order[idx - 1]) st.rerun() with sc2: - chosen = st.radio( - "직접 선택", - stage_order, - index=idx, - horizontal=True, - label_visibility="collapsed", - key="stage_radio", - ) - if chosen != cur: - if st.button("적용", key="stage_apply"): - set_stage(chosen) - st.rerun() - with sc3: - if st.button("다음 stage →", disabled=(idx == len(stage_order) - 1)): + if st.button( + "다음 stage →", + disabled=(idx == len(stage_order) - 1), + type="primary", + use_container_width=True, + ): set_stage(stage_order[idx + 1]) st.rerun()