Skip to content

desktop: browser displays in View areas, drawn by an Electron WebContentsView #155

Closed

Description

@yansfil

Decision

A browser is a View area display, not a Herdr pane.
The core gains DisplayKind::Browser beside File and Diff (herdr-core/src/view_layout.rs), so the area tab bar, splits, drag, preview and pin, and per-checkout persistence in workspace-views.json apply unchanged.
The desktop app's main process owns one Electron WebContentsView per shown browser display and places it over the rect the shell reports through the hideHost preload bridge.
The chromux-backed browser pane is dropped, because chromux is deprecated.

Rejected:

  • iframe: most sites refuse framing (X-Frame-Options, frame-ancestors), and a cross-origin frame hides its URL and history from the shell.
  • <webview>: Electron discourages it, and it needs webviewTag on the shell window that loads hided's http page, which weakens the sandbox PR Add the desktop app: the web shell in its own window, attached through hide connect #149 set.
  • CDP screencast into a canvas: lag, IME, clipboard and file dialogs all degrade, and it needs a separate Chrome owner.
  • Herdr's official.browser plugin (pane.graphics, Kitty graphics): it draws inside the terminal region, not a View area.

Scope

  • Core and contract: DisplayKind::Browser with its URL and title; open, navigate and close as View area events; persisted with the layout.
  • Desktop main: create, place, hide and destroy views as displays are shown, moved between areas and closed; one persistent session partition for browser content, with no preload or Node in it; window.open opens another browser display.
  • Overlays: while a shell overlay (⌘K, menus, dialogs, popovers) intersects a browser display, show a capturePage() still in its place and hide the native view, then restore it.
  • Shell: the display's toolbar (address, back, forward, reload), drawn as a Pen board first, and the page title in the area tab.
  • Plain browser tab: the display shows a quiet unavailable state with an action that opens the URL in the system browser; no iframe fallback.
  • Remote checkout: the page loads on this Mac, so localhost means this Mac; port forwarding is out of scope.
  • Entry points: hide browser open <url> from a terminal, which opens the display in the calling pane's checkout, and Explorer Open in Browser on an HTML file.
  • Delete the chromux path in the same change: plugins/browser/, herdr-core/src/chromux.rs, the browser binding in herdr-core/src/pane_content.rs, the Swift Browser*.swift views and BrowserPaneOpener; rewrite docs/BROWSER_PANES.md for displays.

Done when

  • hide browser open http://localhost:5173 from an agent terminal shows the page in a View area of the desktop app, follows area resizes, survives a move to another area without reloading, and takes Korean IME text.
  • ⌘K opened over a browser display draws on top of it.
  • Closing the display ends its renderer process, and a relaunch restores the display with its URL.

Waits for PR #149 (the desktop app) to land.

Activity

  1. added
    enhancement
    rust
    on Sep 25, 2026
  2. changed the title [-]web: show browser panes, relaying CDP screencast and input through hided[/-] [+]desktop: browser displays in View areas, drawn by an Electron WebContentsView[/+] on Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementrust

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions