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

humanspeak / svelte-virtual-chat / 29278588682
92%
main: 92%

Build:
Build:
LAST BUILD BRANCH: perf/drop-observer-attribute-observation
DEFAULT BRANCH: main
Ran 13 Jul 2026 07:29PM UTC
Jobs 1
Files 8
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

13 Jul 2026 07:28PM UTC coverage: 92.438%. Remained the same
29278588682

push

github

web-flow
fix(chat): preserve reading position across history prepends (#65)

* fix(chat): preserve reading position across history prepends

"History prepend with anchor preservation" is a headline behavior that
did not work: scrolled away from the bottom, a prepend of older messages
teleported the viewport into the prepended region and evicted the message
being read. The component's capture-mutate-restore anchor protocol was
wired only to ResizeObserver measurement callbacks; a messages-array
prepend arrives via prop reactivity, where no anchor was ever captured.

Detect a prepend in `$effect.pre` (old ids reappearing shifted by
newN-oldN, endpoints sampled — mirrors ChatHeightCache.sync's fast path)
and, when the user is scrolled away, capture the reading anchor from the
still-pre-paint DOM. Restore it via the existing VisualAnchor machinery,
deferred to `tick()` so the corrected scrollTop is written only after the
taller content exists (an earlier write would clamp to the old
scrollHeight). For the onNeedHistory-mid-scroll entry point the restore
is not gated on canPreserveAnchor — the scroll-progress preserver is a
no-op for growth above the viewport — and the preserver's baseline is
re-fed via its public commitAdjustment so the two cooperate.

Following-bottom behavior is untouched. Adds red-first regression tests
pinning the reading message across both manual and auto-load prepends.

Fixes #64

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

* fix(chat): pin the bottom through history prepends while following

A prepend while following bottom left scrollTop uncorrected — the
viewport fell off the bottom by the prepended height (~800px estimated
plus re-measure growth, 1123px peak) — and the count-growth effect then
smooth-animated the recovery, a visible up-then-down jump. Detect the
prepend in the existing $effect.pre site and re-pin instantly in the
same flush/tick window the scrolled-away restore uses; a prepend flag
suppresses the smooth snap... (continued)

213 of 244 branches covered (87.3%)

Branch coverage included in aggregate %.

386 of 404 relevant lines covered (95.54%)

296.25 hits per line

Jobs
ID Job ID Ran Files Coverage
1 node-22 - 29278588682.1 13 Jul 2026 07:29PM UTC 8
92.44
GitHub Action Run
Source Files on build 29278588682
  • Tree
  • List 8
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #29278588682
  • c33e49e2 on github
  • Prev Build on main (#29177021556)
  • Delete
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