fix(views): prevent browser freeze on long-timeline issues in Inbox#1972
Open
forrestchang wants to merge 1 commit intomainfrom
Open
fix(views): prevent browser freeze on long-timeline issues in Inbox#1972forrestchang wants to merge 1 commit intomainfrom
forrestchang wants to merge 1 commit intomainfrom
Conversation
Three changes to address the performance freeze when opening issues with thousands of timeline entries from the Inbox: 1. Truncate initial timeline to ~50 most recent groups with a "Show earlier entries" button. When a highlightCommentId is provided (e.g. from Inbox click), the full timeline is expanded automatically so scroll-to-comment still works. 2. Wrap CommentCard with React.memo so parent re-renders (from Inbox WS events, state changes in IssueDetail) skip reconciliation of unchanged comment trees. 3. Wrap ReadonlyContent with React.memo so the heavy markdown pipeline (react-markdown + rehype-raw + rehype-sanitize + rehype-katex + lowlight) is skipped when content/className haven't changed. Closes #1968 Co-authored-by: multica-agent <github@multica.ai>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Fixes the browser tab freeze reported in #1968 when clicking a long-timeline issue (~6,400 entries) from Inbox.
Three targeted changes:
highlightCommentIdis set (Inbox click), the full timeline auto-expands so scroll-to-comment still works.CommentCardmemoization — Wrapped withReact.memoto skip re-rendering unchanged comment trees during parent state changes / WS-driven reconciliation.ReadonlyContentmemoization — Wrapped withReact.memoso the heavy markdown pipeline (react-markdown + rehype + lowlight) is skipped when content hasn't changed.Test plan