fix: resolve TypeScript build errors and add E2E test

- Fix type annotations in App.tsx (setTabs callback)
- Cast restoreWikilinksInBlocks result in Editor.tsx for BlockNote compatibility
- Fix vi.fn() mock types in useAutoSave.test.ts
- Add E2E test verifying editor loads and renders note content
- Update .claude-done with editor-save-bug summary

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
lucaronin
2026-02-23 15:01:48 +01:00
parent 0e7865c667
commit 0053d3b985
5 changed files with 76 additions and 53 deletions

View File

@@ -290,7 +290,7 @@ export const Editor = memo(function Editor({
// Convert blocks → markdown, restoring wikilinks first
const blocks = editor.document
const restored = restoreWikilinksInBlocks(blocks)
const bodyMarkdown = editor.blocksToMarkdownLossy(restored)
const bodyMarkdown = editor.blocksToMarkdownLossy(restored as typeof blocks)
// Reconstruct the full file: preserve original frontmatter + title heading
const [frontmatter] = splitFrontmatter(tab.content)