Skip to content

fix: preserve hidden inputs and fallback freshness - #12

Merged
Rigare merged 2 commits into
mainfrom
fix/hidden-values-fallback-freshness
Nov 12, 2026
Merged

Rigare merged 2 commits into
mainfrom
fix/hidden-values-fallback-freshness

Conversation

@Rigare

@Rigare Rigare commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

When optional controls disappeared, Streamlit discarded their numeric widget state. Keep finger radius/Z and manual box dimensions in independent session keys, with callbacks that also preserve edits submitted while hiding the controls. Values survive shape and language switches; disabled options still apply automatic dimensions/default recess settings.

Include the active figure.stl content hash in result freshness checks when no upload is present. Replacing, removing or losing read access to that file marks old output stale; read failures are reported on Generate. Uploaded inputs keep their own content identity.

Clarify the lightweight preview contract in README and the shipped helper docstring: planar surfaces may be drawn, while generation repairs and validates solids. Do not use signed volume of an unrepaired mesh as a preview validity check.

Validation:

  • Python 3.13.5, pinned requirements-dev.txt.
  • Full pytest: 558 passed in 67.43 s..
  • AppTest covers both languages, visible/hidden language changes, all six numeric fields, combined edit/hide events, applied disabled/box/cylinder Config, fallback regeneration/removal/read failures, upload precedence and existing session/cache isolation.
  • Pyrefly 1.4.1: 0 errors in all four touched Python files; full-project diagnostics decrease from 32 on main to 31 pre-existing test diagnostics.
  • Independent review findings fixed and rechecked. Local Docker unavailable; repository CI validates test/runtime images and the health check.

Refs: OPE-8. No merge, release or deployment.

@Rigare
Rigare merged commit 071aa20 into main Nov 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant