Skip to content

Browser v1-2 を v1 chrome に寄せる - #394

Draft
MocA-Love wants to merge 4 commits into
mainfrom
feature/browser-runtime-adapter-webcontentsview
Draft

Browser v1-2 を v1 chrome に寄せる#394
MocA-Love wants to merge 4 commits into
mainfrom
feature/browser-runtime-adapter-webcontentsview

Conversation

@MocA-Love

@MocA-Love MocA-Love commented Apr 23, 2026

Copy link
Copy Markdown
Owner

概要

Browser v1-2(WebContentsView 版ブラウザ)を v1 ブラウザと同等の基本機能レベルへ寄せるための draft PR。

<webview> ベースの v1 は、Electron 側の native view 挙動により z-index / pointer-events / opacity まわりが安定せず、複数タブ化の前提として限界がある。そのため WebContentsView ベースの v1-2 を feature flag 配下で追加し、まずは v1 と同じ操作感まで持っていく。

変更内容

  • main process に WebContentsView 管理用の BrowserViewManager を追加
  • browser-view tRPC router を追加し、register / bounds 更新 / tab 作成 / activate / close / navigate / reload / download 通知を扱う
  • renderer に BrowserPaneV3 を追加し、DOM の placeholder bounds に合わせて native view を配置
  • v1 と v1-2 で共通利用できる BrowserPaneChrome を追加
  • URL bar、back / forward / reload、loading / title / favicon、download 通知、URL 編集中の suspend を v1-2 側へ移植
  • 既存 v1 はデフォルト維持。localStorage["superset.browserV3"] === "1" の時だけ v1-2 を使う

現在の状態

  • 最新 main はローカルで取り込み済み。コンフリクトなし
  • 目的は「複数タブ対応の前に、v1-2 を v1 相当まで持っていく」こと
  • 複数タブ対応はこの PR の主対象外。v1 同等の安定性確認後に別段階で扱う
  • ローカルでは main 取り込み後の net diff は空。GitHub PR へ反映するには merge commit の push が別途必要

確認観点

  • Browser タブを開いて通常ページを表示できる
  • URL 入力、Enter navigation、back / forward / reload が動く
  • URL 編集中にページ側へクリックやキー入力が吸われない
  • v1-2 有効時にブラウザ外の workspace UI が黒くならない
  • v1-2 無効時に既存 v1 ブラウザの挙動が変わらない

MocA-Love and others added 3 commits April 23, 2026 01:27
…hind feature flag

<webview> は Electron 公式も非推奨寄りで、OOPIF ベースの native
compositor が CSS z-index / pointer-events / opacity を尊重しないため
multi-tab の安定運用に根本的な限界がある (scroll 吸われる・URL候補
クリック吸われる・ゴースト描画・右クリック出ない 等)。

codex 調査結果: WebContentsView への移行が本筋。1 tab = 1 native
view、main process で bounds/visibility/child order 管理、DOM overlay
を view 下に絶対重ねない設計にする。

この commit では v3 の骨格を投入:
- apps/desktop/src/main/lib/browser/browser-view-manager.ts
  paneId 単位で WebContentsView を生成、setBounds/setVisible/
  addChildView で制御。tab create/close/activate、navigate/back/
  forward/reload、suspend (URL 編集中などに active view を一時非
  表示) API。did-navigate/title/favicon/loading/fail-load/download
  を emit。persist:superset partition 共用。
- apps/desktop/src/lib/trpc/routers/browser-view/
  register/unregister/setBounds/createTab/closeTab/activateTab/
  navigate/goBack/goForward/reload/setSuspended + onTabs/
  onDownload subscription
- apps/desktop/src/renderer/.../BrowserPaneV3/
  placeholder div で bounds 報告、main process が view を上に
  配置。簡易 tab bar + toolbar + URL bar。URL 編集中 (focus〜blur)
  は view を suspend してクリックが DOM に届くようにしている。
- feature flag: localStorage "superset.browserV3"==="1" で v3 を
  使う。未設定は従来 v1 (<webview>)。

まだ bookmark / history / find-in-page / zoom / extension toolbar /
MCP createTarget 連携は v3 側に未移植。動作確認後に順次移行。
@coderabbitai

coderabbitai Bot commented Apr 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7af63c82-19b4-41cf-9efe-17da43f2ba0c

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/browser-runtime-adapter-webcontentsview

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@MocA-Love
MocA-Love force-pushed the main branch 2 times, most recently from edd89c5 to 50717bc Compare May 20, 2026 11:45
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.

1 participant