Skip to content

fix: getKeplerFactory causing constant remounting - #352

Merged
ilyabo merged 1 commit into
mainfrom
fix--getKeplerFactory-causing-constant-remounting
Feb 10, 2026
Merged

ilyabo merged 1 commit into
mainfrom
fix--getKeplerFactory-causing-constant-remounting

Conversation

@ilyabo

@ilyabo ilyabo commented Feb 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes
    • Improved component stability to prevent unnecessary remounting and maintain state consistency across renders.

@coderabbitai

coderabbitai Bot commented Feb 10, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This change optimizes the KeplerInjector component by adding memoization to the resolved component logic. The getKeplerFactory function now wraps the injector.get(...) call in useMemo with the injector instance as a dependency, ensuring component stability across re-renders and preventing unnecessary unmount/remount cycles.

Changes

Cohort / File(s) Summary
Component Memoization
packages/kepler/src/components/KeplerInjector.tsx
Added useMemo import and wrapped component resolution in getKeplerFactory with memoization to stabilize component references across renders.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A sprinkle of memo dust, so fine and bright,
Components now stay put, no more take-flight!
The injector's locked in, stable as can be,
Rendering flows smoothly, as smooth as can be!
Hops of joy for performance this night! 🌙✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically identifies the bug being fixed: getKeplerFactory causing constant remounting.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix--getKeplerFactory-causing-constant-remounting

No actionable comments were generated in the recent review. 🎉

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ilyabo
ilyabo merged commit bd2fbf0 into main Feb 10, 2026
4 checks passed
@ilyabo
ilyabo deleted the fix--getKeplerFactory-causing-constant-remounting branch February 10, 2026 19:51
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.

1 participant