Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wizard-archive | 456dae4 | Commit Preview URL Branch Preview URL |
Apr 12 2026, 07:09 PM |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 11 minutes and 28 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds Zod-based BlockNote schema validation, extracts BlockNote↔Yjs conversion utilities, tightens block/note types and validators, standardizes test factories, enhances text-to-block conversion, and introduces extensive tests for blocks, folder downloads, and editor text parsing. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Preview Deployment
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@convex/blocks/blockNoteValidator.ts`:
- Around line 6-219: Replace permissive z.object(...) schemas with
z.strictObject(...) for all document shapes so unknown keys are rejected: update
stylesSchema, styledTextSchema, inlineContentSchema, tableContentSchema,
defaultPropsSchema entries, and every block object inside the z.lazy
discriminated union (the blockNoteBlockSchema cases such as 'paragraph',
'heading', 'bulletListItem', 'numberedListItem', 'checkListItem',
'toggleListItem', 'quote', 'codeBlock', 'divider', 'image', 'video', 'audio',
'file', and 'table') so that both the outer block objects and their nested props
objects use z.strictObject(...) (and mark optional schemas the same way) to
enforce strict validation and prevent unknown fields from being accepted.
In `@src/features/file-upload/utils/__tests__/folder-reader.test.ts`:
- Around line 13-17: The test fixtures duplicate file creation between makeFile
and makeFolder; change makeFolder to reuse makeFile instead of reimplementing
the File/relativePath construction so path behavior is centralized—have
makeFolder call makeFile for each file entry (or accept File objects created by
makeFile) and build the folder's entries from those returned fixtures, then
remove the duplicated logic in makeFolder and update any tests that previously
constructed files directly to use makeFile (also adjust the other duplicated
occurrences where files are created to call makeFile).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: be672c6b-6ca4-4756-b136-69ad6b7deeee
⛔ Files ignored due to path filters (2)
convex/_generated/api.d.tsis excluded by!**/_generated/**pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (22)
convex/_test/factories.helper.tsconvex/blockShares/__tests__/blockShares.test.tsconvex/blockShares/__tests__/blockSharingWorkflows.test.tsconvex/blockShares/types.tsconvex/blocks/__tests__/blockNoteValidator.test.tsconvex/blocks/blockNoteValidator.tsconvex/blocks/schema.tsconvex/blocks/types.tsconvex/documentSnapshots/__tests__/rollbackEdgeCases.test.tsconvex/documentSnapshots/__tests__/snapshot.test.tsconvex/folders/__tests__/getFolderContentsForDownload.test.tsconvex/notes/__tests__/noteWorkflows.test.tsconvex/notes/blocknote.tsconvex/notes/functions/createNote.tsconvex/notes/mutations.tsconvex/notes/schema.tsconvex/yjsSync/__tests__/makeYjsUpdate.helper.tspackage.jsonsrc/features/editor/utils/__tests__/text-to-blocks.test.tssrc/features/editor/utils/text-to-blocks.tssrc/features/file-upload/utils/__tests__/folder-reader.test.tssrc/features/sidebar/hooks/useCreateSidebarItem.ts
👮 Files not reviewed due to content moderation or server errors (8)
- package.json
- convex/notes/blocknote.ts
- convex/yjsSync/tests/makeYjsUpdate.helper.ts
- src/features/editor/utils/text-to-blocks.ts
- src/features/editor/utils/tests/text-to-blocks.test.ts
- convex/documentSnapshots/tests/snapshot.test.ts
- convex/notes/tests/noteWorkflows.test.ts
- convex/blockShares/tests/blockShares.test.ts
| function makeFile(name: string): { file: File; relativePath: string } { | ||
| return { | ||
| file: new File([''], name), | ||
| relativePath: name, | ||
| } |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Deduplicate file fixture creation in helpers.
makeFolder reimplements makeFile logic. Reusing one helper reduces fixture drift and keeps path behavior centralized.
♻️ Suggested refactor
-function makeFile(name: string): { file: File; relativePath: string } {
+function makeFile(name: string, relativePath: string = name): { file: File; relativePath: string } {
return {
file: new File([''], name),
- relativePath: name,
+ relativePath,
}
}
@@
relativePath: name,
- files: files.map((f) => ({
- file: new File([''], f),
- relativePath: `${name}/${f}`,
- })),
+ files: files.map((f) => makeFile(f, `${name}/${f}`)),
subfolders,
}
}Also applies to: 28-31
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/features/file-upload/utils/__tests__/folder-reader.test.ts` around lines
13 - 17, The test fixtures duplicate file creation between makeFile and
makeFolder; change makeFolder to reuse makeFile instead of reimplementing the
File/relativePath construction so path behavior is centralized—have makeFolder
call makeFile for each file entry (or accept File objects created by makeFile)
and build the folder's entries from those returned fixtures, then remove the
duplicated logic in makeFolder and update any tests that previously constructed
files directly to use makeFile (also adjust the other duplicated occurrences
where files are created to call makeFile).
Summary by CodeRabbit
New Features
Tests
Chores