Spaces:
Sleeping

Menixis Claude Opus 4.7 (1M context) commited on
Commit
7061b19
·
1 Parent(s): 14e571e

Hide Step 3 box when a previous step is edited

Browse files

Gate the Step 3 download box on has_generated (file exists AND current inputs
still match the generated snapshot) instead of just generated_file. Editing any
earlier field now flips has_generated False, so the stale download box disappears
- consistent with how the step indicator already regresses.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. streamlit_app.py +3 -1
streamlit_app.py CHANGED
@@ -1264,8 +1264,10 @@ with right_col:
1264
 
1265
  # =============================================================================
1266
  # Step 3 — Download (its own box, full-width below Steps 1 & 2)
 
 
1267
  # =============================================================================
1268
- if st.session_state.generated_file:
1269
  step3_box = st.columns([1])[0]
1270
  with step3_box:
1271
  st.markdown("""
 
1264
 
1265
  # =============================================================================
1266
  # Step 3 — Download (its own box, full-width below Steps 1 & 2)
1267
+ # Shown only while the current inputs still match the generated document; editing
1268
+ # a previous step makes has_generated False, so this box disappears.
1269
  # =============================================================================
1270
+ if has_generated:
1271
  step3_box = st.columns([1])[0]
1272
  with step3_box:
1273
  st.markdown("""