fix(browser): scope navigate events by surfaceId#25
Merged
amirlehmam merged 1 commit intoJun 8, 2026
Conversation
Previously all wmux:browser-navigate events were broadcasts — any open BrowserPane in any workspace would respond to them. This caused the wrong pane to navigate when multiple browser surfaces existed, and meant dev-server auto-navigate fired on every pane indiscriminately. - Pass surfaceId in the wmux:browser-navigate CustomEvent detail - BrowserPane handler ignores events whose surfaceId doesn't match its own (events with no surfaceId are still treated as broadcasts for back-compat) - open-in-browser.ts resolves the target browser surface's id and includes it in both the immediate and deferred navigate dispatches - App.tsx auto-navigate on dev-server detection passes the workspace's browser surface id instead of an empty string Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
79a374f to
a989d40
Compare
Owner
|
Merged and shipped in v0.8.3. Thanks @schroldgames — surface-scoped navigate events pair nicely with the new browser/markdown tab menu (#28). |
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
wmux:browser-navigateCustomEvents were broadcasts — every openBrowserPaneresponded, so the wrong pane would navigate when multiple browser surfaces existed, and dev-server auto-navigate fired on all of them indiscriminatelysurfaceIdfield to the event detail;BrowserPaneignores events that don't target its own id (events with nosurfaceIdremain broadcasts for back-compat)open-in-browser.tsresolves the target surface's id from the split tree and passes it in both the immediate and deferred navigate dispatchesApp.tsxauto-navigate on dev-server port detection now passes the workspace's browser surface id instead of an empty stringFiles changed
src/preload/index.tssurfaceIdarg through the navigate event detailsrc/renderer/components/Browser/BrowserPane.tsxsrc/renderer/utils/open-in-browser.tssrc/renderer/App.tsxTest plan
wmux browser open <url>from CLI — confirm it targets the correct panewmux:browser-navigatewith nosurfaceId— confirm it still navigates the first available pane🤖 Generated with Claude Code