This repository was archived by the owner on May 24, 2026. It is now read-only.
feat(state_manager): add event_driven_save for immediate saves on structural changes - #137
Open
fireboy1919 wants to merge 1 commit into
Open
feat(state_manager): add event_driven_save for immediate saves on structural changes#137fireboy1919 wants to merge 1 commit into
fireboy1919 wants to merge 1 commit into
Conversation
…uctural changes Adds resurrect.state_manager.event_driven_save(opts) as a complement to periodic_save. Instead of a timer, it saves whenever pane/tab structure changes (detected via pane-focus-changed) and optionally on shell-reported events via user-var-changed (e.g. directory changes with OSC 1337 shell integration). Also updates current_state on every save so that resurrect_on_gui_startup always has a fresh workspace to restore. Documents the new function, its opts, the shell integration pattern, and the two new events in the README.
5 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
feat(state_manager): add event_driven_save for immediate saves on structural changes
Adds
resurrect.state_manager.event_driven_save(opts)as a complement toperiodic_save. Instead of a timer, it saves whenever pane/tab structurechanges (detected via
pane-focus-changed) and optionally on shell-reportedevents via
user-var-changed(e.g. directory changes using OSC 1337 shellintegration).
Also keeps
current_stateup to date on every save so thatresurrect_on_gui_startupalways has a fresh workspace to restore.Documents the new function, its opts, the shell integration pattern, and
the two new events in the README.