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

humanspeak / svelte-headless-table / 33108531333
85%

Build:
DEFAULT BRANCH: main
Ran 27 Aug 2026 07:29PM UTC
Jobs 1
Files 37
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

27 Aug 2026 07:27PM UTC coverage: 84.83% (+0.2%) from 84.584%
33108531333

push

github

web-flow
feat(virtual-scroll): expose an unbuffered viewport range (#300)

* feat(virtual-scroll): expose an unbuffered viewport range

`visibleRange` is padded by `bufferSize` on both ends because it decides
what gets mounted, so it answers "what is rendered", not "what is seen".
Consumers wanting the latter — a footer tally, a scroll-progress readout,
a "jump to row" indicator — had to re-derive the sparse geometry in app
code against `totalHeight`, which is a copy that has to stay bit-for-bit
in sync with the plugin forever and silently desyncs when it doesn't.

Add `viewportRange` to `VirtualScrollState`. Sparse mode reads it off the
same `layout` anchor that positions the rendered block, so it cannot drift
from what is on screen, and the scroll-range compression applied above
`maxScrollHeight` is already undone. Dense mode gets a matching
`HeightManager.getViewportRange`; it is a second O(rows) walk, but
`derived` is lazy, so it costs nothing unless subscribed.

Notably this reports the final row at the true bottom of the dataset,
compressed or not — the off-by-one that a hand-rolled copy clamping
against `totalHeight` alone lands on.

Closes #298

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* refactor(virtual-scroll): simplify the viewportRange plumbing

Cleanup pass over the previous commit, no behavior change.

- `getViewportRange` counts rows instead of indexing with a sentinel, so
  `start <= end` holds by construction rather than by a trailing
  `Math.min` repair. Verified equivalent to the previous form across
  18k fuzzed cases (variable and zero heights, negative and past-end
  scroll positions, zero-height viewports).
- Drop `SparseLayout.viewportStart`. It was an unconditional alias for
  `anchorIndex`, i.e. two names for one number with nothing keeping them
  in step; the one consumer now reads `anchorIndex` directly.
- Inline `trackedRange`, which had become a bare alias for
  `dedupedRange(source, notifyRangeChange)`.... (continued)

572 of 724 branches covered (79.01%)

Branch coverage included in aggregate %.

62 of 71 new or added lines in 2 files covered. (87.32%)

1525 of 1748 relevant lines covered (87.24%)

32282.47 hits per line

Uncovered Changes

Lines Coverage ∆ File
9
87.09
2.02% src/lib/plugins/addVirtualScroll.ts
Jobs
ID Job ID Ran Files Coverage
1 node-22 - 33108531333.1 27 Aug 2026 07:29PM UTC 37
84.83
GitHub Action Run
Source Files on build 33108531333
  • Tree
  • List 37
  • 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 #33108531333
  • c8a7bd01 on github
  • Prev Build on main (#33085356528)
  • Next Build on main (#33283473099)
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