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

lsm / neokai / 24934982708
82%

Build:
DEFAULT BRANCH: dev
Ran 25 Apr 2026 04:08PM UTC
Jobs 0
Files 0
Run time –
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

Canceled at 26 Apr 2026 08:01PM UTC via web
24934982708

push

github

web-flow
fix(web): scroll chat to bottom on every cached-session re-mount (#1632)

* fix(web): scroll chat to bottom on every cached-session re-mount

Navigating away from a session chat and returning to it left the scroll
position somewhere mid-conversation instead of at the latest messages.

Two compounding causes:

1. The "initial load" branch in useAutoScroll relied on the
   `isInitialLoad` prop transitioning from true→false alongside the
   first non-empty `messageCount`. On a cached-session re-mount preact
   batches `setIsInitialLoad(false)` and `setMessages(M)` into a single
   render, so by the time `messageCount` first becomes non-zero the
   prop is already `false` and the branch never fires.

2. Async content layout (markdown, syntax highlighting, image loads)
   grew `scrollHeight` after the initial scroll, leaving the last
   messages stranded above the actual bottom.

Fixes:

- Track first-mount-scroll via a ref instead of the `isInitialLoad`
  prop, so it fires reliably on every fresh mount as soon as messages
  appear — matching the existing initial-load semantic that ignores
  `enabled` for the first scroll.
- Promote the auto-scroll callback from useEffect to useLayoutEffect so
  the scroll lands before paint, eliminating a visible mid-conversation
  flash. The loadingOlder transition tracker is also promoted to
  useLayoutEffect (declared first) to preserve the scroll-position
  restore for pagination.
- Re-pin to the bottom in the existing ResizeObserver path when content
  grows while the user is near the bottom, covering the async-content
  case. Skipped during loadingOlder so ChatContainer's restore stays in
  charge.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* chore(web): remove dead hasScrolledOnInitialLoad ref from useAutoScroll

`hasScrolledOnMountRef` fully supersedes the old `hasScrolledOnInitialLoad`
ref — the latter was only ever written, never read. Drop the declaration,
its writes in the mount-scroll branch, a... (continued)
Source Files on build 24934982708
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #24934982708
  • 0f8c39df on github
  • Prev Build on dev (#24934805579)
  • Next Build on dev (#24948543233)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc