Repository navigation
refactor: persist recovery state and coordinate checkpoints (2/5) - #5917
Merged
Merged
Conversation
4 tasks done
This was referenced Oct 28, 2026
…eckpoints # Conflicts: # packages/desktop/src/main/preferences/index.ts # packages/desktop/src/shared/types/applicationState.ts # packages/desktop/src/shared/types/preferences.ts
This was referenced Oct 28, 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.
Refs #732, #3500, #5596.
Persist application metadata and per-document recovery records using atomic writes and validated data. The main-process registry owns document identities, live text, disk baselines and saved results. Checkpoints write recovery bodies before metadata references them; failed persistence preserves live contents and remains retryable.
Configuration/contracts PR #5918 is merged into develop (4c2fb08). This branch now includes that develop base. its review diff contains only 10 storage/checkpoint files; already merged preference UI, common identities and configuration types are excluded. The private old preference-storage adapter is gone.
Validation on 6f14374: all 1540 unit tests across 141 files, lint and typecheck pass locally. All 13 current-head CI checks pass. Covers interrupted writes, invalid data, stale renderer revisions, Save As, save/edit races and cleanup failures.
Review this PR next. #5916 and #5920 can be reviewed independently; #5922 connects the modules to Electron and is reviewed last. No design documents or screenshots are committed; documents remain in the agreed Desktop folder.
Private members use the repository's
_convention. Remove the unused registry close shortcut and service forwarding method; closing remains explicit and durable. Trim unused runtime window/session IDs, receipt sequence/recovery-version fields and the unused window-state provider contract. Recovery states use the sharedRecoveryStatusenum values, with identity, units, ownership and persistence-boundary comments.A restored named document without verified saved text now remains dirty when its entire contents are deleted. The regression failed before the fix and passes afterward; empty text must never imply a new untouched document.
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.