MCPcopy Create free account
hub / github.com/backnotprop/plannotator / shouldTryRemoteBrowserFallback

Function shouldTryRemoteBrowserFallback

packages/server/browser.ts:95–105  ·  view source on GitHub ↗
(isRemote: boolean)

Source from the content-addressed store, hash-verified

93 * Fails silently if browser can't be opened
94 */
95export function shouldTryRemoteBrowserFallback(isRemote: boolean): boolean {
96 if (!isRemote) return false;
97 const plannotatorBrowser = process.env.PLANNOTATOR_BROWSER;
98 const browser = process.env.BROWSER;
99 // Treat headless sentinels (e.g. BROWSER=true from Claude Code's agent view)
100 // as if no real browser handler were configured, so the IPC fallback still runs.
101 const hasRealHandler =
102 (plannotatorBrowser && !isNoOpBrowserSentinel(plannotatorBrowser)) ||
103 (browser && !isNoOpBrowserSentinel(browser));
104 return !hasRealHandler;
105}
106
107function buildGlimpseHtml(url: string): string {
108 const encodedUrl = JSON.stringify(url);

Callers 2

browser.test.tsFile · 0.90
openBrowserFunction · 0.85

Calls 1

isNoOpBrowserSentinelFunction · 0.70

Tested by

no test coverage detected