Repository navigation
Closed
Labels
Description
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 needswebviewTagon 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.browserplugin (pane.graphics, Kitty graphics): it draws inside the terminal region, not a View area.
Scope
- Core and contract:
DisplayKind::Browserwith 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.openopens 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
localhostmeans 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 ExplorerOpen in Browseron an HTML file. - Delete the chromux path in the same change:
plugins/browser/,herdr-core/src/chromux.rs, the browser binding inherdr-core/src/pane_content.rs, the SwiftBrowser*.swiftviews andBrowserPaneOpener; rewritedocs/BROWSER_PANES.mdfor displays.
Done when
hide browser open http://localhost:5173from 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
[-]web: show browser panes, relaying CDP screencast and input through hided[/-][+]desktop: browser displays in View areas, drawn by an Electron WebContentsView[/+]