Repository navigation
Block day switch on failed autosave; refresh toolbar on editor swap - #47
Merged
Merged
Conversation
…or swap - flushNow now reports whether everything was saved; openDate and switchNotebook abort when unsaved content is still pending so the dirty editor is never destroyed and its text lost (#20). - createToolbar returns a refresh function; openDate calls it so table-only toolbar buttons no longer stay visible after switching away from a date that had a table (#19). Co-authored-by: setzor <setzor@users.noreply.github.com>
setzor
marked this pull request as ready for review
October 27, 2026 04:39
This was referenced Oct 27, 2026
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
Autosave.flushNow()now returns whether everything was saved.openDateandswitchNotebookabort when a save failed and content is still dirty, so the dirty editor is never destroyed and unsaved text stays in memory (the existing "save failed" status hint plus the still-mounted editor keep it addressable).createToolbarnow returns itsupdate()function;openDatecalls it after mounting the new editor, so table-only buttons are hidden immediately when switching away from a date that had a table (previously they stayed visible until the nextselectionchange/cursor move).Verification
pnpm test— 17 files, 80 tests passed (incl. new tests:flushNowfalse on persistent save failure / true once saved; toolbar refresh hidesinTableOnlybuttons after editor swap).pnpm typecheckandpnpm buildpass.Closes #20
Closes #19