mohio

Review, History, Publish, and Sync

This document describes Mohio’s current Git-backed snapshot history, automatic syncing, and incoming-change sync behavior.

Scope

Collaboration Service

Main-process collaboration behavior is implemented in desktop/src/main/git-collaboration.ts.

The service wraps Git operations for:

Snapshot Commits

Mohio writes regular Git commits (no custom checkpoint refs or .git/mohio metadata).

Every Mohio-created commit uses one message format:

Legacy custom checkpoint artifacts are cleaned up automatically when the collaboration service initializes.

Material-Change Guard

Mohio only writes commits when there is real Markdown diff material:

Snapshot Triggers

Snapshot commits are attempted at these moments:

Sync Behavior

Automatic Sync

When Mohio writes a snapshot commit, it immediately attempts a background push:

If syncing fails, the local commit is still kept.

Manual Sync

The top bar includes an explicit Sync status action (to the left of the right-panel toggle).

When the sync status action is clicked:

  1. Mohio attempts a forced snapshot commit
  2. Mohio pushes local commits if there is anything ahead
  3. Mohio returns a synced timestamp when a push succeeds

Top-bar status states:

Incoming Changes and Conflict Workflow

Sync Triggers

Incoming sync checks run:

Safe Apply Path

When incoming commits exist and merge cleanly:

Overlap Path

When incoming and local edits overlap:

After all files are resolved, Mohio finalizes with a snapshot commit and returns sync state to idle.

Versions Panel

Right sidebar tabs:

Versions panel capabilities for the selected document:

API Surface

window.mohio collaboration methods include:

Current Limitations

Code Anchors