mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-11-26 07:42:57 +03:00
#### PR Dependency Tree * **PR #15854** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added workspace document lifecycle tracking, including trashed and deleted states, with migration support. * Added workspace inventory syncing and state refresh across cloud and local storage, improving document discovery and offline synchronization. * Added clearer messages for invalid or oversized document updates and temporarily unavailable sync or validation. * Added paused-upload diagnostics and a Quick Export shortcut for relevant workspace sync issues. * **Improvements** * Search, indexing, and document metadata now reflect workspace inventory and lifecycle state. * Restoring from history preserves concurrent edits made during recovery. * Unused-blob checks now scan document content and detect changes during scanning. * **Bug Fixes** * Invalid document updates are rejected without partially saving a batch. * Document reading handles missing or cyclic block relationships more reliably. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Affine Blocksuite format YDoc reader
Usage
read rootYDoc
import { readAllDocsFromRootDoc } from '@affine/reader';
const docs = readAllDocsFromRootDoc(rootDoc);
console.log(Array.from(docsWithTrash.entries()));
// [
// 'doc-id-1', { title: 'test doc title' },
// // ...
// ]
read YDoc
import { readAllBlocksFromDoc } from '@affine/reader';
const blocks = readAllBlocksFromDoc(doc);