Moving an infinite-list feature without the code — clean-room contracts and keyset pagination
What I learned moving a virtualized infinite list + scroll-restoration feature to a different stack — the clean-room approach of writing down observable behavior as a contract rather than the implementation code, and offset vs keyset pagination, which decides how stable infinite scroll is
- A migration doc records the contract of "how it behaves from the outside and what it guarantees on failure", not "which libraries we used"
- Infinite-scroll stability comes mostly from the pagination method — offset duplicates/skips on insert/delete, keyset is value-based and stable