Skip to content

feat: Open links in split view via shift+click#13564

Draft
JordanTranchina wants to merge 5 commits into
zen-browser:devfrom
JordanTranchina:dev
Draft

feat: Open links in split view via shift+click#13564
JordanTranchina wants to merge 5 commits into
zen-browser:devfrom
JordanTranchina:dev

Conversation

@JordanTranchina
Copy link
Copy Markdown

@JordanTranchina JordanTranchina commented May 5, 2026

What

Adds shift+click on any page link as a shortcut to open that link in a new split-view tab alongside the current one.

How

Implements a ZenSplitView JSWindowActor pair following the same pattern as ZenGlance and ZenBoosts:

  • ZenSplitViewChild (content process) — listens for click events. Intercepts shift+click on <a href> elements and sends an async message to the parent to open the URL in split view. On DOMContentLoaded it also queries the Glance activation method so it can yield when Glance is configured to use shift.
  • ZenSplitViewParent (chrome process) — responds to the query by reading zen.glance.activation-method, and handles the open action by calling gZenViewSplitter.splitLinkFromURL(url).
  • ZenViewSplitter — extracts a splitLinkFromURL(url) helper from splitLinkInNewTab() so the actor can invoke it directly without going through gContextMenu.
  • split-view/moz.build — ships the actor files to resource:///actors/.
  • zen/moz.build — adds split-view to DIRS.

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+click a link → opens in a new split-view tab beside the current tab
  • Plain click, ctrl+click, alt+click, meta+click are unaffected
  • Glance activation = shift: shift+click still opens Glance; split view is not triggered
  • Glance activation = ctrl (or other): shift+click opens split view; Glance opens on ctrl+click
  • Context-menu "Open in Split View" still works unchanged

claude and others added 5 commits May 5, 2026 04:20
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
@JordanTranchina JordanTranchina changed the title Create split on click feat: Open links in split view via shift+click May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants