Repository navigation
0.8.0: the config window keeps no global config beside the global state (ObjectState 4) - #30
Merged
Conversation
ObjectState 4 makes the state registered at the global scope the one holder of the global config, so everything the window did to keep the stores in step with that state is derived and deleted: the live write on a code edit, the capture and restore of the stores beside the state checkpoint, the saved and live writes after mark_saved, the restore of the live store on cancel, and the dirty and saving flags that only guarded them. Requires objectstate>=4.0.0,<5 and formbridge>=0.1.4,<0.2. CHANGELOG.md lists each removed name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ObjectState 4.0.0 (OpenHCSDev/ObjectState#56) makes the state registered at the global scope the one holder of the global config: an edit of that state is the live global config,
mark_savedis the saved one,restore_savedand a checkpoint restore put both back. Everything the config window did to keep the old stores in step with the state is therefore derived, and is deleted.Deleted from
pyqt_reactive.windows.config_window, with the reasonConfigEditSession.apply_code_edit_context(wrote the live store on a code edit)GlobalConfigContextCheckpoint,capture_global_context,restore_global_context(store captured and put back beside the state checkpoint insave_config)ObjectStateTransactionCheckpoint.restore(state)restores the global statepublish_saved_global_config(saved and live writes aftermark_saved)mark_savedis the saverestore_global_context_if_dirty,_original_live_global_config(live store put back on cancel)restore_savedon the stateglobal_context_dirty,mark_global_field_changedand itsparameter_changedconnectionsaving,begin_save_callback,end_save_callbackmark_global_field_changedis_global_configConfigWindow._apply_config_from_code_documentCodeEditorFormUpdater.update_form_from_instanceNo other caller of the removed ObjectState names in
src(grep for every removed name);tests/test_provenance_navigation.pyrenamesset_global_config_for_editingtoset_global_config.Test
tests/test_config_window.py::test_global_config_follows_the_window_through_edit_cancel_save_and_failed_save: through a window on the registered global state, a code edit, a cancel, a save the participant refuses and a save move the live and the saved global config and what a registered descendant inherits, with nothing but the state.Callers
Removed public members of
ConfigEditSession, so this is 0.8.0. OpenHCStests/unit/pyqt_gui/test_config_window_transaction.pyuses several of them (listed for the OpenHCS bump). Behaviour: a window whose global-config state is not registered at the global scope no longer changes the global config.Requires
objectstate>=4.0.0,<5,formbridge>=0.1.4,<0.2. Full suite in a fresh venv with both from PyPI: 594 passed, 1 skipped. Ruff fatal checks and the added-lines check pass.🤖 Generated with Claude Code