perf(mobile): keep feed rows and drafts stable while a bot streams - #300
Open
leoisadev1 wants to merge 2 commits into
Open
leoisadev1 wants to merge 2 commits into
leoisadev1 wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This comment has been minimized.
This comment has been minimized.
leoisadev1
force-pushed
the
perf/web-render
branch
from
September 26, 2026 18:06
5c13f71 to
8cc05ca
Compare
leoisadev1
force-pushed
the
perf/mobile-streaming
branch
from
September 26, 2026 18:07
42b42a6 to
0d998fa
Compare
leoisadev1
force-pushed
the
perf/mobile-streaming
branch
from
September 26, 2026 18:17
0d998fa to
f7da926
Compare
Stream chunks publish one store update each, feed entries stay referentially stable so the list redraws only changed rows, composer drafts use per-thread atoms so keystrokes stop re-rendering the route, and context-window supersedes take the fast reducer path. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
unchangedPrefixLength compared only the endpoints, so replacing an interior activity by id reported the full previous length and the authorization scan skipped the replacement. Walk the identity prefix instead and rescan from the first changed item. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
leoisadev1
force-pushed
the
perf/web-render
branch
from
September 26, 2026 19:18
3fce541 to
ada302b
Compare
leoisadev1
force-pushed
the
perf/mobile-streaming
branch
from
September 26, 2026 19:18
f7da926 to
8b9533f
Compare
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on perf/web-render.
While a bot streamed, every delta rebuilt the whole mobile thread feed: all activities re-sorted with per-comparison Date allocations, every message rewrapped in a fresh object, and every visible row re-rendered, including markdown re-parses on Android. Every keystroke re-rendered the entire thread route because the composer subscribed to the whole drafts map and an unmemoized presentation object defeated the feed's memo. Context-window activity updates, which providers stream continuously, took a full filter, sort, and re-index path in the shared reducer.
Stream chunks now publish one store update per chunk in the shared runtime. Feed builds parse timestamps once and cache rows so unchanged entries keep their identity, and the list gets a stable render context plus an items-equal comparison so it redraws only rows whose content changed. Composer drafts moved to per-thread atoms with a self-contained draft composer, presentation objects are stable, and the native header options are memoized. The reducer handles context-window supersedes on the fast in-order append path, and Home rows re-render per minute only when their time label text actually changes.
Verified with 238 mobile and 69 client-runtime tests passing, including a new burst test that fails on the old per-delta publish behavior, plus clean typechecks and lint. The reconnect full-shell refetch was intentionally left alone: the snapshot carries per-connection data that event replay cannot rebuild. Not verified on a device or simulator; the render changes are covered by unit tests and reasoning only.
Created with Claude Fable 5.1 in Claude Code.
🤖 Generated with Claude Code