Skip to content

refactor: persist recovery state and coordinate checkpoints (2/5) - #5917

Merged
Jocs merged 13 commits into
developfrom
feat/startup-04-checkpoints
Oct 28, 2026
Merged

Jocs merged 13 commits into
developfrom
feat/startup-04-checkpoints

Conversation

@Jocs

@Jocs Jocs commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

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 shared RecoveryStatus enum 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.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Build artifacts for PR #5917:

Run: https://github.com/marktext/marktext/actions/runs/40637334892

Artifact Size Link
marktext-windows-arm64 327.3 MB Download
marktext-linux-x64 729.5 MB Download
marktext-linux-arm64 571.7 MB Download
marktext-macos-arm64 320.8 MB Download
marktext-macos-x64 332.5 MB Download
marktext-windows-x64 335.5 MB Download

@Jocs Jocs changed the title refactor: coordinate document checkpoints and durable endings (4/10) refactor: persist recovery state and coordinate checkpoints (2/5) Oct 28, 2026
Jocs added 4 commits October 28, 2026 10:28
…eckpoints

# Conflicts:
#	packages/desktop/src/main/preferences/index.ts
#	packages/desktop/src/shared/types/applicationState.ts
#	packages/desktop/src/shared/types/preferences.ts
@Jocs
Jocs merged commit e9b6bfb into develop Oct 28, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant