Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughDraggable’s declarations now accept partial props for state derivation and construction. Draggable and DraggableCore use React’s component propTypes type. Build and typings fixtures check lazy imports and prop validation. ChangesComponent typing compatibility
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change only adjusts TypeScript declarations so Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The changes primarily affect how consumers type-check the components. Existing runtime validation and drag controls remain in place. Direct construction with incomplete props is newly accepted by the types but may fail at runtime; its use by consumers is unknown. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
lib/Draggable.tsxESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. lib/DraggableCore.tsxESLint skipped: the matched ESLint configuration already failed (missing-dependency). scripts/verify-build.cjsESLint skipped: the matched ESLint configuration already failed (missing-dependency).
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 |
Fixes #822.
Direct
React.lazyimports now type-check for bothDraggableandDraggableCorewith React 18 and 19 types, without consumer casts. The derived-state parameter and public constructor accept the same partial props as the component. Both optionalpropTypesstatics use React's component contract, preserving the no-props JSX case and avoiding a generatedprop-typesdeclaration dependency. Runtime implementation is unchanged.Regression coverage includes both lazy imports, minimal JSX, invalid-prop rejection, and a consumer of the built package through the NodeNext export map.
Validation on Node.js 24.19.0 / macOS:
make lintpassed, including both React type configurations.yarn test: 204 passed.make buildpassed, including declaration and ESM consumer checks.skipLibCheckdisabled.Browser drag tests were not run for this type-only change.
Summary by CodeRabbit
React.lazy.