mirror of
https://github.com/logseq/logseq.git
synced 2026-05-18 18:02:35 +00:00
Add Chokidar-backed Markdown Mirror file watching in the DB worker and start the watcher when Markdown Mirror is enabled. Regenerate mirror files on enable so external editors see current content immediately. Import a constrained set of mirror edits back into DB graphs: existing block content edits, new block insertion, block removal by omitted markers, page and journal creation from new files, page refs, and inline tags. Ignore mirror property edits and dangerous file delete/move events. Keep the importer strict: only Logseq '- ' list items are writable block boundaries, indented Markdown stays as block content, fenced code lines cannot create blocks, and unsupported top-level Markdown is rejected. Update ADR 0016 with this contract. Verified with: rtk bb dev:test -v frontend.worker.markdown-mirror-test; rtk bb dev:test -v frontend.worker.db-core-test/db-core-registers-all-thread-apis-test; Chokidar require smoke test from resources/.