Skip to content

Stabilize widget settings restore and async loading behavior#14

Merged
d-chambers merged 6 commits intomainfrom
slanrod_ux
Apr 7, 2026
Merged

Stabilize widget settings restore and async loading behavior#14
d-chambers merged 6 commits intomainfrom
slanrod_ux

Conversation

@d-chambers
Copy link
Copy Markdown
Contributor

Summary

This PR introduces a shared settings-to-controls restore pattern in the widget base classes and applies it to the
widgets that were drifting most often between persisted settings, visible controls, and runtime execution state. It
also tightens async loading indicators and hardens several Spool and Waterfall restore/error paths.

What changed

Shared widget lifecycle

  • Added explicit settings/control lifecycle hooks to ZugWidget:
    • _apply_settings_to_controls()
    • _sync_settings_from_controls()
    • _rebind_dynamic_controls()
  • Added shared helper methods for safe control hydration without firing callbacks.
  • Kept async spinner behavior general across DerZug async widgets via the shared base class.
  • Updated PatchDimWidget to rebind dim-dependent controls through the shared dynamic-control hook.

Spool

  • Refactored Spool to use explicit hydrate/sync/rebind phases.
  • Fixed restore drift where saved chunk settings could be applied by execution while the UI stayed blank or stale.
  • Separated chunk_enabled from remembered chunk parameter values.
  • Preserved prior values when chunking is disabled instead of clearing them.
  • Fixed cold-restore behavior so invalid saved transforms fall back to the loaded source instead of leaving the
    widget empty.
  • Fixed source-switch behavior so a new failing transform does not leave the old table visible.
  • Preserved compatibility with the newer recent-directory input changes and restored a compatibility alias for
    file_path_edit.

Coords / Select / Waterfall

  • Moved visible-control hydration and dynamic rebinding into explicit hooks where restore drift was real.
  • Kept Coords sync intentionally narrow so invalid or not-yet-available saved values are not erased during patch
    rebinding.
  • Updated Waterfall restore/control sync to use the shared hook pattern.
  • Corrected Waterfall.reset_on_new behavior so coordinate changes reset the view, while ordinary patch replacements
    can still preserve view range when appropriate.

Why

Several widgets had the same failure mode:

  • persisted settings said one thing
  • controls showed another
  • runtime execution used a third

This PR establishes a consistent restore contract in the base classes and applies it first to the highest-risk
widgets so saved workflows, live controls, and execution behavior stay aligned.

@d-chambers d-chambers merged commit 3ad8449 into main Apr 7, 2026
9 checks passed
@d-chambers d-chambers deleted the slanrod_ux branch April 7, 2026 11:59
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