fix(flow-chat): keep historical sessions responsive#1006
Merged
Conversation
674fe7e to
d6c9dd0
Compare
d6c9dd0 to
27996a6
Compare
Avoid eager default tool-card payload previews, repair empty modern projections for ready restored sessions, and reuse stable completed-turn projections to reduce historical-session render churn.
27996a6 to
0e66739
Compare
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
Root cause
The first logs showed historical hydration completing, but rendering was expensive because collapsed default tool cards still eagerly built detailed previews from large persisted tool results.
The latest repro looks different: the webview logs do not contain
historical_session_*/restore_session_viewmarkers or repeated large defaultWebFetchcards, but they do show thousands of repeatedModernFlowChatStoreexplore-group projection logs. That points to the UI/store projection path rather than backend history loading. If the active restored session is alreadyreadywhileModernFlowChatStore.virtualItemsremains empty, the existing sync short-circuit can leave the loading placeholder visible until a session switch forces another sync.Impact
Validation
pnpm run type-check:webpnpm --dir src/web-ui run test:run src/flow_chat/services/storeSync.test.ts src/flow_chat/store/modernFlowChatStore.test.ts src/flow_chat/components/modern/ModernFlowChatContainer.history-state.test.tsx src/flow_chat/tool-cards/DefaultToolCard.test.tsxpnpm run check:repo-hygienegit diff --check