perf(bootstrap): lazy thread hydration with listing snapshot#38
Merged
Conversation
- Fetch lightweight listing snapshot (thread summaries only) on initial load - Sidebar renders immediately with hollow threads and skeleton indicators - Full thread data fetches on-demand via getThread(threadId) on navigation - Reduce initial JSON parsing and unblock UI during app startup - Add text reveal animation on message completion with smooth scroll anchoring - Add ResizeObserver for content height tracking and scroll synchronization - Threads hydrate incrementally from domain events or full snapshot fallback
- Suppress notifications for 5s after user stops/interrupts to prevent spurious completion notifications - Improve scroll behavior during agent execution: respect user scroll intent, use multiple timeout attempts - Optimize paint performance by disabling content-visibility auto for messages near bottom - Enhance text reveal animation to support checkboxes and horizontal rules
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.
Summary
Implements a two-phase bootstrap strategy to unblock sidebar rendering while background-loading thread data:
OrchestrationThreadSummary(metadata, session, latest turn, pre-computedlatestUserMessageAt). Skips messages, activities, checkpoints, and proposed plans. SetsbootstrapComplete = trueto render sidebar immediately.getThread()and merged into the store. The hollow thread structure persists until hydrated.Additional improvements:
projection_thread_messagesandprojection_turnsfor listing snapshot query performancehasPendingApprovals,hasPendingUserInput,hasActionableProposedPlan) default tofalseand are corrected by real-time domain events within secondsArchitecture:
getListingSnapshot()andgetThread(threadId)methods inProjectionSnapshotQueryorchestration.getListingSnapshotandorchestration.getThreadisThreadHydrated()check in_chat.$threadId.tsxtriggers hydration on navigationTesting
bun fmtpassesbun lintpassesbun typecheckpassesgetSnapshot()as fallback