mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-11-30 01:00:27 +03:00
Markdown, HTML and Word imports silently dropped a file when it could not be read or converted: the per-file loop only kept files that returned a doc id, and the file picker's snapshot step dropped unreadable files with a `console.error`. The dialog then reported "Import completed". This change: - moves snapshotting of picked files into the importer (`snapshotReadableFiles`, already used by the Obsidian import), which records unreadable files as warnings; the picker no longer has a `snapshot` option - records files the converter returned no doc for as `skipped_doc` warnings - shows "Import completed with warnings" and the list of warnings instead of the success message when there are any - sets `sourcePath` on Markdown zip docs so skipped entries are named by path instead of a generated id fix #15718 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Import status now reports when files are skipped, unreadable, or only partially imported. * Imported Markdown documents retain their source paths within the archive. * File and directory pickers can use the standard browser picker instead of the File System Access API. * **Bug Fixes** * Importing multiple files now handles unreadable files and files that cannot be converted without interrupting the remaining imports. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: DarkSky <darksky2048@gmail.com>