fix(server): typing lag over TCP in client/server mode - #3433
Open
meowgorithm wants to merge 2 commits into
Open
fix(server): typing lag over TCP in client/server mode#3433meowgorithm wants to merge 2 commits into
meowgorithm wants to merge 2 commits into
Conversation
Workspace probes (agent state, LSP states, diagnostics) were running synchronously on every render frame. In client mode each probe is an HTTP round-trip, so typing became unusably slow. Cache this state off-thread and read from the cache during render. The sidebar, landing view, and compact header each probed independently, so a single frame could trigger 3+N round-trips (N = number of LSP servers). Over TCP that compounded quickly. 💘 Generated with Crush
Follow-up to the typing-lag fix: the "rebuild then invalidate the memoized model" edge lived at four UpdateAgentModel call sites by convention, and the MCP state-change handler had already missed it. updateAgentModelCmd now owns the sequencing so the edge can't be forgotten; handleStateChanged routes through it too. Also document the constructor's synchronous cache seed in the workspace_cache header comment and justify the 5s LSP TTL against the 500ms busy TTL.
taciturnaxolotl
approved these changes
Jul 27, 2026
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.
Oof. When crush is run in client/server mode, and the server was remote over TCP, typing became unbearably slow. This is because all sorts of Bubble Tea events were hitting the server…synchronously.
This revision fixes the behavior and a bunch of other associated behavior like this. Typing will now happens on the client, and does not ping the server.