Improve Onenote importer reliability and observability - #550
Open
philou wants to merge 6 commits into
Open
Conversation
philou
commented
May 7, 2026
- 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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.