This document describes Mohio’s current Git-backed snapshot history, automatic syncing, and incoming-change sync behavior.
Versions commit listMain-process collaboration behavior is implemented in desktop/src/main/git-collaboration.ts.
The service wraps Git operations for:
Mohio writes regular Git commits (no custom checkpoint refs or .git/mohio metadata).
Every Mohio-created commit uses one message format:
Snapshot: <ISO date>Legacy custom checkpoint artifacts are cleaned up automatically when the collaboration service initializes.
Mohio only writes commits when there is real Markdown diff material:
git status --porcelain -z -- *.md *.markdown *.mdxgit addSnapshot commits are attempted at these moments:
Idle Pulse: after ~3 minutes of editor inactivity following draft changesContext Switch: before switching to another documentAssistant Dispatch: before sending a message to CodexSafety Guard: before delete, before rename/move save, and before incoming merge applyFocus Loss: when the app window loses focusApplication Exit: before quitWhen Mohio writes a snapshot commit, it immediately attempts a background push:
git push when an upstream is configured and local branch is aheadgit push -u origin <branch> when upstream is not configured yetIf syncing fails, the local commit is still kept.
The top bar includes an explicit Sync status action (to the left of the right-panel toggle).
When the sync status action is clicked:
Top-bar status states:
Synced <relative time> with refresh iconSyncing... with spinning refresh iconSync paused with alert iconOffline (last synced <relative time>) with muted globe-off iconIncoming sync checks run:
When incoming commits exist and merge cleanly:
--no-ff --no-commit)idleWhen incoming and local edits overlap:
conflictKeep localKeep incomingCombine manuallyAfter all files are resolved, Mohio finalizes with a snapshot commit and returns sync state to idle.
Right sidebar tabs:
AssistantVersionsVersions panel capabilities for the selected document:
git log -- <path>window.mohio collaboration methods include:
recordRiskyCommit(input)recordAutoSaveCommit()listCommitHistory(relativePath | null)getUnpublishedDiff(relativePath)getPublishSummary()syncWorkspaceChanges()getAutoSyncStatus()syncIncomingChanges(reason)getSyncState()resolveSyncConflict(input).md, .markdown, .mdx)desktop/src/main/git-collaboration.tsdesktop/src/main/index.tsdesktop/src/shared/mohio-api.ts, desktop/src/shared/mohio-types.tsdesktop/src/renderer/App.tsx