Skip to content
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
MLFlexer:mainfrom
fireboy1919:feat/event-driven-save
Open

feat(state_manager): add event_driven_save for immediate saves on structural changes#137
fireboy1919 wants to merge 1 commit into
MLFlexer:mainfrom
fireboy1919:feat/event-driven-save

Conversation

@fireboy1919

@fireboy1919 fireboy1919 commented Mar 12, 2026

Copy link
Copy Markdown

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 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 using OSC 1337 shell
integration).

Also keeps current_state up to date 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.

…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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant