y prosemirror tests matchnodes#2856
Conversation
…ual typing (#2815) When @ariakit/react updates its internal module structure (e.g. from @ariakit/react-core to @ariakit/react-components), contextual typing from external library component props can break, causing TS7006 'Parameter implicitly has an any type' errors in the Fresh Install Tests CI workflow. Add explicit type annotations to 5 callback parameters that depend on external library types for inference: - packages/ariakit/src/panel/Panel.tsx: setActiveId callback - packages/ariakit/src/toolbar/ToolbarButton.tsx: onMouseDown callback - packages/ariakit/src/panel/PanelFileInput.tsx: onChange callback - packages/ariakit/src/badge/Badge.tsx: onClick callback - packages/xl-ai/src/components/AIMenu/AIMenuController.tsx: outsidePress callback All annotations use React/DOM built-in types (MouseEvent, ChangeEvent) rather than library-specific types, making them resilient to future dependency updates.
…nhandled DOMObserver errors (#2816) Tests that mount editors were not calling unmount() afterward, leaving ProseMirror's DOMObserver timers active. When prosemirror-view is updated to newer versions (e.g. 1.41.8 via fresh dep resolution), a dangling setTimeout in DOMObserver.flush() fires after jsdom teardown, causing 'document is not defined' ReferenceError. Add afterEach cleanup following the same pattern as transformPasted.test.ts.
* Memoized `actions` prop in consumers of `CommentEditor` * Added e2e test, minor changes to existing tests * refactor: extract actions into memo components with render prop pattern - Change CommentEditor actions prop from FC to render prop (function returning ReactNode) - Extract inline action components into separate memo-wrapped components - Remove unnecessary useCallback/useMemo wrappers around render props - React.memo on child components handles re-render optimization --------- Co-authored-by: Nick the Sick <computers@nickthesick.com>
…irror-tests-matchNodes
# Conflicts: # packages/core/package.json # packages/core/src/api/positionMapping.test.ts # packages/core/src/editor/BlockNoteEditor.test.ts # packages/core/src/yjs/comments/YjsThreadStore.ts # packages/xl-ai/package.json # pnpm-lock.yaml
…ash pre-commit hook)
Resolve conflicts: adopt vite-plus (vp) tooling from decouple-yjs while preserving y-prosemirror v14 deps/patches and src/y/ tree. Migrate test imports to vite-plus/test, fix root test script filter syntax, regenerate examples.gen.tsx and migrate new example dirs to vp tooling.
… migration - Resolved merge conflicts in pnpm-workspace.yaml, tests/package.json, tests/vite.config.browser.ts - Regenerated pnpm-lock.yaml with combined dependencies (@y/y ^14.0.0-rc.17, vite-plus catalog) - Migrated y-prosemirror test suite from tests/src/browser/** to tests/src/end-to-end/** - Updated test imports: vitest -> vite-plus/test, vitest/browser -> vite-plus/test/browser/context - Fixed TypeScript compatibility with browserExpect.ts helper for screenshot matchers - All 49 files migrated: 12 .test.tsx + 2 fixtures + 35 PNG baselines - Build passes, all packages compile successfully
- Changed expectScreenshot() to use expect(locator).toMatchScreenshot() instead of (locator as any).toMatchScreenshot() - This resolves 'locator.toMatchScreenshot is not a function' runtime errors - Migrated y-prosemirror tests now run successfully with vite-plus
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Without the output field, vp's cache only replays terminal output on cache hits but does not restore build artifacts to disk. This causes ENOENT errors on Vercel when downstream packages (ariakit, shadcn) try to import style.css from react/dist or core/dist that was never written. Add output: ["dist/**"] to all 14 package build task definitions so that cached builds correctly archive and restore their dist/ directories.
Summary
Rationale
Changes
Impact
Testing
Screenshots/Video
Checklist
Additional Notes