Repository navigation
fix(persist): Bind session writes to their repository and stack - #48
Merged
Merged
Conversation
The save/restore event tests wrote to the same repository store as persist_sessions_spec, which runs in a parallel process, so an async save here could overwrite fixtures there with a stale snapshot. Each test now runs from its own temporary git repository and removes its store file.
…ed in The store resolved its file from the current directory on every read and write, so starting an async save in repository A and running :cd B before it finished wrote A's sessions over B's store and dropped B's sessions. - Resolve the store file once when a save, restore, list, delete or rename is requested and carry it through the update queue, read, write and cache refresh; the store module now takes a file path instead of a scope. - Key the session cache by store file so a listing after a directory change no longer returns the previous repository's sessions. - Cover save, delete, rename and queued updates across a directory change with real store files in two temporary repositories.
…window save_on_leave() fell back to the current window once the debounced save had run, so moving to an empty split and quitting overwrote the auto session with zero items while the original stack still held popups. - Track the stack to save (root window and store file) separately from the debounce state, and save that stack on leave; skip the leave save when no stack changed during the session. - Resolve the store file when a change is observed, flush a pending save before a change for another stack or store replaces it, and bind each timer callback to the target it debounced. - Skip saving once the tracked root window is closed instead of saving the current window's unrelated stack, and document the auto session target.
mhiro2
force-pushed
the
fix/persist-save-target
branch
from
October 2, 2026 23:48
ed12903 to
eace374
Compare
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.
Summary
:cdduring an async save, delete or rename no longer overwrites another repository's sessions.Changes