• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

humanspeak / svelte-virtual-list / 28624839498
74%
main: 72%

Build:
Build:
LAST BUILD BRANCH: feat/165-center-align-scroll-to-offset
DEFAULT BRANCH: main
Ran 02 Jul 2026 10:13PM UTC
Jobs 1
Files 18
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Jul 2026 10:11PM UTC coverage: 73.704% (+0.2%) from 73.489%
28624839498

push

github

web-flow
fix(virtual-list): count collapsed margins in item height measurement (#415)

* test(virtual-list): add failing spec for margins escaping height measurement (#412)

Fixture: 500 items, each a 100px border box with margin: 12px 0 that
collapses through the unstyled item wrappers, so real layout pitch is
112px while border-box measurement reads 100px. Estimate pinned to the
border box so margins are the only variable.

Two assertions, both failing pre-fix:
- cache-implied pitch (scrollHeight / itemCount) vs rendered layout
  pitch: off by exactly 12px (totalHeight ~6,000px short)
- one-pitch-per-step scroll sweep: tracked item jumps up to 24px at
  render-range boundaries (multiples of the lost margin)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(virtual-list): measure item pitch from layout offsets so margins can't escape (#412)

Item heights were measured as the wrapper's border box, which excludes
margins — and consumer margins (e.g. margin: 12px 0) collapse straight
through the component's unstyled item wrappers, permanently
under-counting every item with no ResizeObserver event to correct on.

measureItemPitch derives each rendered item's height from layout ground
truth instead: the wrapper's offsetTop delta to its next sibling, the
last closed by the items container's bottom edge (the container is
absolutely positioned — a BFC — so its auto height includes the last
child's bottom margin). Collapsed margins are included by construction,
whatever CSS consumers use. The ResizeObserver significance check now
compares pitch against the (pitch-holding) cache so margined items
don't churn as permanently dirty.

Margin-less consumers are numerically unaffected: offset-delta pitch
equals border-box height when nothing escapes. Falls back to the border
box when the element is not laid out (detached / non-browser tests).

Verified: 314 unit tests, svelte-check clean, full Playwright suite
green on chromium, firefox, and webkit.

Co-Authored... (continued)

414 of 608 branches covered (68.09%)

Branch coverage included in aggregate %.

9 of 10 new or added lines in 2 files covered. (90.0%)

1 existing line in 1 file now uncovered.

766 of 993 relevant lines covered (77.14%)

453.99 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
49.41
0.0% src/lib/SvelteVirtualList.svelte

Coverage Regressions

Lines Coverage ∆ File
1
49.41
0.0% src/lib/SvelteVirtualList.svelte
Jobs
ID Job ID Ran Files Coverage
1 node-22 - 28624839498.1 02 Jul 2026 10:13PM UTC 18
73.7
GitHub Action Run
Source Files on build 28624839498
  • Tree
  • List 18
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28624839498
  • cf3fc9e6 on github
  • Prev Build on main (#28306388552)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc