fix: preview update bug when tab and sidebar previews are both open - #2493
Open
prlygates1121 wants to merge 1 commit into
Open
fix: preview update bug when tab and sidebar previews are both open#2493prlygates1121 wants to merge 1 commit into
prlygates1121 wants to merge 1 commit into
Conversation
Fixes a preview update bug where opening the Tinymist sidebar Content preview could stop an already-open tab preview from updating, and vice versa. The preview backend creates one renderer per connected webview, but webview-originated render requests were previously sent through the shared broadcast channel. As a result, when one preview frontend connected and sent `"current"`, every render actor handled that request, including renderers belonging to other preview views. This PR routes webview-local render requests through a per-webview direct channel while keeping compile-driven render updates broadcast to all preview clients.
prlygates1121
requested review from
Enter-tainer and
Myriad-Dreamin
as code owners
April 29, 2026 07:40
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 a preview update bug where opening the Tinymist sidebar Content preview could stop an already-open tab preview from updating, and vice versa.
The preview backend creates one renderer per connected webview, but webview-originated render requests were previously sent through the shared broadcast channel. As a result, when one preview frontend connected and sent
"current", every render actor handled that request, including renderers belonging to other preview views.This PR routes webview-local render requests through a per-webview direct channel while keeping compile-driven render updates broadcast to all preview clients.
What Changed
RenderActor.WebviewActorto send local render requests throughmpscinstead of the shared broadcast channel.Why
Each webview has independent incremental renderer state. A
"current"request from one webview should only affect that webview’s renderer. Broadcasting that request lets one preview view disturb another view’s renderer state, causing one of the previews to stop updating.Manually Verified: