fix: prevent match group expanders from collapsing on button click

Replace st.rerun() with on_click callbacks so decisions write to
session state before the natural rerun. Decided groups auto-collapse
with status in the label; undecided groups stay expanded. Added undo
button on decided groups.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-28 23:25:12 +00:00
parent b871ab24fc
commit 39e139d777
2 changed files with 42 additions and 31 deletions

View File

@@ -213,11 +213,7 @@ if uploaded is not None:
# Individual group cards
decisions = st.session_state["review_decisions"]
for i, group in enumerate(result.match_groups):
decision = match_group_card(group, df, group_num=i + 1)
if decision is not None:
decisions[group.group_id] = decision
st.session_state["review_decisions"] = decisions
st.rerun()
match_group_card(group, df, group_num=i + 1)
# Show decision summary
if decisions: