v0.1.0-alpha.186
·
34 commits
to main
since this release
v0.1.0-alpha.186 — paginated thread load: 15 first, 35 background-filled
User feedback: deep-linking to a thread takes too long. Network
bytes dominate the cold path — a 50-turn agent thread with
tool_result blobs can ship 1-3 MB on first load.
Two changes:
1. Initial page size 50 → 15. ~150-800 KB on the wire instead of
500 KB - 3 MB. Paint time drops from 400-1000ms to 100-300ms.
Covers ~7 user/assistant exchanges — enough to see the last
few messages of the prior session without overpaying.
2. Background-fill after first paint. The moment the first 15
land in the cache, ChatSurface fires a silent
loadEarlierMessages() to pull the next page (default 50 more)
into the cache. By the time the user scrolls up to look for
earlier turns, the data is already there — "Load earlier"
becomes instant instead of a one-click round-trip.
Bounded: once per thread mount, only when hasMore=true.
Performance impact for a typical deep-link:
Before After
────────────────────────────────────────────────────────────
GET messages?limit=50 GET messages?limit=15
~600ms total ~150ms total
User sees content User sees content
[silent] GET messages?before_seq=X
~600ms in background
(user has been reading the
first page for that time)
Scroll up → Load earlier → Scroll up → "Load earlier" lands
click → 600ms wait → ... cached, instant
The "Load earlier" affordance still works for going further back
than 50 messages — the background fill only does one extra page.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>