Files
t3code/apps/web/src
olafuraandClaude Opus 4.8 5e805ec7f8 fix: harden lazy-load reset and dedup against window reshape (PR review)
Detect a live-window reshape from an order-independent oldest boundary
(`liveWindowOldestActivityId`: min by createdAt/id) instead of
`activities[0]`. The reducer sorts unsequenced rows to the end while the
server snapshot lists legacy unsequenced rows first, so the first live
append re-sorts the array and shifts index 0 — which previously looked
like a reshape and wrongly cleared the user's scrolled-up history.

Run the older-pages reset in useLayoutEffect so the cleared state commits
before paint; otherwise a thread switch renders one frame with the previous
thread's lazy-loaded pages still merged in, flashing stale work-log and
approval rows.

Applied to both web (ChatView) and mobile (use-thread-composer-state); the
shared sentinel helper lives in client-runtime with unit tests.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-20 17:27:49 +02:00
..
2026-02-09 22:19:49 -08:00
2026-05-29 17:00:54 -07:00