Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

fix: update note persister tests to use frontmatter-batch operations

Summary

The note persister implementation was changed to use frontmatter-batch operations (via @hypr/plugin-frontmatter) instead of md-batch operations (via @hypr/plugin-export). This PR updates the test file to align with that implementation change.

Key changes:

  • Replaced @hypr/plugin-export mock with @hypr/plugin-frontmatter mock
  • Added mocks for @tauri-apps/api/path (sep function) and @hypr/tiptap/shared (isValidTiptapContent, json2md)
  • Updated all assertions to expect frontmatterCommands.serializeBatch calls with the new {frontmatter, content} data structure

Review & Testing Checklist for Human

  • Verify the mocks accurately reflect the real implementation in collect.ts - specifically that collectNoteWriteOps produces frontmatter-batch operations with the expected frontmatter fields
  • Run pnpm -F desktop test locally to confirm all 236 tests pass
  • Spot-check that the isValidTiptapContent mock logic matches the real implementation in @hypr/tiptap/shared

Test plan: Run pnpm -r test and pnpm -r typecheck to verify all tests pass and there are no type errors.

Notes

  • The Playwright tests in apps/web fail due to missing browser installation (environment issue, not related to this change)
  • The dprint check command has environment issues with rustfmt (missing shared library), but this PR only modifies TypeScript files

Link to Devin run: https://app.devin.ai/sessions/e5599f72fc514da78cd9e1632acd2cdb
Requested by: yujonglee (@yujonglee)

The note persister implementation was changed to use frontmatter-batch
operations instead of md-batch operations. This commit updates the tests
to:
- Mock @hypr/plugin-frontmatter instead of @hypr/plugin-export
- Mock @hypr/tiptap/shared for isValidTiptapContent and json2md
- Mock @tauri-apps/api/path for sep function
- Update assertions to expect frontmatterCommands.serializeBatch calls
- Update expected content to match mock markdown output

Co-Authored-By: yujonglee <[email protected]>
@netlify
Copy link

netlify bot commented Jan 4, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit d450c56
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/695a60f44a4f0d00082a04b9

@netlify
Copy link

netlify bot commented Jan 4, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit d450c56
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/695a60f5d7f29b0008dda009

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Jan 4, 2026

Deploy Preview for howto-fix-macos-audio-selection canceled.

Name Link
🔨 Latest commit d450c56
🔍 Latest deploy log https://app.netlify.com/projects/howto-fix-macos-audio-selection/deploys/695a60f4acbb0d00081f3066

@yujonglee yujonglee merged commit 7d6dce5 into main Jan 4, 2026
15 of 19 checks passed
@yujonglee yujonglee deleted the devin/1767529982-fix-test-typecheck branch January 4, 2026 12:46
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.

2 participants