perf(chat): debounce @-mention search and memoize side panels#77
Merged
arnestrickmann merged 2 commits intogeneralaction:mainfrom Oct 3, 2025
Merged
Conversation
…bounce file index search in ChatInput to reduce UI work while typing\n- Memoize FileChangesPanel and WorkspaceTerminalPanel to avoid unnecessary renders\n\nThis addresses severe typing lag in large repos by cutting redundant computation and isolating re-renders.\n\nTest plan:\n- Open a large repo (5k+ indexed entries)\n- Type in chat input with and without '@' mentions; typing remains responsive\n- Verify mention dropdown appears after brief pause and navigation works\n- Confirm right panels do not flicker or re-render on every keystroke\n
Contributor
|
thank you, @tomascupr - appreciate your contributions! |
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.
This PR addresses severe typing lag reported in large workspaces by reducing unnecessary computation and isolating re-renders.
Changes
ChatInput(120ms). Prevents running a 5k-item search on every keystroke.FileChangesPanel,WorkspaceTerminalPanel) withReact.memoto avoid re-rendering while typing in the chat.Why
Test Plan
@: typing remains responsive.@then some characters: suggestions appear after a brief pause (~120ms), arrow keys and Enter work to insert.Notes