Skip to content

Improve Onenote importer reliability and observability - #550

Open
philou wants to merge 6 commits into
obsidianmd:masterfrom
philou:onenote-importer-robustness
Open

Improve Onenote importer reliability and observability#550
philou wants to merge 6 commits into
obsidianmd:masterfrom
philou:onenote-importer-robustness

Conversation

@philou

@philou philou commented May 7, 2026

Copy link
Copy Markdown
  • Fix: section fetch failure no longer aborts the whole import — a return in the error handler was replaced with continue, so a failing section is reported and skipped while remaining sections proceed normally.
  • Fix: handwritten note SVG files — filenames are now sanitized (removing characters invalid on some filesystems), and existing files are overwritten on reimport instead of throwing a "file already exists" error.
  • Fix: SVG write failures are now visible to the user — previously swallowed silently; they now appear in the import log alongside other failures.
  • Feature: import progress logging — [OneNote Importer]-prefixed console messages trace each section and note as it is imported, making it easier to diagnose where an import stalls or skips content.
  • Refactor: selectedIds stores full section context — previously a flat string[] of section IDs, it is now a SelectedSection[] that carries the full hierarchical path (notebook > section group > section). This eliminates a post-hoc tree walk to recover names, and makes all log and user-facing messages show the full path (e.g. Learning > History > Books) instead of just the section name.

philou added 6 commits May 7, 2026 14:56
To make it easier to debug. Also:
- Prefix console logs [OneNote Importer]
- create helper methods to get the name of sections when logging
…ntent

to make the overall import more robust
To fix errors when importing handwritten notes which name contains "/ \ :"
- import sanitizeFileName
- call sanitizeFileName when building the name of the svg file
… note

So that the user can understand what is missing
…existing file

To avoid staying with an old version
- extract a createOrOverwriteFile method
For easier diagnostic. Also:
- Refactor from SectionId to SelectedSection with id and path
- remove findSectionInfo and findSectionInfoIn methods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant