You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(browser): support Chrome extension side panels in the built-in browser - #42844
Some Chrome extensions (Sider, Merlin, Claude in Chrome, Bitwarden's passkey flow, Raindrop) show their UI in a panel docked beside the web page instead of a popup. Orca's browser now has that panel. Clicking such an extension's toolbar button opens it on the right of the page, and it stays there while you browse.
Files
Added
Deleted
Net
Test
1
$\color{#1a7f37}{\Huge{\mathbf{+}}}$41
0
$\color{#1a7f37}{\Huge{\mathbf{+}}}$41
Prod
44
$\color{#1a7f37}{\Huge{\mathbf{+}}}$2091
$\color{#cf222e}{\Huge{\mathbf{−}}}$131
$\color{#1a7f37}{\Huge{\mathbf{+}}}$1960
What Changed
Before: chrome.sidePanel did not exist in Orca. Extensions that call it at startup (for example setPanelBehavior) threw in their background script, and there was nowhere to show a side panel.
After:
chrome.sidePanel works:
setOptions and getOptions, for all tabs or for one tab, merged the way Chrome merges them.
setPanelBehavior and getPanelBehavior.
open, which needs a user click or shortcut like in Chrome, and close.
getLayout, plus the onOpened and onClosed events.
runtime.getContexts reports SIDE_PANEL contexts.
The panel docks on the right of the browser workspace. It sits below the toolbar, and the page area shrinks to make room. It has a header with the extension's icon, name and a close button, and can be resized by dragging or with the arrow keys on the focused divider (minimum 360 px, at most two thirds of the pane). The width is saved once per drag.
open({windowId}) follows Chrome: it needs usable global options, leaves a tab's own panel that is already showing (the global one waits for other tabs), and otherwise prefers the extension's own panel for the active tab.
A global panel stays open while you switch pages in that workspace. A panel opened for one page shows only on that page and keeps its state while you're on another page.
With openPanelOnActionClick set, a toolbar click or the extension's _execute_action shortcut toggles the panel. Like Chrome, this takes precedence over the popup and grants no activeTab.
A panel is an extension page, not a tab:
tabs.*, tabs.getCurrent and webNavigation don't see it.
Ad-block rules and extension commands still apply.
Orca's shortcuts typed in the panel act for the page beside it: Mod+L focuses that page's address bar, and closing a tab closes its own split.
Links it opens go to a new Orca tab, as from popups.
How it works:
Main owns panel options and open panels (src/main/browser/extensions/side-panel/).
Renderer hosts one <webview> per open panel in the workspace slot (extension-side-panel/). The webviews are kept in module state, so React remounts never move them. Electron destroys a webview that leaves the DOM.
Attach: a webview attaches through a one-use marker that main mints, the same pattern as browser page attach. Main therefore knows the guest is a panel before it loads, and main alone picks its URL.
Small moves to stay under the 300-line limit: canExtensionSeeTabUrl moved to permissions/; the action.openPopup request moved to actions/browser-extension-popup-request.ts; chrome inset heights got their own module; browser pane layout hydration moved to a helper.
Shortcut forwarding can now take a function for its page id, because a global panel acts for whichever page it sits beside.
Why
It's a user request in #34756, and side panels are how the popular AI and research extensions present themselves.
On the hosting choice:
Not a WebContentsView laid over the window like docked DevTools. That needs a snapshot swap whenever Orca UI covers it, and bounds IPC on every frame during resize.
A <webview> composites in the renderer, so menus draw over it and resizing is CSS.
On behaviour, two other browsers show what to avoid:
Vivaldi ignores per-tab panels and paths set at runtime, so Claude in Chrome shows a blank panel there.
Edge has no real per-tab panels.
Orca follows Chromium's rules instead: SidePanelService options, and ExtensionActionRunner::RunAction checking the panel before the popup.
After: Sider's own side panel beside a page. The window was hidden during the test, so this image is put together from the window and each surface's own frame, at their real positions.
Before: N/A. Orca had no side panel, so there is nothing to show.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
On macOS, in a hidden dev build driven over CDP, with two test extensions:
Global panel: toolbar toggle; window.close() in the panel; the header close button; onOpened/onClosed payloads (/panel.html, windowId, tabId).
Per-tab panel opened Claude-in-Chrome style (setOptions({tabId}) not awaited, then open({tabId}) from action.onClicked).
Replacement and switching:
one extension's panel replaces another's;
a second page shows the global panel while the per-tab panel stays alive (switching back keeps its document);
closing a page closes its panel;
enabled:false closes the panel;
disabling the extension closes it.
Refusals and contexts:open() without a click is refused with Chrome's message; getContexts returns BACKGROUND plus SIDE_PANEL with the right origin.
Resize: dragging saves once on release; dragging past the minimum stops at 360 px.
Keys from a focused panel: Mod+L focuses the page's address bar; the extension's _execute_action shortcut toggles the panel.
Hidden workspace: a panel opened while its workspace is hidden loads once you switch back.
Real extension: Sider from the Web Store opens its panel and renders.
Unit test: browser-extension-side-panel-options.test.ts pins Chrome's option-merge rules (a tab's first options don't inherit the global page). The existing tests related to the changed files pass (pnpm test:changed), and pnpm check:changed passes.
Performance:
With no panel open, nothing is mounted. One IPC listener runs while browser slots exist.
An open panel runs in the extension's existing renderer process, alongside its worker. Measured: opening and closing it added or removed no process, and a small panel page added about 6 MB.
Closing a panel destroys it. Main pushes the panel list only when it changes, and skips per-tab option changes unless a global panel is open.
Not tested: Windows and Linux. It's a plain <webview> plus CSS, and the shortcuts go through the existing cross-platform forwarding.
Risk
The riskiest part is the webview attach path in main-window-webview-security.ts. A marker is admitted only if:
it is the panel's live, one-use token;
it comes from the main window;
it is in that profile's partition;
extensions are on.
src is dropped, and the guest gets the same hardened preferences as extension pages. Shortcut forwarding now also takes a resolver, but every existing caller passes a string and builds the same context once.
Other limits:
Panels exist only for local browser pages. Streamed, client-hosted and document pages, orca serve and mobile don't get them; open() rejects there.
The saved width is a new UI key. Older builds ignore it.
A revert removes everything. Extensions just lose the API again.
Known gaps, as follow-ups:
A message sent from a panel arrives with sender.tab set. Electron's native messaging does this for every WebContents, popups included.
Memory Saver discarding a page closes that page's panel. Orca reports a discard to extensions as tabs.onRemoved.
When a per-tab panel covers the global one, the global panel gets no onClosed/onOpened.
Switching to a tab that has its own options while the global panel is open doesn't switch to the tab's panel.
Level: Medium
AI Disclosure
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
Review was skipped as selected files did not have any reviewable changes.
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 27463172-6e99-4dee-8c61-65bc242da213
Commits
Reviewing files that changed from the base of the PR and between 08aca1d and 3f27fe1.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The change adds Chrome extension side-panel APIs, including configuration, opening, closing, and context listing. Main-process code manages panel state, guest attachment, and lifecycle cleanup. The browser renderer adds a dock with panel webviews and resizing. The change also adds toolbar side-panel toggling, popup request handling, and persisted panel-width settings.
Merge Risk: Minimal · previous review 08aca
This change adds Chrome extension side-panel support to the built-in browser. No unresolved merge-blocking issue was identified in the reviewed changes.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title 'feat(browser): support Chrome extension side panels in the built-in browser' states the main change. The changeset adds side-panel support (main-process host, open/options logic, sidePanel …
Description check
The description follows the repository template closely. It has ELI5, What Changed, Why, Linked Issue (Fixes #34756), Visual Proof (after image, with a before marked N/A and a reason), detailed Testin…
Linked Issues check
[#34756] asks for support for Chrome extension side panels in Orca's built-in browser, docked beside a page while the user browses. The whole-PR summary (merge base ab0ad6f to head 08aca1d) shows this…
Out of Scope Changes check
Each changed area maps to the side-panel objective or to a stated supporting need. Direct feature files: side-panel main modules, api/side-panel.ts, renderer side-panel dock and webviews, preload side…
Full details: Title check
Explanation
The title 'feat(browser): support Chrome extension side panels in the built-in browser' states the main change. The changeset adds side-panel support (main-process host, open/options logic, sidePanel API namespace, renderer dock and webviews) for Orca's built-in browser. It is specific and matches the objectives.
Full details: Description check
Explanation
The description follows the repository template closely. It has ELI5, What Changed, Why, Linked Issue (Fixes #34756), Visual Proof (after image, with a before marked N/A and a reason), detailed Testing, Risk with level and revert guidance, and Notes and Checklist sections. The AI Disclosure section is empty, but the template marks it as applicable only to non-team contributors, so this does not block the check.
Full details: Linked Issues check
Explanation
[#34756] asks for support for Chrome extension side panels in Orca's built-in browser, docked beside a page while the user browses. The whole-PR summary (merge base ab0ad6f to head 08aca1d) shows this behavior: (1) Main process: side-panel/ modules and api/side-panel.ts implement chrome.sidePanel setOptions/getOptions, setPanelBehavior/getPanelBehavior, open/close, getLayout, and onOpened/onClosed. (2) runtime.ts adds getContexts, which returns SIDE_PANEL contexts. (3) Renderer: BrowserExtensionSidePanelDock.tsx and browser-extension-side-panel-webviews.ts host one webview per open panel beside the page, with a resize handle and close control, and the page area shrinks through the --browser-side-panel-width variable. (4) Attach uses a one-use marker admitted in main-window-webview-security.ts. The unit test browser-extension-side-panel-options.test.ts covers option-merge rules. The issue has no non-coding requirements. The assessment relies on the summary; individual source paths were not re-read in this review. Follow-up gaps listed in the PR description (sender.tab, Memory Saver discard, event omissions, tab-panel switching) are not requirements of #34756.
Full details: Out of Scope Changes check
Explanation
Each changed area maps to the side-panel objective or to a stated supporting need. Direct feature files: side-panel main modules, api/side-panel.ts, renderer side-panel dock and webviews, preload side-panel API, shared side-panel types, and IPC handlers. Supporting changes: getContexts for SIDE_PANEL contexts; popup-request module extracted so action.openPopup and the openPanelOnActionClick path share it; canExtensionSeeTabUrl moved to permissions/ and used by the tab model and discard model; tab lifecycle and session cleanup for side-panel options; shortcut forwarding accepting a resolver so panel shortcuts act for the adjacent page; chrome-inset helper and viewport change so the page shrinks beside the panel; persisted width key across ui-slice, client-ui-params, wsl-move dispositions, and persisted-ui-state-types; browser-pane layout hydration helper. The PR states that the moves were needed to stay under the 300-line limit. Each one supports panel layout, persistence, routing, or that file-size limit. No unrelated change was identified in the reviewed summary. Source files were not individually re-read, so this verdict rests on the summary.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Files skipped from review as they are similar to previous changes: 1
src/renderer/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
Adds chrome.sidePanel to Orca's built-in browser. Main owns each extension's panel
options (global and per tab, merged like Chrome), the persisted openPanelOnActionClick
behavior, and the open panels; the renderer docks a webview per panel on the right of
the browser workspace, attached through a main-minted marker so main knows the guest
before it loads.
- setOptions/getOptions, setPanelBehavior/getPanelBehavior, open (user gesture),
close, getLayout, onOpened/onClosed
- toolbar clicks and _execute_action toggle the panel when the behavior is set
- runtime.getContexts reports SIDE_PANEL contexts
- panels are not tabs: tabs.*, webNavigation and the tab model skip them; DNR,
commands and Orca shortcuts still apply, acting for the page beside the panel
- resizable, width saved once per drag; panels run in the extension's own process
…rd-resizable panel
- open({windowId}) needs usable global options, keeps a tab's own panel that is showing
(the global one waits for other tabs), and otherwise prefers the extension's own panel
for the active tab, as Chrome's OpenGlobalExtensionSidePanel does
- close({tabId}) only rejects for a global panel in that tab's workspace
- the panel list drops an initial fetch from an earlier subscription
- the resize divider takes focus, resizes with the arrow keys and reports its width
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
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.
ELI5
Some Chrome extensions (Sider, Merlin, Claude in Chrome, Bitwarden's passkey flow, Raindrop) show their UI in a panel docked beside the web page instead of a popup. Orca's browser now has that panel. Clicking such an extension's toolbar button opens it on the right of the page, and it stays there while you browse.
What Changed
Before:
chrome.sidePaneldid not exist in Orca. Extensions that call it at startup (for examplesetPanelBehavior) threw in their background script, and there was nowhere to show a side panel.After:
chrome.sidePanelworks:setOptionsandgetOptions, for all tabs or for one tab, merged the way Chrome merges them.setPanelBehaviorandgetPanelBehavior.open, which needs a user click or shortcut like in Chrome, andclose.getLayout, plus theonOpenedandonClosedevents.runtime.getContextsreportsSIDE_PANELcontexts.open({windowId})follows Chrome: it needs usable global options, leaves a tab's own panel that is already showing (the global one waits for other tabs), and otherwise prefers the extension's own panel for the active tab.openPanelOnActionClickset, a toolbar click or the extension's_execute_actionshortcut toggles the panel. Like Chrome, this takes precedence over the popup and grants no activeTab.tabs.*,tabs.getCurrentand webNavigation don't see it.How it works:
src/main/browser/extensions/side-panel/).<webview>per open panel in the workspace slot (extension-side-panel/). The webviews are kept in module state, so React remounts never move them. Electron destroys a webview that leaves the DOM.canExtensionSeeTabUrlmoved topermissions/; theaction.openPopuprequest moved toactions/browser-extension-popup-request.ts; chrome inset heights got their own module; browser pane layout hydration moved to a helper.Why
It's a user request in #34756, and side panels are how the popular AI and research extensions present themselves.
On the hosting choice:
WebContentsViewlaid over the window like docked DevTools. That needs a snapshot swap whenever Orca UI covers it, and bounds IPC on every frame during resize.<webview>composites in the renderer, so menus draw over it and resizing is CSS.On behaviour, two other browsers show what to avoid:
Orca follows Chromium's rules instead:
SidePanelServiceoptions, andExtensionActionRunner::RunActionchecking the panel before the popup.Linked Issue
Fixes #34756
Visual Proof
After: Sider's own side panel beside a page. The window was hidden during the test, so this image is put together from the window and each surface's own frame, at their real positions.
Before: N/A. Orca had no side panel, so there is nothing to show.
Testing
On macOS, in a hidden dev build driven over CDP, with two test extensions:
window.close()in the panel; the header close button;onOpened/onClosedpayloads (/panel.html,windowId,tabId).setOptions({tabId})not awaited, thenopen({tabId})fromaction.onClicked).enabled:falsecloses the panel;open()without a click is refused with Chrome's message;getContextsreturnsBACKGROUNDplusSIDE_PANELwith the right origin._execute_actionshortcut toggles the panel.Unit test:
browser-extension-side-panel-options.test.tspins Chrome's option-merge rules (a tab's first options don't inherit the global page). The existing tests related to the changed files pass (pnpm test:changed), andpnpm check:changedpasses.Performance:
Not tested: Windows and Linux. It's a plain
<webview>plus CSS, and the shortcuts go through the existing cross-platform forwarding.Risk
The riskiest part is the webview attach path in
main-window-webview-security.ts. A marker is admitted only if:srcis dropped, and the guest gets the same hardened preferences as extension pages. Shortcut forwarding now also takes a resolver, but every existing caller passes a string and builds the same context once.Other limits:
orca serveand mobile don't get them;open()rejects there.Known gaps, as follow-ups:
sender.tabset. Electron's native messaging does this for every WebContents, popups included.tabs.onRemoved.onClosed/onOpened.Level: Medium
AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)