Summary
Add an in-app browser panel so users can view locally-running web servers started by agents (e.g. npm run dev output on localhost) without leaving Pear.
Approach
Use an Electron <webview> tag (renderer-side, no main-process plumbing needed). Key behaviors:
- Auto-detect port from PTY output — parse
localhost:\d+ / Local: http://... patterns from broker terminal stream and auto-navigate the webview
- URL bar with manual override for cases where the agent doesn't print a URL
- Nav controls — back, forward, reload
- Tab or side-panel layout (tab is simpler v1)
Implementation plan
Scope
localhost only — no external browsing needed. Estimated ~half a day for a solid v1.
Summary
Add an in-app browser panel so users can view locally-running web servers started by agents (e.g.
npm run devoutput on localhost) without leaving Pear.Approach
Use an Electron
<webview>tag (renderer-side, no main-process plumbing needed). Key behaviors:localhost:\d+/Local: http://...patterns from broker terminal stream and auto-navigate the webviewImplementation plan
webviewTag: trueinBrowserWindowwebPreferencesLocalBrowserReact component wrapping<webview>with URL bar + nav buttonsbroker.ts→ IPC event to rendererloadURLScope
localhost only — no external browsing needed. Estimated ~half a day for a solid v1.