### Context
The DataGrid infinite-scroll sentinel re-created its
IntersectionObserver whenever the onLoadMore callback changed identity
(every isLoadingMore/hasMore toggle). A freshly-created observer
re-reports the sentinel's current intersection state, so a sentinel that
stays in view fired onLoadMore after every page, auto-loading the whole
dataset back-to-back and OOM-crashing the tab on long
transaction/customer histories.
### Summary of Changes
Keep a single stable observer that reads the callback via a ref, so it
only fires on genuine scroll changes.
### UI Changes
Reproduced with a DataGrid in `paginationMode="infinite"` fed by a data
source that always reports `hasMore: true`. The counter tracks how many
load-more fetches fire **with no user scrolling**.
**Before** — the observer is re-created every load cycle and re-fires on
creation, auto-loading unboundedly (the counter races past 290 while
rows stays at 3; on real data each fetch accumulates rows until the tab
OOMs):

**After** — a single stable observer only fires on genuine intersection
changes; fetches settle at 2 and stay put:

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Fixes DataGrid infinite-scroll auto-loading when the sentinel stays in
view, preventing OOM crashes on long histories. Addresses Linear
1783309406.
- Bug Fixes
- Keep a single IntersectionObserver and read the `onLoadMore` callback
via a ref, so it only fires on real intersection changes.
- Add a regression test that simulates endless `hasMore: true` data and
asserts no new observers are created across load-more cycles.
<sup>Written for commit eb216dfe8a.
Summary will update on new commits.</sup>
<a
href="https://cubic.dev/pr/hexclave/hexclave/pull/1734?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: aman <[email protected]>
Hexclave
The user infrastructure platform.
Hexclave handles everything around your users: authentication, teams, payments, emails, analytics, and much more. Start in minutes on the hosted cloud. Your data is always yours to export and self-host.
Get started
Setting up Hexclave is one prompt. Paste this into your coding agent of choice:
Read skill.hexclave.com and help me setup hexclave in this project
For AI agents
If you're an AI coding agent, use your web fetch tool or curl the skill documentation for up-to-date integration instructions:
curl -sSL "https://skill.hexclave.com?question=<your-question>&context=<your-context>"
What's included
Hexclave ships as a catalog of apps you switch on as your product needs them. Each one is built on the same user model, and new apps land regularly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Contributing
Hexclave is open source, and contributions are welcome. Read
CONTRIBUTING.md to get started, and say hello in
Discord before picking up anything large.
Found a security issue? Email [email protected].










