fix(app): optimize large review panes (#35375)

This commit is contained in:
Luke Parker 2026-07-06 16:26:03 +10:00 committed by GitHub
commit 3a149ba71c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 1074 additions and 404 deletions

View file

@ -27,6 +27,21 @@ test("reactive count updates preserve measured row sizes", () => {
})
})
test("initial rect projects rows before a scroll element connects", () => {
createRoot((dispose) => {
const virtualizer = createVirtualizer<HTMLDivElement, HTMLDivElement>({
count: 100,
getScrollElement: () => null,
estimateSize: () => 28,
initialRect: { width: 0, height: 600 },
overscan: 10,
})
expect(virtualizer.getVirtualItems().length).toBeGreaterThan(0)
dispose()
})
})
test("logical scroll offset includes pending measurement adjustments", () => {
createRoot((dispose) => {
const virtualizer = createVirtualizer<HTMLDivElement, HTMLDivElement>({