mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-21 23:50:45 +00:00
The Vault notes rich editor parses note content as MDX. Some valid CommonMark is not valid MDX — most commonly an unbalanced angle tag such as `mysql -h <host> -u <user>` written in prose. When mdxeditor fails to import the markdown it clears the lexical document and only reports the failure through its onError callback, which netcatty never wired up. The note then rendered as an empty editor with just the placeholder, while the content was still intact in the vault (export/copy still worked). This is exactly the note-view half of #3167: the AI wrote a skill document into Vault → Notes, the note showed no content, and exporting it produced a complete markdown file. The editor now listens to MDXEditor's onError and falls back to the raw markdown source view with a short notice, so the content is always visible (and editable) instead of silently blank. Recovery is deterministic: switching note or editor mode retries the rich import, and the notice offers an explicit retry. Co-Authored-By: Claude <noreply@anthropic.com>