Sonarly Claude Code 524e68bd3a fix: trigger prefetch earlier in virtualized table scroll handler
https://sonarly.com/issue/17183?type=bug

The virtualized record table's scroll-triggered data fetching has insufficient prefetching — the initial load covers only 60 records (6 pages), but the overscan window and debounce logic delay subsequent page fetches, causing visible skeleton placeholders during slow scrolling.

Fix: Two changes in `RecordTableVirtualizedRowTreadmillEffect.tsx`:

**1. Fixed the scroll speed dead zone (50-200 rows/s) where no data fetch was triggered**

Previously, `triggerFetchPages()` was only called inside the `else if (speed < 50 rows/s)` branch. For scroll speeds between 50-200 rows/s (typical slow-to-medium scrolling), neither the high-speed nor low-speed branch would execute, meaning no data fetch was triggered during active scrolling. The only fallback was `handleAfterLastScrollDebounced` which required the user to stop scrolling for 300ms.

The fix moves `triggerFetchPages()` outside the speed threshold branches so it fires on every scroll event regardless of speed. This is safe because:
- `triggerFetchPages` itself is debounced (25ms with 2000ms maxWait)
- `triggerFetchPagesWithoutDebounce` has an early return when `lowDetailsActivated` is true
- Already-loaded pages are filtered out before any network request

The speed thresholds now only control the low-details rendering mode (showing skeletons vs full cells during fast scrolling), which was their original intent.

**2. Reduced `LAST_SCROLL_DEBOUNCE_TIME` from 300ms to 100ms**

This is the debounce delay for `handleAfterLastScroll`, which fires after the user stops scrolling. 300ms felt sluggish — the user would see placeholders for a noticeable period after stopping. 100ms is fast enough to feel responsive while still batching rapid scroll-stop events.
2026-03-21 12:38:02 +00:00
2026-03-11 16:30:28 +01:00

Twenty logo

The #1 Open-Source CRM

🌐 Website · 📚 Documentation · Roadmap · Discord · Figma


Cover


Installation

See: 🚀 Self-hosting 🖥️ Local Setup

Why Twenty

We built Twenty for three reasons:

CRMs are too expensive, and users are trapped. Companies use locked-in customer data to hike prices. It shouldn't be that way.

A fresh start is required to build a better experience. We can learn from past mistakes and craft a cohesive experience inspired by new UX patterns from tools like Notion, Airtable or Linear.

We believe in open-source and community. Hundreds of developers are already building Twenty together. Once we have plugin capabilities, a whole ecosystem will grow around it.


What You Can Do With Twenty

Please feel free to flag any specific needs you have by creating an issue.

Below are a few features we have implemented to date:

Personalize layouts with filters, sort, group by, kanban and table views

Companies Kanban Views

Customize your objects and fields

Setting Custom Objects

Create and manage permissions with custom roles

Permissions

Automate workflow with triggers and actions

Workflows

Emails, calendar events, files, and more

Other Features


Stack

Thanks

Chromatic Greptile Sentry Crowdin E2B

Thanks to these amazing services that we use and recommend for UI testing (Chromatic), code review (Greptile), catching bugs (Sentry) and translating (Crowdin).

Join the Community

Languages
TypeScript 78%
MDX 18.5%
JavaScript 3.1%
Python 0.2%