feat: Open links in split view via shift+click#13564
Draft
JordanTranchina wants to merge 5 commits into
Draft
Conversation
Registers a ZenSplitView JSWindowActor pair (following the ZenGlance pattern) so shift+click on any web-content link opens the target URL in a new split-view tab alongside the current one. - ZenSplitViewChild: content-side actor registered for click and DOMContentLoaded events; fetches the glance activation method on load and skips if it is "shift" to avoid conflicting with Glance - ZenSplitViewParent: chrome-side actor that reads the glance pref and calls gZenViewSplitter.splitLinkFromURL(url) - ZenActorsManager: registers ZenSplitView in the static JSWINDOWACTORS map (same pattern as ZenGlance/ZenBoosts) - ZenViewSplitter: extracts splitLinkFromURL(url) from splitLinkInNewTab() so actors can call it directly without going through gContextMenu - split-view/moz.build: ships actor files to resource:///actors/ - zen/moz.build: adds split-view to DIRS so the build picks up the new moz.build https://claude.ai/code/session_01Mh21pBx11sPrnfbX7mECkt
Satisfies the consistent-return lint rule by ensuring every code path returns a value — the query case returns the pref string, action cases return null. https://claude.ai/code/session_01Mh21pBx11sPrnfbX7mECkt
…ments-d9aai feat: Add shift+click to open links in split view
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.
What
Adds
shift+clickon any page link as a shortcut to open that link in a new split-view tab alongside the current one.How
Implements a
ZenSplitViewJSWindowActor pair following the same pattern asZenGlanceandZenBoosts:ZenSplitViewChild(content process) — listens forclickevents. Interceptsshift+clickon<a href>elements and sends an async message to the parent to open the URL in split view. OnDOMContentLoadedit also queries the Glance activation method so it can yield when Glance is configured to useshift.ZenSplitViewParent(chrome process) — responds to the query by readingzen.glance.activation-method, and handles the open action by callinggZenViewSplitter.splitLinkFromURL(url).ZenViewSplitter— extracts asplitLinkFromURL(url)helper fromsplitLinkInNewTab()so the actor can invoke it directly without going throughgContextMenu.split-view/moz.build— ships the actor files toresource:///actors/.zen/moz.build— addssplit-viewtoDIRS.Conflict avoidance
Before intercepting a click, the child actor checks the Glance activation-method pref. If Glance is set to
shift, the click is passed through unchanged so the two features don't conflict.Test plan
shift+clicka link → opens in a new split-view tab beside the current tabctrl+click,alt+click,meta+clickare unaffectedshift:shift+clickstill opens Glance; split view is not triggeredctrl(or other):shift+clickopens split view; Glance opens onctrl+click