Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
Remove non-functional claude.ai web handoff from Open with AI (#1945)
tim-inkeepecd00b4b008f
diff --git a/packages/app/src/components/FileSidebar.dom.test.tsx b/packages/app/src/components/FileSidebar.dom.test.tsxindex f04384b28..bb4903453 100644--- a/packages/app/src/components/FileSidebar.dom.test.tsx+++ b/packages/app/src/components/FileSidebar.dom.test.tsx@@ -79,7 +79,6 @@ let sidebarSearchThrows = false;let projectPatchResult: { ok: true } | { ok: false; error: unknown } = { ok: true };let openInAgentSubmenuProps: Array<{input: unknown;- webFallbackVisible: boolean;}> = [];let toastSuccesses: unknown[][] = [];let toastErrors: unknown[][] = [];@@ -178,14 +177,9 @@ mock.module('@/components/UpdateNotices', () => ({}));mock.module('@/components/handoff/OpenInAgentEmptySpaceSubmenu', () => ({- OpenInAgentEmptySpaceSubmenu: (props: { input: unknown; webFallbackVisible: boolean }) => {+ OpenInAgentEmptySpaceSubmenu: (props: { input: unknown }) => {openInAgentSubmenuProps.push(props);- return (- <div- data-testid="open-in-agent-empty-space-submenu"- data-web-fallback-visible={String(props.webFallbackVisible)}- />- );+ return <div data-testid="open-in-agent-empty-space-submenu" />;},}));@@ -555,7 +549,6 @@ describe('FileSidebar runtime behavior', () => {appearance: { sidebar: { showAllFiles: false } },});- expect(openInAgentSubmenuProps.at(-1)?.webFallbackVisible).toBe(false);expect(openInAgentSubmenuProps.at(-1)?.input).toEqual({docContext: null,docPath: '',diff --git a/packages/app/src/components/FileSidebar.tsx b/packages/app/src/components/FileSidebar.tsxindex 3d55be52d..d032514e0 100644--- a/packages/app/src/components/FileSidebar.tsx+++ b/packages/app/src/components/FileSidebar.tsx@@ -732,7 +732,6 @@ function FileSidebarInner({ onOpenSearch }: FileSidebarProps) {input={emptySpaceHandoffInput}installStates={handoffInstallStates}dispatch={dispatchHandoff}- webFallbackVisible={false}/><ContextMenuItemdisabled={!workspace}diff --git a/packages/app/src/components/FileTree.duplicate.dom.test.tsx b/packages/app/src/components/FileTree.duplicate.dom.test.tsxindex 216553861..0f4fedd20 100644--- a/packages/app/src/components/FileTree.duplicate.dom.test.tsx+++ b/packages/app/src/components/FileTree.duplicate.dom.test.tsx@@ -317,13 +317,8 @@ mock.module('./handoff/useHandoffDispatch', () => ({}));mock.module('./handoff/OpenInAgentContextSubmenu', () => ({- OpenInAgentContextSubmenu: ({ webFallbackVisible }: { webFallbackVisible?: boolean }) => (- <button- type="button"- role="menuitem"- data-testid="file-tree-menu-open-in-agent"- data-web-fallback-visible={String(webFallbackVisible)}- >+ OpenInAgentContextSubmenu: () => (+ <button type="button" role="menuitem" data-testid="file-tree-menu-open-in-agent">Open with AI</button>),diff --git a/packages/app/src/components/FileTree.tsx b/packages/app/src/components/FileTree.tsxindex 9582adf65..59373ae35 100644--- a/packages/app/src/components/FileTree.tsx+++ b/packages/app/src/components/FileTree.tsx@@ -753,7 +753,6 @@ function FileTreeMenu({installStates={handoff.installStates}isElectronHost={handoff.isElectronHost}dispatch={handoff.dispatch}- webFallbackVisible={false}/><DropdownMenuSub><DropdownMenuSubTrigger>@@ -901,7 +900,6 @@ function FileTreeMenu({installStates={handoff.installStates}isElectronHost={handoff.isElectronHost}dispatch={handoff.dispatch}- webFallbackVisible={true}/>)}<DropdownMenuSub>diff --git a/packages/app/src/components/handoff/OpenInAgentContextSubmenu.dom.test.tsx b/packages/app/src/components/handoff/OpenInAgentContextSubmenu.dom.test.tsxindex 62d9a25b2..9e2c275f5 100644--- a/packages/app/src/components/handoff/OpenInAgentContextSubmenu.dom.test.tsx+++ b/packages/app/src/components/handoff/OpenInAgentContextSubmenu.dom.test.tsx@@ -60,11 +60,9 @@ function installStates(async function renderSubmenu({input = readyInput,states = installStates(),- webFallbackVisible,}: {input?: HandoffDispatchInput | null;states?: Record<HandoffTarget, InstallState>;- webFallbackVisible?: boolean;} = {}) {const { OpenInAgentContextSubmenu } = await import('./OpenInAgentContextSubmenu');const dispatchCalls: Array<{ input: HandoffDispatchInput; target: HandoffTarget }> = [];@@ -81,7 +79,6 @@ async function renderSubmenu({input={input}installStates={states}isElectronHost={true}- webFallbackVisible={webFallbackVisible}/></DropdownMenuContent></DropdownMenu>,@@ -107,7 +104,7 @@ describe('OpenInAgentContextSubmenu runtime behavior', () => {expect(screen.getByTestId('file-tree-open-in-codex')).toBeTruthy();expect(screen.queryByTestId('file-tree-open-in-claude-cowork') === null).toBe(true);expect(screen.queryByTestId('file-tree-open-in-cursor') === null).toBe(true);- expect(screen.getByTestId('file-tree-open-in-claude-web-fallback')).toBeTruthy();+ expect(screen.queryByTestId('file-tree-open-in-claude-web-fallback') === null).toBe(true);await userEvent.click(screen.getByRole('menuitem', { name: 'Open with AI Codex' }));@@ -126,17 +123,39 @@ describe('OpenInAgentContextSubmenu runtime behavior', () => {expect(dispatch).not.toHaveBeenCalled();});- test('hides the Claude web fallback when the caller opts out or Claude is installed', async () => {- await renderSubmenu({ webFallbackVisible: false });- expect(screen.queryByTestId('file-tree-open-in-claude-web-fallback') === null).toBe(true);- cleanup();-+ test('renders an installed Claude row (no claude.ai fallback anywhere)', async () => {await renderSubmenu({states: installStates({'claude-code': { installed: true, lastChecked: 1 },}),});- expect(screen.queryByTestId('file-tree-open-in-claude-web-fallback') === null).toBe(true);expect(screen.getByTestId('file-tree-open-in-claude-code')).toBeTruthy();+ expect(screen.queryByTestId('file-tree-open-in-claude-web-fallback') === null).toBe(true);+ });++ test('shows the empty hint when no targets are installed', async () => {+ await renderSubmenu({+ states: installStates({+ 'claude-code': { installed: false, lastChecked: 1 },+ 'claude-cowork': { installed: false, lastChecked: 1 },+ codex: { installed: false, lastChecked: 1 },+ cursor: { installed: false, lastChecked: 1 },+ }),+ });+ const empty = screen.getByTestId('file-tree-open-in-empty');+ expect(empty.textContent).toContain('No installed agents found');+ });++ test('shows the checking hint while the install probe is pending', async () => {+ await renderSubmenu({+ states: installStates({+ 'claude-code': { installed: null },+ 'claude-cowork': { installed: null },+ codex: { installed: null },+ cursor: { installed: null },+ }),+ });+ const empty = screen.getByTestId('file-tree-open-in-empty');+ expect(empty.textContent).toContain('Checking for installed agents');});});diff --git a/packages/app/src/components/handoff/OpenInAgentContextSubmenu.tsx b/packages/app/src/components/handoff/OpenInAgentContextSubmenu.tsxindex a2cd8f44f..f018ab674 100644--- a/packages/app/src/components/handoff/OpenInAgentContextSubmenu.tsx+++ b/packages/app/src/components/handoff/OpenInAgentContextSubmenu.tsx@@ -1,12 +1,7 @@-import {- composeFilePrompt,- type HandoffOutcome,- type HandoffTarget,- type InstallState,-} from '@inkeep/open-knowledge-core';+import type { HandoffOutcome, HandoffTarget, InstallState } from '@inkeep/open-knowledge-core';import { t } from '@lingui/core/macro';import { Trans, useLingui } from '@lingui/react/macro';-import { ExternalLink, Sparkles, SquareTerminal } from 'lucide-react';+import { Sparkles, SquareTerminal } from 'lucide-react';import type { ReactNode } from 'react';import {DropdownMenuItem,@@ -16,9 +11,8 @@ import {DropdownMenuSubTrigger,} from '@/components/ui/dropdown-menu.tsx';import { useIsEmbedded } from '@/hooks/use-is-embedded';-import { useConfigContext } from '@/lib/config-context';import { VISIBLE_TARGETS } from '@/lib/handoff/targets';-import { dispatchClaudeWebFallback, TargetIcon } from './OpenInAgentMenuItem';+import { TargetIcon } from './OpenInAgentMenuItem';import { useTerminalLaunch } from './TerminalLaunchContext';import type { HandoffDispatchInput } from './useHandoffDispatch';@@ -36,50 +30,33 @@ interface OpenInAgentContextSubmenuProps {* `useInstalledAgents()` call so every file row shares one coordinator. */readonly installStates: Record<HandoffTarget, InstallState>;/** Host classifier — left in the prop signature for consumers that already- * thread it; v1 doesn't use it because uninstalled rows aren't rendered.+ * thread it; uninstalled rows aren't rendered so it isn't read here.* Web-host Cursor uses the same probe + filter as every other target now- * that `cursor-two-step.ts` has a `/api/spawn-cursor` fetch fallback- * (PR #625). */+ * that `cursor-two-step.ts` has a `/api/spawn-cursor` fetch fallback. */readonly isElectronHost: boolean;readonly dispatch: (target: HandoffTarget,input: HandoffDispatchInput,) => Promise<HandoffOutcome>;- /** Whether to render the "Open in claude.ai →" web-fallback row when Claude- * is not installed. Defaults to `true` (file-row surface — the cloud URL- * carries the per-file prompt). Folder + empty-space mounts pass `false`:- * the claude.ai URL has no `folder=` companion param, so the cloud agent- * would receive a prompt with no project grounding. Hiding the row beats- * rendering a degraded path. */- readonly webFallbackVisible?: boolean;}export function OpenInAgentContextSubmenu(props: OpenInAgentContextSubmenuProps): ReactNode {const { t } = useLingui();const isEmbedded = useIsEmbedded();- const { merged } = useConfigContext();const terminalLaunch = useTerminalLaunch();- const autoOpen = merged?.appearance?.preview?.autoOpen ?? true;if (isEmbedded) return null;- const { input, installStates, dispatch, webFallbackVisible = true } = props;+ const { input, installStates, dispatch } = props;const inputMissing = input === null;const hint = contextRowHint(inputMissing);const installedTargets = VISIBLE_TARGETS.filter((target) => installStates[target.id]?.installed === true,);+ const probePending = VISIBLE_TARGETS.some(+ (target) => installStates[target.id]?.installed == null,+ );- const claudeInstalled = installStates['claude-code']?.installed === true;-- const prompt =- input !== null && input.docContext !== null- ? composeFilePrompt(input.docContext.relativePath, autoOpen)- : '';-- const handleClaudeWebFallback = (): void => {- if (input === null) return;- void dispatchClaudeWebFallback(prompt);- };+ const showEmptyHint = installedTargets.length === 0 && terminalLaunch === null;return (<DropdownMenuSub>@@ -115,20 +92,13 @@ export function OpenInAgentContextSubmenu(props: OpenInAgentContextSubmenuProps)</DropdownMenuItem>);})}- {webFallbackVisible && !claudeInstalled ? (- <DropdownMenuItem- onSelect={handleClaudeWebFallback}- disabled={inputMissing}- data-testid="file-tree-open-in-claude-web-fallback"- aria-label={t`Open in claude.ai, opens in browser with prompt pre-filled`}- >- <ExternalLink className="size-4" aria-hidden="true" />- <span className="flex-1">- <Trans>Open in claude.ai →</Trans>- </span>- <span aria-hidden="true" className="ml-2 text-muted-foreground text-xs">- <Trans>opens in browser</Trans>- </span>+ {showEmptyHint ? (+ <DropdownMenuItem disabled data-testid="file-tree-open-in-empty">+ {probePending ? (+ <Trans>Checking for installed agents</Trans>+ ) : (+ <Trans>No installed agents found</Trans>+ )}</DropdownMenuItem>) : null}{terminalLaunch !== null ? (diff --git a/packages/app/src/components/handoff/OpenInAgentEmptySpaceSubmenu.dom.test.tsx b/packages/app/src/components/handoff/OpenInAgentEmptySpaceSubmenu.dom.test.tsxindex b67e6c8a5..b4a8f71a2 100644--- a/packages/app/src/components/handoff/OpenInAgentEmptySpaceSubmenu.dom.test.tsx+++ b/packages/app/src/components/handoff/OpenInAgentEmptySpaceSubmenu.dom.test.tsx@@ -59,11 +59,9 @@ function installStates(async function renderSubmenu({input = readyInput,states = installStates(),- webFallbackVisible,}: {input?: HandoffDispatchInput | null;states?: Record<HandoffTarget, InstallState>;- webFallbackVisible?: boolean;} = {}) {const { OpenInAgentEmptySpaceSubmenu } = await import('./OpenInAgentEmptySpaceSubmenu');const dispatchCalls: Array<{ input: HandoffDispatchInput; target: HandoffTarget }> = [];@@ -78,12 +76,7 @@ async function renderSubmenu({<button type="button">Project files</button></ContextMenuTrigger><ContextMenuContent forceMount={true}>- <OpenInAgentEmptySpaceSubmenu- dispatch={dispatch}- input={input}- installStates={states}- webFallbackVisible={webFallbackVisible}- />+ <OpenInAgentEmptySpaceSubmenu dispatch={dispatch} input={input} installStates={states} /></ContextMenuContent></ContextMenu>,);@@ -109,7 +102,7 @@ describe('OpenInAgentEmptySpaceSubmenu runtime behavior', () => {afterEach(() => cleanup());test('renders as a ContextMenu submenu, filters visible installed targets, and dispatches rows', async () => {- const { dispatchCalls } = await renderSubmenu({ webFallbackVisible: false });+ const { dispatchCalls } = await renderSubmenu();const trigger = await openEmptySpaceSubmenu();expect(trigger.getAttribute('data-slot')).toBe('context-menu-sub-trigger');@@ -137,24 +130,14 @@ describe('OpenInAgentEmptySpaceSubmenu runtime behavior', () => {expect(dispatch).not.toHaveBeenCalled();});- test('defaults the Claude web fallback on but hides the whole submenu when nothing can render', async () => {- await renderSubmenu({- states: installStates({- codex: { installed: false, lastChecked: 1 },- cursor: { installed: false, lastChecked: 1 },- }),- });- await openEmptySpaceSubmenu();- expect(screen.getByTestId('empty-space-open-in-claude-web-fallback')).toBeTruthy();- cleanup();-+ test('hides the whole submenu when nothing can render (no installed targets, no terminal launcher)', async () => {await renderSubmenu({states: installStates({'claude-code': { installed: false, lastChecked: 1 },+ 'claude-cowork': { installed: false, lastChecked: 1 },codex: { installed: false, lastChecked: 1 },cursor: { installed: false, lastChecked: 1 },}),- webFallbackVisible: false,});expect(screen.queryByRole('menuitem', { name: 'Open with AI' }) === null).toBe(true);});diff --git a/packages/app/src/components/handoff/OpenInAgentEmptySpaceSubmenu.tsx b/packages/app/src/components/handoff/OpenInAgentEmptySpaceSubmenu.tsxindex 2816d4a8a..df7e5002f 100644--- a/packages/app/src/components/handoff/OpenInAgentEmptySpaceSubmenu.tsx+++ b/packages/app/src/components/handoff/OpenInAgentEmptySpaceSubmenu.tsx@@ -1,12 +1,7 @@-import {- composeFilePrompt,- type HandoffOutcome,- type HandoffTarget,- type InstallState,-} from '@inkeep/open-knowledge-core';+import type { HandoffOutcome, HandoffTarget, InstallState } from '@inkeep/open-knowledge-core';import { t } from '@lingui/core/macro';import { Trans, useLingui } from '@lingui/react/macro';-import { ExternalLink, Sparkles, SquareTerminal } from 'lucide-react';+import { Sparkles, SquareTerminal } from 'lucide-react';import type { ReactNode } from 'react';import {ContextMenuItem,@@ -16,9 +11,8 @@ import {ContextMenuSubTrigger,} from '@/components/ui/context-menu';import { useIsEmbedded } from '@/hooks/use-is-embedded';-import { useConfigContext } from '@/lib/config-context';import { VISIBLE_TARGETS } from '@/lib/handoff/targets';-import { dispatchClaudeWebFallback, TargetIcon } from './OpenInAgentMenuItem';+import { TargetIcon } from './OpenInAgentMenuItem';import { useTerminalLaunch } from './TerminalLaunchContext';import type { HandoffDispatchInput } from './useHandoffDispatch';@@ -43,21 +37,14 @@ interface OpenInAgentEmptySpaceSubmenuProps {target: HandoffTarget,input: HandoffDispatchInput,) => Promise<HandoffOutcome>;- /** Show the "Open in claude.ai →" web-fallback row when Claude Desktop- * isn't installed. Default `true` matches the file-surface convention;- * folder + empty-space surfaces pass `false` — the claude.ai web URL has- * no companion `folder=` param to ground the cloud agent. */- readonly webFallbackVisible?: boolean;}export function OpenInAgentEmptySpaceSubmenu(props: OpenInAgentEmptySpaceSubmenuProps): ReactNode {const { t } = useLingui();const isEmbedded = useIsEmbedded();- const { merged } = useConfigContext();const terminalLaunch = useTerminalLaunch();- const autoOpen = merged?.appearance?.preview?.autoOpen ?? true;if (isEmbedded) return null;- const { input, installStates, dispatch, webFallbackVisible = true } = props;+ const { input, installStates, dispatch } = props;const inputMissing = input === null;const hint = emptySpaceRowHint(inputMissing);@@ -65,21 +52,8 @@ export function OpenInAgentEmptySpaceSubmenu(props: OpenInAgentEmptySpaceSubmenu(target) => installStates[target.id]?.installed === true,);- const claudeInstalled = installStates['claude-code']?.installed === true;-- const prompt =- input !== null && input.docContext !== null- ? composeFilePrompt(input.docContext.relativePath, autoOpen)- : '';-- const handleClaudeWebFallback = (): void => {- if (input === null) return;- void dispatchClaudeWebFallback(prompt);- };-- const fallbackRowVisible = webFallbackVisible && !claudeInstalled;const terminalRowVisible = terminalLaunch !== null;- if (installedTargets.length === 0 && !fallbackRowVisible && !terminalRowVisible) {+ if (installedTargets.length === 0 && !terminalRowVisible) {return null;}@@ -117,22 +91,6 @@ export function OpenInAgentEmptySpaceSubmenu(props: OpenInAgentEmptySpaceSubmenu</ContextMenuItem>);})}- {webFallbackVisible && !claudeInstalled ? (- <ContextMenuItem- onSelect={handleClaudeWebFallback}- disabled={inputMissing}- data-testid="empty-space-open-in-claude-web-fallback"- aria-label={t`Open in claude.ai, opens in browser with prompt pre-filled`}- >- <ExternalLink className="size-4" aria-hidden="true" />- <span className="flex-1">- <Trans>Open in claude.ai →</Trans>- </span>- <span aria-hidden="true" className="ml-2 text-muted-foreground text-xs">- <Trans>opens in browser</Trans>- </span>- </ContextMenuItem>- ) : null}{terminalLaunch !== null ? (<><ContextMenuSeparator />diff --git a/packages/app/src/components/handoff/OpenInAgentMenu.dom.test.tsx b/packages/app/src/components/handoff/OpenInAgentMenu.dom.test.tsxindex 543b6520d..30050e50b 100644--- a/packages/app/src/components/handoff/OpenInAgentMenu.dom.test.tsx+++ b/packages/app/src/components/handoff/OpenInAgentMenu.dom.test.tsx@@ -16,7 +16,6 @@ mock.module('@lingui/react/macro', () => ({const refreshCalls: string[] = [];const dispatchCalls: Array<{ target: string; input: HandoffDispatchInput }> = [];-const fallbackPrompts: string[] = [];let states: Record<string, { installed: boolean | null; lastChecked?: number }> = {};mock.module('./useInstalledAgents', () => ({@@ -48,20 +47,12 @@ mock.module('@/hooks/use-is-embedded', () => ({useIsEmbedded: () => false,}));-const successToastForWebFallback = (displayName: string) =>- `Opened ${displayName} in your browser.`;-mock.module('./OpenInAgentMenuItem', () => ({OpenInAgentMenuItem: ({ target, onSelect }: { target: TargetData; onSelect: () => void }) => (<button type="button" data-testid={`open-in-agent-row-${target.id}`} onClick={onSelect}>{target.displayName}</button>),- dispatchClaudeWebFallback: (prompt: string) => {- fallbackPrompts.push(prompt);- return Promise.resolve();- },- successToastForWebFallback,}));const input: HandoffDispatchInput = {@@ -91,16 +82,12 @@ describe('OpenInAgentMenu runtime behavior', () => {cleanup();refreshCalls.length = 0;dispatchCalls.length = 0;- fallbackPrompts.length = 0;states = {};});- test('exports the shell component and success toast re-export', async () => {+ test('exports the shell component', async () => {const mod = await import('./OpenInAgentMenu');- const itemMod = await import('./OpenInAgentMenuItem');-expect(typeof mod.OpenInAgentMenu).toBe('function');- expect(mod.successToastForWebFallback).toBe(itemMod.successToastForWebFallback);});test('trigger uses visible Open with AI text as its accessible name', async () => {@@ -140,9 +127,9 @@ describe('OpenInAgentMenu runtime behavior', () => {expect(dispatchCalls).toEqual([{ target: 'codex', input }]);});- test('Claude web fallback appears when the visible Claude row is not installed', async () => {+ test('shows the empty hint (no claude.ai fallback) when nothing is installed', async () => {states = {- 'claude-cowork': { installed: true, lastChecked: 1 },+ 'claude-cowork': { installed: false, lastChecked: 1 },'claude-code': { installed: false, lastChecked: 1 },codex: { installed: false, lastChecked: 1 },cursor: { installed: false, lastChecked: 1 },@@ -150,22 +137,22 @@ describe('OpenInAgentMenu runtime behavior', () => {await renderMenu();await openMenu();- const fallback = screen.getByTestId('open-in-agent-claude-web-fallback');- expect(fallback.textContent).toContain('Open in claude.ai');-- await userEvent.click(fallback);- expect(fallbackPrompts).toHaveLength(1);- expect(fallbackPrompts[0]).toContain('docs/notes.md');+ const empty = screen.getByTestId('open-in-agent-empty');+ expect(empty.textContent).toContain('No installed agents found');+ expect(screen.queryByTestId('open-in-agent-claude-web-fallback')).toBeNull();});- test('Claude web fallback is hidden when claude-code is installed', async () => {+ test('shows the checking hint while the install probe is pending', async () => {states = {- 'claude-cowork': { installed: false, lastChecked: 1 },- 'claude-code': { installed: true, lastChecked: 1 },+ 'claude-cowork': { installed: null },+ 'claude-code': { installed: null },+ codex: { installed: null },+ cursor: { installed: null },};await renderMenu();await openMenu();- expect(screen.queryByTestId('open-in-agent-claude-web-fallback')).toBeNull();+ const empty = screen.getByTestId('open-in-agent-empty');+ expect(empty.textContent).toContain('Checking for installed agents');});});diff --git a/packages/app/src/components/handoff/OpenInAgentMenu.non-modal.dom.test.tsx b/packages/app/src/components/handoff/OpenInAgentMenu.non-modal.dom.test.tsxindex 3c3a4db3c..a0cce2345 100644--- a/packages/app/src/components/handoff/OpenInAgentMenu.non-modal.dom.test.tsx+++ b/packages/app/src/components/handoff/OpenInAgentMenu.non-modal.dom.test.tsx@@ -21,9 +21,6 @@ if (globalWithDomShims.ResizeObserver === undefined) {globalWithDomShims.ResizeObserver = NoopResizeObserver;}-mock.module('@/lib/config-context', () => ({- useConfigContext: () => ({ merged: null }),-}));mock.module('./useInstalledAgents', () => ({useInstalledAgents: () => ({ states: {}, refresh: () => {} }),}));diff --git a/packages/app/src/components/handoff/OpenInAgentMenu.tsx b/packages/app/src/components/handoff/OpenInAgentMenu.tsxindex 39a71186e..4a3da53cd 100644--- a/packages/app/src/components/handoff/OpenInAgentMenu.tsx+++ b/packages/app/src/components/handoff/OpenInAgentMenu.tsx@@ -1,12 +1,11 @@-import {- composeFilePrompt,- type HandoffOutcome,- type HandoffTarget,- type InstallState,- type TargetData,+import type {+ HandoffOutcome,+ HandoffTarget,+ InstallState,+ TargetData,} from '@inkeep/open-knowledge-core';import { Trans, useLingui } from '@lingui/react/macro';-import { ExternalLink, Sparkles, SquareTerminal } from 'lucide-react';+import { Sparkles, SquareTerminal } from 'lucide-react';import type { ComponentProps, ReactNode } from 'react';import { useRef, useState } from 'react';import { Button } from '@/components/ui/button';@@ -18,19 +17,12 @@ import {DropdownMenuTrigger,} from '@/components/ui/dropdown-menu';import { useIsEmbedded } from '@/hooks/use-is-embedded';-import { useConfigContext } from '@/lib/config-context';import { VISIBLE_TARGETS } from '@/lib/handoff/targets';-import {- dispatchClaudeWebFallback,- OpenInAgentMenuItem,- successToastForWebFallback,-} from './OpenInAgentMenuItem';+import { OpenInAgentMenuItem } from './OpenInAgentMenuItem';import { useTerminalLaunch } from './TerminalLaunchContext';import { type HandoffDispatchInput, useHandoffDispatch } from './useHandoffDispatch';import { useInstalledAgents } from './useInstalledAgents';-export { successToastForWebFallback };-interface OpenInAgentMenuProps {/** Active doc context. When `null`, the trigger renders disabled (nothing* to dispatch). Surfaces own the docContext + projectDir + docPath. */@@ -47,7 +39,6 @@ interface OpenInAgentMenuContentProps {input: HandoffDispatchInput,) => Promise<HandoffOutcome>;readonly isElectronHost: boolean;- readonly autoOpen: boolean;readonly align?: ComponentProps<typeof DropdownMenuContent>['align'];readonly className?: string;}@@ -57,17 +48,11 @@ function OpenInAgentMenuContent({states,dispatch,isElectronHost,- autoOpen,align = 'end',className = 'min-w-[220px]',}: OpenInAgentMenuContentProps): ReactNode {const { t } = useLingui();const terminalLaunch = useTerminalLaunch();- const isSelectionScope = Boolean(input?.selection);- const prompt =- input !== null && input.docContext !== null- ? composeFilePrompt(input.docContext.relativePath, autoOpen)- : '';const handleSelect = (target: TargetData): void => {if (input === null) return;@@ -79,12 +64,7 @@ function OpenInAgentMenuContent({);const probePending = VISIBLE_TARGETS.some((target) => states[target.id]?.installed == null);- const claudeInstalled = states['claude-code']?.installed === true;-- const handleClaudeWebFallback = (): void => {- if (input === null) return;- void dispatchClaudeWebFallback(prompt);- };+ const showEmptyHint = installedTargets.length === 0 && terminalLaunch === null;return (<DropdownMenuContent align={align} className={className} data-testid="open-in-agent-menu">@@ -96,13 +76,12 @@ function OpenInAgentMenuContent({target={target}installState={installState}isElectronHost={isElectronHost}- prompt={prompt}onSelect={() => handleSelect(target)}/>);})}- {isSelectionScope && installedTargets.length === 0 ? (- <DropdownMenuItem disabled data-testid="open-in-agent-selection-empty">+ {showEmptyHint ? (+ <DropdownMenuItem disabled data-testid="open-in-agent-empty">{probePending ? (<Trans>Checking for installed agents</Trans>) : (@@ -110,22 +89,6 @@ function OpenInAgentMenuContent({)}</DropdownMenuItem>) : null}- {!claudeInstalled && !isSelectionScope ? (- <DropdownMenuItem- onSelect={handleClaudeWebFallback}- disabled={input === null}- data-testid="open-in-agent-claude-web-fallback"- aria-label={t`Open in claude.ai, opens in browser with prompt pre-filled`}- >- <ExternalLink className="size-4" aria-hidden="true" />- <span className="flex-1">- <Trans>Open in claude.ai →</Trans>- </span>- <span aria-hidden="true" className="ml-2 text-muted-foreground text-xs">- <Trans>opens in browser</Trans>- </span>- </DropdownMenuItem>- ) : null}{terminalLaunch !== null ? (<><DropdownMenuSeparator />@@ -152,8 +115,6 @@ function OpenInAgentMenuContent({export function OpenInAgentMenu({ input, open, onOpenChange }: OpenInAgentMenuProps): ReactNode {const { states, refresh } = useInstalledAgents();const { dispatch } = useHandoffDispatch();- const { merged } = useConfigContext();- const autoOpen = merged?.appearance?.preview?.autoOpen ?? true;const [internalOpen, setInternalOpen] = useState(false);const sawPointerDownRef = useRef(false);const isEmbedded = useIsEmbedded();@@ -207,7 +168,6 @@ export function OpenInAgentMenu({ input, open, onOpenChange }: OpenInAgentMenuPrstates={states}dispatch={dispatch}isElectronHost={isElectronHost}- autoOpen={autoOpen}/></DropdownMenu>);diff --git a/packages/app/src/components/handoff/OpenInAgentMenuItem.dom.test.tsx b/packages/app/src/components/handoff/OpenInAgentMenuItem.dom.test.tsxindex b473ffad5..0e8949a33 100644--- a/packages/app/src/components/handoff/OpenInAgentMenuItem.dom.test.tsx+++ b/packages/app/src/components/handoff/OpenInAgentMenuItem.dom.test.tsx@@ -49,7 +49,6 @@ describe('OpenInAgentMenuItem runtime behavior', () => {target={target('codex')}installState={{ installed: true, lastChecked: 1 }}isElectronHost- prompt="Open docs/notes.md"onSelect={() => selected.push('codex')}/>,);@@ -59,16 +58,14 @@ describe('OpenInAgentMenuItem runtime behavior', () => {expect(selected).toEqual(['codex']);});- test('not-installed Claude row exposes install and web-fallback submenu affordances', async () => {+ test('not-installed Claude row exposes the install affordance only (no claude.ai web fallback)', async () => {const { OpenInAgentMenuItem } = await import('./OpenInAgentMenuItem');const openedUrls: string[] = [];- const webFallbackSuccesses: string[] = [];renderMenuItem(<OpenInAgentMenuItemtarget={target('claude-code')}installState={{ installed: false, lastChecked: 1 }}isElectronHost- prompt="Open docs/notes.md"onSelect={() => {throw new Error('disabled row should not dispatch');}}@@ -76,7 +73,6 @@ describe('OpenInAgentMenuItem runtime behavior', () => {openedUrls.push(url);return { ok: true };}}- onWebFallbackSuccess={(entry) => webFallbackSuccesses.push(entry.id)}/>,);@@ -91,12 +87,10 @@ describe('OpenInAgentMenuItem runtime behavior', () => {expect(screen.getByTestId('open-in-agent-message-claude-code').textContent).toBe('Requires Claude Desktop.',);+ expect(screen.queryByTestId('open-in-agent-web-fallback-claude-code')).toBeNull();+await userEvent.click(screen.getByTestId('open-in-agent-install-claude-code'));- await userEvent.click(screen.getByTestId('open-in-agent-web-fallback-claude-code'));- expect(openedUrls[0]).toBe('https://claude.com/download');- expect(openedUrls[1]).toContain('https://claude.ai/new?q=');- expect(decodeURIComponent(openedUrls[1].split('q=')[1] ?? '')).toBe('Open docs/notes.md');- expect(webFallbackSuccesses).toEqual(['claude-code']);+ expect(openedUrls).toEqual(['https://claude.com/download']);});});diff --git a/packages/app/src/components/handoff/OpenInAgentMenuItem.test.ts b/packages/app/src/components/handoff/OpenInAgentMenuItem.test.tsindex ae96634d0..bb3c21c8a 100644--- a/packages/app/src/components/handoff/OpenInAgentMenuItem.test.ts+++ b/packages/app/src/components/handoff/OpenInAgentMenuItem.test.ts@@ -14,8 +14,6 @@ describe('OpenInAgentMenuItem module surface', () => {expect(typeof mod.OpenInAgentMenuItem).toBe('function');expect(typeof mod.computeRowState).toBe('function');expect(typeof mod.computeRowHint).toBe('function');- expect(typeof mod.computeWebFallbackUrl).toBe('function');- expect(typeof mod.successToastForWebFallback).toBe('function');expect(typeof mod.OK_DESKTOP_INSTALL_URL).toBe('string');expect(mod.OK_DESKTOP_INSTALL_URL.startsWith('https://')).toBe(true);});@@ -101,16 +99,6 @@ describe('computeRowState — Cursor parity with other targets (no host short-ciexpect(state.tooltip?.installAction.url).toBe('https://cursor.com/');});- test('Cursor disabled-tooltip has NO web-fallback affordance (only Claude rows have one)', async () => {- const { computeRowState } = await import('./OpenInAgentMenuItem');- const state = computeRowState({- target: targetById('cursor'),- installState: { installed: false },- isElectronHost: false,- });- expect(state.tooltip?.webFallback).toBeUndefined();- });-test('Cursor on Electron-host with installed:true is enabled', async () => {const { computeRowState } = await import('./OpenInAgentMenuItem');const state = computeRowState({@@ -123,7 +111,7 @@ describe('computeRowState — Cursor parity with other targets (no host short-ci});});-describe('computeRowState — branch 1: pre-probe (AC8)', () => {+describe('computeRowState — branch 1: pre-probe', () => {test.each([['claude-cowork' as const, true],['claude-code' as const, true],@@ -145,8 +133,8 @@ describe('computeRowState — branch 1: pre-probe (AC8)', () => {});});-describe('computeRowState — branch 3: not installed', () => {- test('Codex disabled tooltip — install affordance only, no web fallback', async () => {+describe('computeRowState — branch 3: not installed → install affordance only', () => {+ test('Codex disabled tooltip — install affordance', async () => {const { computeRowState } = await import('./OpenInAgentMenuItem');const state = computeRowState({target: targetById('codex'),@@ -157,10 +145,9 @@ describe('computeRowState — branch 3: not installed', () => {expect(state.tooltip?.message).toBe('Requires Codex Desktop.');expect(state.tooltip?.installAction.label).toBe('Install Codex Desktop →');expect(state.tooltip?.installAction.url).toBe('https://openai.com/codex');- expect(state.tooltip?.webFallback).toBeUndefined();});- test('Claude Cowork disabled tooltip — install + web-fallback affordance', async () => {+ test('Claude Cowork disabled tooltip — install affordance', async () => {const { computeRowState } = await import('./OpenInAgentMenuItem');const state = computeRowState({target: targetById('claude-cowork'),@@ -171,11 +158,9 @@ describe('computeRowState — branch 3: not installed', () => {expect(state.tooltip?.message).toBe('Requires Claude Desktop.');expect(state.tooltip?.installAction.label).toBe('Install Claude Desktop →');expect(state.tooltip?.installAction.url).toBe('https://claude.com/download');- expect(state.tooltip?.webFallback).toBeDefined();- expect(state.tooltip?.webFallback?.label).toBe('Open in claude.ai →');});- test('Claude disabled tooltip — install + web-fallback affordance', async () => {+ test('Claude disabled tooltip — install affordance', async () => {const { computeRowState } = await import('./OpenInAgentMenuItem');const state = computeRowState({target: targetById('claude-code'),@@ -183,10 +168,10 @@ describe('computeRowState — branch 3: not installed', () => {isElectronHost: true,});expect(state.enabled).toBe(false);- expect(state.tooltip?.webFallback?.label).toBe('Open in claude.ai →');+ expect(state.tooltip?.installAction.label).toBe('Install Claude Desktop →');});- test('Cursor (Electron) disabled tooltip — install affordance only, no web fallback', async () => {+ test('Cursor (Electron) disabled tooltip — install affordance', async () => {const { computeRowState } = await import('./OpenInAgentMenuItem');const state = computeRowState({target: targetById('cursor'),@@ -197,7 +182,6 @@ describe('computeRowState — branch 3: not installed', () => {expect(state.tooltip?.message).toBe('Requires Cursor.');expect(state.tooltip?.installAction.label).toBe('Install Cursor →');expect(state.tooltip?.installAction.url).toBe('https://cursor.com/');- expect(state.tooltip?.webFallback).toBeUndefined();});});@@ -222,7 +206,7 @@ describe('computeRowState — branch 4: installed → enabled', () => {['claude-cowork' as const],['claude-code' as const],['codex' as const],- ])('row %s on web with installed:true is enabled (only Cursor is web-host disabled)', async (id) => {+ ])('row %s on web with installed:true is enabled', async (id) => {const { computeRowState } = await import('./OpenInAgentMenuItem');const state = computeRowState({target: targetById(id),@@ -234,50 +218,8 @@ describe('computeRowState — branch 4: installed → enabled', () => {});});-describe('computeWebFallbackUrl — wraps buildClaudeAiWebUrl', () => {- test('round-trips a simple prompt', async () => {- const { computeWebFallbackUrl } = await import('./OpenInAgentMenuItem');- const url = computeWebFallbackUrl('hello world');- expect(url).toBe('https://claude.ai/new?q=hello%20world');- });-- test('encodes the OK-composed prompt template', async () => {- const { computeWebFallbackUrl } = await import('./OpenInAgentMenuItem');- const prompt =- 'Open Knowledge doc: specs/foo/SPEC.md. Use the open-knowledge MCP tool for backlinks and related context.';- const url = computeWebFallbackUrl(prompt);- expect(url.startsWith('https://claude.ai/new?q=')).toBe(true);- const q = url.slice('https://claude.ai/new?q='.length);- expect(decodeURIComponent(q)).toBe(prompt);- });-- test('survives unicode + percent + space + em-dash without corruption', async () => {- const { computeWebFallbackUrl } = await import('./OpenInAgentMenuItem');- const prompt = 'café — 100%';- const url = computeWebFallbackUrl(prompt);- const q = url.slice('https://claude.ai/new?q='.length);- expect(decodeURIComponent(q)).toBe(prompt);- });-});--describe('successToastForWebFallback — distinct from dispatch toast copy', () => {- test('matches the agreed copy for each Claude target', async () => {- const { successToastForWebFallback } = await import('./OpenInAgentMenuItem');- expect(successToastForWebFallback('Claude Cowork')).toBe(- 'Opened Claude Cowork in your browser.',- );- expect(successToastForWebFallback('Claude')).toBe('Opened Claude in your browser.');- });-- test('explicitly differs from `Opened in <name>.` (dispatch copy) — fallback signals web', async () => {- const { successToastForWebFallback } = await import('./OpenInAgentMenuItem');- const message = successToastForWebFallback('Claude Cowork');- expect(message).not.toBe('Opened in Claude Cowork.');- });-});-describe('install-state cardinality used by the dropdown', () => {- test('every KNOWN_TARGETS entry maps to one of the three branches under any install state', async () => {+ test('every KNOWN_TARGETS entry maps to one of the branches under any install state', async () => {const { computeRowState } = await import('./OpenInAgentMenuItem');const installStates: ReadonlyArray<InstallState> = [{ installed: null },diff --git a/packages/app/src/components/handoff/OpenInAgentMenuItem.tsx b/packages/app/src/components/handoff/OpenInAgentMenuItem.tsxindex a964e1ae0..d2aa23534 100644--- a/packages/app/src/components/handoff/OpenInAgentMenuItem.tsx+++ b/packages/app/src/components/handoff/OpenInAgentMenuItem.tsx@@ -1,7 +1,6 @@import {AGENT_ICON_COLORS,AGENT_ICON_COLORS_DARK,- buildClaudeAiWebUrl,type InstallState,type TargetData,} from '@inkeep/open-knowledge-core';@@ -9,7 +8,6 @@ import { t } from '@lingui/core/macro';import { useLingui } from '@lingui/react/macro';import { useTheme } from 'next-themes';import type { CSSProperties, ReactNode, SVGProps } from 'react';-import { toast as sonnerToast } from 'sonner';import { ClaudeIcon } from '@/components/icons/claude';import { CodexBrandIcon } from '@/components/icons/codex';import { CursorIcon } from '@/components/icons/cursor';@@ -69,14 +67,13 @@ interface DisabledTooltip {* hint text rendered inline on the trigger row). */readonly message: string;readonly installAction: RowAffordance;- readonly webFallback?: RowAffordance;}interface RowState {readonly enabled: boolean;- /** When non-null, render a submenu with install + (Claude only) web-fallback- * affordances instead of a plain disabled item. The `message` field doubles- * as the short right-aligned status hint for the trigger row. */+ /** When non-null, render a submenu with the install affordance instead of a+ * plain disabled item. The `message` field doubles as the short+ * right-aligned status hint for the trigger row. */readonly tooltip: DisabledTooltip | null;}@@ -110,14 +107,6 @@ export function computeRowState(args: {label: t`Install ${brand} →`,url: target.installUrl,},- ...(target.hasWebFallback- ? {- webFallback: {- label: t`Open in claude.ai →`,- url: '',- },- }- : {}),};return { enabled: false, tooltip };}@@ -125,53 +114,20 @@ export function computeRowState(args: {return { enabled: true, tooltip: null };}-export function computeWebFallbackUrl(prompt: string): string {- return buildClaudeAiWebUrl(prompt);-}--export function successToastForWebFallback(displayName: string): string {- return t`Opened ${displayName} in your browser.`;-}--const CLAUDE_WEB_FALLBACK_LABEL = 'claude.ai';--export async function dispatchClaudeWebFallback(- prompt: string,- openExternal: typeof defaultOpenExternal = defaultOpenExternal,-): Promise<void> {- const url = buildClaudeAiWebUrl(prompt);- const outcome = await openExternal(url);- if (outcome.ok) {- sonnerToast.success(successToastForWebFallback(CLAUDE_WEB_FALLBACK_LABEL));- } else {- sonnerToast.error(t`Couldn't open ${CLAUDE_WEB_FALLBACK_LABEL} in your browser.`);- }-}-interface OpenInAgentMenuItemProps {readonly target: TargetData;readonly installState: InstallState;readonly isElectronHost: boolean;- readonly prompt: string;/** Fired only when the row is enabled and the user selects it. The hook* layer (`useHandoffDispatch`) handles toast + telemetry. */readonly onSelect: () => void;readonly openExternal?: typeof defaultOpenExternal;- /** Test seam — fires after a successful web-fallback click so the caller can- * surface a toast. Defaults to a no-op; production callers will wire sonner. */- readonly onWebFallbackSuccess?: (target: TargetData) => void;- /** Test seam — fires after a failed web-fallback click (popup-blocker,- * exotic browser, DOM-less environment). Parallel to onWebFallbackSuccess- * so the caller can surface a sonner error toast. Defaults to a no-op. */- readonly onWebFallbackError?: (target: TargetData, reason: string) => void;}export function OpenInAgentMenuItem(props: OpenInAgentMenuItemProps): ReactNode {const { t } = useLingui();- const { target, installState, isElectronHost, prompt, onSelect } = props;+ const { target, installState, isElectronHost, onSelect } = props;const openExternal = props.openExternal ?? defaultOpenExternal;- const onWebFallbackSuccess = props.onWebFallbackSuccess ?? (() => {});- const onWebFallbackError = props.onWebFallbackError ?? (() => {});const { displayName: targetDisplayName } = target;const rowState = computeRowState({ target, installState, isElectronHost });@@ -182,18 +138,6 @@ export function OpenInAgentMenuItem(props: OpenInAgentMenuItemProps): ReactNodevoid openExternal(rowState.tooltip.installAction.url);};- const handleWebFallbackClick = () => {- void (async () => {- const url = computeWebFallbackUrl(prompt);- const outcome = await openExternal(url);- if (outcome.ok) {- onWebFallbackSuccess(target);- } else {- onWebFallbackError(target, outcome.detail ?? outcome.reason);- }- })();- };-if (rowState.enabled) {return (<DropdownMenuItem@@ -231,7 +175,6 @@ export function OpenInAgentMenuItem(props: OpenInAgentMenuItemProps): ReactNodeconst accessibleLabel = hint? t`Open with AI ${targetDisplayName}, ${hint}`: t`Open with AI ${targetDisplayName}`;- const webFallbackLabel = rowState.tooltip.webFallback?.label ?? '';return (<DropdownMenuSub><DropdownMenuSubTrigger@@ -264,18 +207,6 @@ export function OpenInAgentMenuItem(props: OpenInAgentMenuItemProps): ReactNode><span>{rowState.tooltip.installAction.label}</span></DropdownMenuItem>- {rowState.tooltip.webFallback ? (- <DropdownMenuItem- onSelect={handleWebFallbackClick}- data-testid={`open-in-agent-web-fallback-${target.id}`}- aria-label={t`${webFallbackLabel}, opens in browser with prompt pre-filled`}- >- <span className="flex-1">{rowState.tooltip.webFallback.label}</span>- <span aria-hidden="true" className="ml-2 text-muted-foreground text-xs">- {t`opens in browser with prompt pre-filled`}- </span>- </DropdownMenuItem>- ) : null}</DropdownMenuSubContent></DropdownMenuSub>);diff --git a/packages/app/src/lib/handoff/targets.test.ts b/packages/app/src/lib/handoff/targets.test.tsindex 533a4bc6a..841244c7d 100644--- a/packages/app/src/lib/handoff/targets.test.ts+++ b/packages/app/src/lib/handoff/targets.test.ts@@ -25,16 +25,6 @@ describe('KNOWN_TARGETS', () => {expect(cursor?.schemes).toEqual(['cursor:']);});- test('only claude-cowork + claude-code set hasWebFallback (PQ6 secondary affordance)', () => {- for (const t of KNOWN_TARGETS) {- if (t.id === 'claude-cowork' || t.id === 'claude-code') {- expect(t.hasWebFallback).toBe(true);- } else {- expect(t.hasWebFallback).toBeFalsy();- }- }- });-test('every target has an https install URL', () => {for (const t of KNOWN_TARGETS) {expect(t.installUrl.startsWith('https://')).toBe(true);diff --git a/packages/app/src/lib/handoff/targets.ts b/packages/app/src/lib/handoff/targets.tsindex 85dea8cf8..eb6d493bf 100644--- a/packages/app/src/lib/handoff/targets.ts+++ b/packages/app/src/lib/handoff/targets.ts@@ -7,7 +7,6 @@ export const KNOWN_TARGETS = [appBrandName: 'Claude Desktop',schemes: ['claude:'],installUrl: 'https://claude.com/download',- hasWebFallback: true,tagline: "Conversational pairing in Claude Desktop's Cowork tab.",},{@@ -16,7 +15,6 @@ export const KNOWN_TARGETS = [appBrandName: 'Claude Desktop',schemes: ['claude:'],installUrl: 'https://claude.com/download',- hasWebFallback: true,tagline: "Agentic coding in Claude Desktop's Code tab.",},{diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.jsonindex fe2323cd9..47eb44496 100644--- a/packages/app/src/locales/en/messages.json+++ b/packages/app/src/locales/en/messages.json@@ -33,7 +33,6 @@"092Wah": ["Enter a name for this template."],"0BB9ID": ["No headings yet."],"0NA4b3": ["Keep my version"],- "0S9PW_": ["Open in claude.ai →"],"0YEbfk": ["Connect to AI tools"],"0_J12R": ["New file from template \"",@@ -328,7 +327,6 @@"96w9hU": ["Something went wrong opening this file (HTTP ", ["status"], ")."],"99eR72": ["Visual editor table selection"],"9Bd18D": ["Failed to load hub pages"],- "9NC_MT": ["Couldn't open ", ["CLAUDE_WEB_FALLBACK_LABEL"], " in your browser."],"9NJWgv": ["Backlinks"],"9PQysm": ["Hide advanced"],"9R7pRC": ["No tags match \"", ["trimmed"], "\". Continue typing to create one."],@@ -1065,7 +1063,6 @@],"Z8KDox": ["Enter a folder name (e.g. brain)."],"Z8lGw6": ["Share"],- "Z9BoIy": ["opens in browser with prompt pre-filled"],"ZBYKxv": ["Reverts every change this agent made to <0>",["docName"],@@ -1135,7 +1132,6 @@"/ and all files inside? This action cannot be undone."],"a9OzSn": ["No pages found for \"", ["trimmedQuery"], "\""],- "aA51jP": ["Open in claude.ai, opens in browser with prompt pre-filled"],"aE2_XM": ["One pattern per line — appended to <0>.okignore</0>."],"aENGMB": ["Semantic search adds meaning-based ranking to the search tool so conceptually-related pages surface even without shared keywords."@@ -1344,7 +1340,6 @@"hYDc6B": ["Name cannot be empty"],"hYgDIe": ["Create"],"hZoBHK": ["Empty starting content"],- "h_HYHD": ["Opened ", ["displayName"], " in your browser."],"haHgQj": ["Copied relative path"],"he3ygx": ["Copy"],"hjO0Mq": ["Add tab"],@@ -1465,7 +1460,6 @@"lond3p": ["Shows above the code body. Round-trips as `title=\"...\"` in markdown."],"lrhetp": ["+ ", ["overflow"], " more"],"ls1N1w": ["(missing)"],- "lsOFZR": [["webFallbackLabel"], ", opens in browser with prompt pre-filled"],"lyWa43": ["Project-level disconnected pages"],"lzmtKp": ["Failed to load folder properties: ", ["message"]],"lzwo7p": ["Could not open GitHub sign-in. Please try again."],@@ -1602,7 +1596,6 @@"pZAs1T": ["Failed to load outgoing links"],"pajIrl": ["Could not turn off the terminal: ", ["0"]],"pbwTg6": [["seconds"], "s ago"],- "pcfY8r": ["opens in browser"],"pckX1A": [["0", "plural", { "one": ["#", " use"], "other": ["#", " uses"] }]],"pd0UH2": ["Align right"],"pgq_xf": [["0"], "/", ["1"], " ", ["2"]],diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.poindex 720e3326b..9caec31b7 100644--- a/packages/app/src/locales/en/messages.po+++ b/packages/app/src/locales/en/messages.po@@ -357,10 +357,6 @@ msgstr "{userName} · {tabCount, plural, one {# tab} other {# tabs}}"msgid "{userName}, {tabCount, plural, one {# concurrent tab} other {# concurrent tabs}}"msgstr "{userName}, {tabCount, plural, one {# concurrent tab} other {# concurrent tabs}}"-#: src/components/handoff/OpenInAgentMenuItem.tsx-msgid "{webFallbackLabel}, opens in browser with prompt pre-filled"-msgstr "{webFallbackLabel}, opens in browser with prompt pre-filled"-#: src/components/EditorFooter.tsxmsgid "{words, plural, one {word} other {words}}"msgstr "{words, plural, one {word} other {words}}"@@ -930,6 +926,7 @@ msgid "Checkbox"msgstr "Checkbox"#: src/components/handoff/EditWithAiPopover.tsx+#: src/components/handoff/OpenInAgentContextSubmenu.tsx#: src/components/handoff/OpenInAgentMenu.tsxmsgid "Checking for installed agents"msgstr "Checking for installed agents"@@ -1556,10 +1553,6 @@ msgstr "Couldn't load templates"msgid "Couldn't move to Trash"msgstr "Couldn't move to Trash"-#: src/components/handoff/OpenInAgentMenuItem.tsx-msgid "Couldn't open {CLAUDE_WEB_FALLBACK_LABEL} in your browser."-msgstr "Couldn't open {CLAUDE_WEB_FALLBACK_LABEL} in your browser."-#: src/components/DocumentErrorBoundary.tsxmsgid "Couldn't open document"msgstr "Couldn't open document"@@ -3567,6 +3560,7 @@ msgid "No Incoming"msgstr "No Incoming"#: src/components/handoff/EditWithAiPopover.tsx+#: src/components/handoff/OpenInAgentContextSubmenu.tsx#: src/components/handoff/OpenInAgentMenu.tsxmsgid "No installed agents found"msgstr "No installed agents found"@@ -3877,19 +3871,6 @@ msgstr "Open graph"msgid "Open in {shareBranch}"msgstr "Open in {shareBranch}"-#: src/components/handoff/OpenInAgentContextSubmenu.tsx-#: src/components/handoff/OpenInAgentEmptySpaceSubmenu.tsx-#: src/components/handoff/OpenInAgentMenu.tsx-#: src/components/handoff/OpenInAgentMenuItem.tsx-msgid "Open in claude.ai →"-msgstr "Open in claude.ai →"--#: src/components/handoff/OpenInAgentContextSubmenu.tsx-#: src/components/handoff/OpenInAgentEmptySpaceSubmenu.tsx-#: src/components/handoff/OpenInAgentMenu.tsx-msgid "Open in claude.ai, opens in browser with prompt pre-filled"-msgstr "Open in claude.ai, opens in browser with prompt pre-filled"-#: src/components/ShareBranchSwitchDialog.tsxmsgid "Open in current branch"msgstr "Open in current branch"@@ -4038,10 +4019,6 @@ msgstr "Open with built-in text editor"msgid "Open, navigate, accept, or dismiss CodeMirror completion suggestions."msgstr "Open, navigate, accept, or dismiss CodeMirror completion suggestions."-#: src/components/handoff/OpenInAgentMenuItem.tsx-msgid "Opened {displayName} in your browser."-msgstr "Opened {displayName} in your browser."-#: src/components/ShareReceiveDialog.tsxmsgid "Opening..."msgstr "Opening..."@@ -4054,16 +4031,6 @@ msgstr "Opens a folder picker to choose where to clone the repository."msgid "Opens in a new tab"msgstr "Opens in a new tab"-#: src/components/handoff/OpenInAgentContextSubmenu.tsx-#: src/components/handoff/OpenInAgentEmptySpaceSubmenu.tsx-#: src/components/handoff/OpenInAgentMenu.tsx-msgid "opens in browser"-msgstr "opens in browser"--#: src/components/handoff/OpenInAgentMenuItem.tsx-msgid "opens in browser with prompt pre-filled"-msgstr "opens in browser with prompt pre-filled"-#: src/components/EmptyEditorState.tsxmsgid "or start from scratch <0/>"msgstr "or start from scratch <0/>"diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.jsonindex 1ace4e0b7..ef2234e42 100644--- a/packages/app/src/locales/pseudo/messages.json+++ b/packages/app/src/locales/pseudo/messages.json@@ -33,7 +33,6 @@"092Wah": ["Ēńţēŕ à ńàḿē ƒōŕ ţĥĩś ţēḿƥĺàţē."],"0BB9ID": ["Ńō ĥēàďĩńĝś ŷēţ."],"0NA4b3": ["Ķēēƥ ḿŷ vēŕśĩōń"],- "0S9PW_": ["Ōƥēń ĩń ćĺàũďē.àĩ →"],"0YEbfk": ["Ćōńńēćţ ţō ÀĨ ţōōĺś"],"0_J12R": ["Ńēŵ ƒĩĺē ƒŕōḿ ţēḿƥĺàţē \"",@@ -328,7 +327,6 @@"96w9hU": ["Śōḿēţĥĩńĝ ŵēńţ ŵŕōńĝ ōƥēńĩńĝ ţĥĩś ƒĩĺē (ĤŢŢƤ ", ["status"], ")."],"99eR72": ["Vĩśũàĺ ēďĩţōŕ ţàƀĺē śēĺēćţĩōń"],"9Bd18D": ["Ƒàĩĺēď ţō ĺōàď ĥũƀ ƥàĝēś"],- "9NC_MT": ["Ćōũĺďń'ţ ōƥēń ", ["CLAUDE_WEB_FALLBACK_LABEL"], " ĩń ŷōũŕ ƀŕōŵśēŕ."],"9NJWgv": ["ßàćķĺĩńķś"],"9PQysm": ["Ĥĩďē àďvàńćēď"],"9R7pRC": ["Ńō ţàĝś ḿàţćĥ \"", ["trimmed"], "\". Ćōńţĩńũē ţŷƥĩńĝ ţō ćŕēàţē ōńē."],@@ -1065,7 +1063,6 @@],"Z8KDox": ["Ēńţēŕ à ƒōĺďēŕ ńàḿē (ē.ĝ. ƀŕàĩń)."],"Z8lGw6": ["Śĥàŕē"],- "Z9BoIy": ["ōƥēńś ĩń ƀŕōŵśēŕ ŵĩţĥ ƥŕōḿƥţ ƥŕē-ƒĩĺĺēď"],"ZBYKxv": ["Ŕēvēŕţś ēvēŕŷ ćĥàńĝē ţĥĩś àĝēńţ ḿàďē ţō <0>",["docName"],@@ -1135,7 +1132,6 @@"/ àńď àĺĺ ƒĩĺēś ĩńśĩďē? Ţĥĩś àćţĩōń ćàńńōţ ƀē ũńďōńē."],"a9OzSn": ["Ńō ƥàĝēś ƒōũńď ƒōŕ \"", ["trimmedQuery"], "\""],- "aA51jP": ["Ōƥēń ĩń ćĺàũďē.àĩ, ōƥēńś ĩń ƀŕōŵśēŕ ŵĩţĥ ƥŕōḿƥţ ƥŕē-ƒĩĺĺēď"],"aE2_XM": ["Ōńē ƥàţţēŕń ƥēŕ ĺĩńē — àƥƥēńďēď ţō <0>.ōķĩĝńōŕē</0>."],"aENGMB": ["Śēḿàńţĩć śēàŕćĥ àďďś ḿēàńĩńĝ-ƀàśēď ŕàńķĩńĝ ţō ţĥē śēàŕćĥ ţōōĺ śō ćōńćēƥţũàĺĺŷ-ŕēĺàţēď ƥàĝēś śũŕƒàćē ēvēń ŵĩţĥōũţ śĥàŕēď ķēŷŵōŕďś."@@ -1344,7 +1340,6 @@"hYDc6B": ["Ńàḿē ćàńńōţ ƀē ēḿƥţŷ"],"hYgDIe": ["Ćŕēàţē"],"hZoBHK": ["Ēḿƥţŷ śţàŕţĩńĝ ćōńţēńţ"],- "h_HYHD": ["Ōƥēńēď ", ["displayName"], " ĩń ŷōũŕ ƀŕōŵśēŕ."],"haHgQj": ["Ćōƥĩēď ŕēĺàţĩvē ƥàţĥ"],"he3ygx": ["Ćōƥŷ"],"hjO0Mq": ["Àďď ţàƀ"],@@ -1465,7 +1460,6 @@"lond3p": ["Śĥōŵś àƀōvē ţĥē ćōďē ƀōďŷ. Ŕōũńď-ţŕĩƥś àś `ţĩţĺē=\"...\"` ĩń ḿàŕķďōŵń."],"lrhetp": ["+ ", ["overflow"], " ḿōŕē"],"ls1N1w": ["(ḿĩśśĩńĝ)"],- "lsOFZR": [["webFallbackLabel"], ", ōƥēńś ĩń ƀŕōŵśēŕ ŵĩţĥ ƥŕōḿƥţ ƥŕē-ƒĩĺĺēď"],"lyWa43": ["ƤŕōĴēćţ-ĺēvēĺ ďĩśćōńńēćţēď ƥàĝēś"],"lzmtKp": ["Ƒàĩĺēď ţō ĺōàď ƒōĺďēŕ ƥŕōƥēŕţĩēś: ", ["message"]],"lzwo7p": ["Ćōũĺď ńōţ ōƥēń ĜĩţĤũƀ śĩĝń-ĩń. Ƥĺēàśē ţŕŷ àĝàĩń."],@@ -1602,7 +1596,6 @@"pZAs1T": ["Ƒàĩĺēď ţō ĺōàď ōũţĝōĩńĝ ĺĩńķś"],"pajIrl": ["Ćōũĺď ńōţ ţũŕń ōƒƒ ţĥē ţēŕḿĩńàĺ: ", ["0"]],"pbwTg6": [["seconds"], "ś àĝō"],- "pcfY8r": ["ōƥēńś ĩń ƀŕōŵśēŕ"],"pckX1A": [["0", "plural", { "one": ["#", " ũśē"], "other": ["#", " ũśēś"] }]],"pd0UH2": ["Àĺĩĝń ŕĩĝĥţ"],"pgq_xf": [["0"], "/", ["1"], " ", ["2"]],diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.poindex 1c71e02f9..9846244e4 100644--- a/packages/app/src/locales/pseudo/messages.po+++ b/packages/app/src/locales/pseudo/messages.po@@ -357,10 +357,6 @@ msgstr ""msgid "{userName}, {tabCount, plural, one {# concurrent tab} other {# concurrent tabs}}"msgstr ""-#: src/components/handoff/OpenInAgentMenuItem.tsx-msgid "{webFallbackLabel}, opens in browser with prompt pre-filled"-msgstr ""-#: src/components/EditorFooter.tsxmsgid "{words, plural, one {word} other {words}}"msgstr ""@@ -925,6 +921,7 @@ msgid "Checkbox"msgstr ""#: src/components/handoff/EditWithAiPopover.tsx+#: src/components/handoff/OpenInAgentContextSubmenu.tsx#: src/components/handoff/OpenInAgentMenu.tsxmsgid "Checking for installed agents"msgstr ""@@ -1551,10 +1548,6 @@ msgstr ""msgid "Couldn't move to Trash"msgstr ""-#: src/components/handoff/OpenInAgentMenuItem.tsx-msgid "Couldn't open {CLAUDE_WEB_FALLBACK_LABEL} in your browser."-msgstr ""-#: src/components/DocumentErrorBoundary.tsxmsgid "Couldn't open document"msgstr ""@@ -3562,6 +3555,7 @@ msgid "No Incoming"msgstr ""#: src/components/handoff/EditWithAiPopover.tsx+#: src/components/handoff/OpenInAgentContextSubmenu.tsx#: src/components/handoff/OpenInAgentMenu.tsxmsgid "No installed agents found"msgstr ""@@ -3872,19 +3866,6 @@ msgstr ""msgid "Open in {shareBranch}"msgstr ""-#: src/components/handoff/OpenInAgentContextSubmenu.tsx-#: src/components/handoff/OpenInAgentEmptySpaceSubmenu.tsx-#: src/components/handoff/OpenInAgentMenu.tsx-#: src/components/handoff/OpenInAgentMenuItem.tsx-msgid "Open in claude.ai →"-msgstr ""--#: src/components/handoff/OpenInAgentContextSubmenu.tsx-#: src/components/handoff/OpenInAgentEmptySpaceSubmenu.tsx-#: src/components/handoff/OpenInAgentMenu.tsx-msgid "Open in claude.ai, opens in browser with prompt pre-filled"-msgstr ""-#: src/components/ShareBranchSwitchDialog.tsxmsgid "Open in current branch"msgstr ""@@ -4033,10 +4014,6 @@ msgstr ""msgid "Open, navigate, accept, or dismiss CodeMirror completion suggestions."msgstr ""-#: src/components/handoff/OpenInAgentMenuItem.tsx-msgid "Opened {displayName} in your browser."-msgstr ""-#: src/components/ShareReceiveDialog.tsxmsgid "Opening..."msgstr ""@@ -4049,16 +4026,6 @@ msgstr ""msgid "Opens in a new tab"msgstr ""-#: src/components/handoff/OpenInAgentContextSubmenu.tsx-#: src/components/handoff/OpenInAgentEmptySpaceSubmenu.tsx-#: src/components/handoff/OpenInAgentMenu.tsx-msgid "opens in browser"-msgstr ""--#: src/components/handoff/OpenInAgentMenuItem.tsx-msgid "opens in browser with prompt pre-filled"-msgstr ""-#: src/components/EmptyEditorState.tsxmsgid "or start from scratch <0/>"msgstr ""diff --git a/packages/app/tests/stress/handoff.e2e.ts b/packages/app/tests/stress/handoff.e2e.tsindex dc799e127..c6c39671f 100644--- a/packages/app/tests/stress/handoff.e2e.ts+++ b/packages/app/tests/stress/handoff.e2e.ts@@ -83,8 +83,6 @@ test.describe('handoff — 8-cell matrix', () => {await expect(page.getByTestId('open-in-agent-item-cursor')).toBeVisible();await expect(page.getByTestId('open-in-agent-item-claude-cowork')).toHaveCount(0);-- await expect(page.getByTestId('open-in-agent-claude-web-fallback')).toHaveCount(0);});test('cell 2: Electron Cursor two-step spawn → single prompt URL dispatch + success toast', async ({@@ -171,7 +169,6 @@ test.describe('handoff — 8-cell matrix', () => {await expect(page.getByTestId('open-in-agent-item-claude-code')).toBeVisible();await expect(page.getByTestId('open-in-agent-item-claude-cowork')).toHaveCount(0);- await expect(page.getByTestId('open-in-agent-claude-web-fallback')).toHaveCount(0);});test('cell 5: Web Cursor happy path → POST /api/handoff (target=cursor, workspacePath) + cursor:// URL', async ({@@ -216,49 +213,7 @@ test.describe('handoff — 8-cell matrix', () => {expect(captured.anchorClicks.length).toBe(0);});- test('cell 6: Web Claude not installed — top-level "Open in claude.ai →" row dispatches https://claude.ai/new (v1)', async ({- page,- api,- workerServer,- }) => {- const cfg: HandoffMockConfig = {- host: 'web',- install: { claude: false, codex: true, cursor: false },- workerBaseURL: workerServer.baseURL,- workerContentDir: resolvedContentDir(workerServer.contentDir),- };- await installHandoffMocks(page, cfg);- await seedAndNavigate(page, api);-- await openDropdown(page);- await waitForProbeSettled(page, 'web');-- await expect(page.getByTestId('open-in-agent-item-claude-cowork')).toHaveCount(0);- await expect(page.getByTestId('open-in-agent-item-claude-code')).toHaveCount(0);- await expect(page.getByTestId('open-in-agent-item-cursor')).toHaveCount(0);- await expect(page.getByTestId('open-in-agent-item-codex')).toBeVisible();-- const fallback = page.getByTestId('open-in-agent-claude-web-fallback');- await expect(fallback).toBeVisible();- await fallback.click();-- await expect- .poll(async () => (await readCapturedHandoff(page)).anchorClicks.length, {- timeout: 5_000,- })- .toBe(1);- const captured = await readCapturedHandoff(page);- const u = new URL(captured.anchorClicks[0] as string);- expect(u.hostname).toBe('claude.ai');- expect(u.pathname).toBe('/new');- expect(u.searchParams.get('q')).toContain(- 'using Open Knowledge. Open the OK editor in web view.',- );-- await expect(page.getByText('Opened claude.ai in your browser.')).toBeVisible();- });-- test('cell 7: Web empty-state — menu shows only the Claude web fallback row (v1-AC4)', async ({+ test('cell 7: Web empty-state — every per-target row hidden, disabled "No installed agents found" hint shown, no claude.ai fallback', async ({page,api,workerServer,@@ -284,7 +239,8 @@ test.describe('handoff — 8-cell matrix', () => {for (const id of ['claude-cowork', 'claude-code', 'codex', 'cursor']) {await expect(page.getByTestId(`open-in-agent-item-${id}`)).toHaveCount(0);}- await expect(page.getByTestId('open-in-agent-claude-web-fallback')).toBeVisible();+ await expect(page.getByTestId('open-in-agent-claude-web-fallback')).toHaveCount(0);+ await expect(page.getByTestId('open-in-agent-empty')).toBeVisible();expect(consoleErrors.filter((e) => !e.includes('net::') && !e.includes('favicon'))).toEqual([]);diff --git a/packages/core/src/handoff/index.ts b/packages/core/src/handoff/index.tsindex 8aa943ec2..47a7e6e70 100644--- a/packages/core/src/handoff/index.ts+++ b/packages/core/src/handoff/index.ts@@ -27,4 +27,3 @@ export {URN_IPC_REGISTRY,type UrnIpcLookup,} from './urn-ipc-registry.ts';-export { buildClaudeAiWebUrl } from './web-fallback-url.ts';diff --git a/packages/core/src/handoff/types.ts b/packages/core/src/handoff/types.tsindex 28a66ea1f..7e28778c7 100644--- a/packages/core/src/handoff/types.ts+++ b/packages/core/src/handoff/types.ts@@ -53,6 +53,5 @@ export interface TargetData {readonly appBrandName?: string;readonly schemes: ReadonlyArray<string>;readonly installUrl: string;- readonly hasWebFallback?: boolean;readonly tagline?: string;}diff --git a/packages/core/src/handoff/web-fallback-url.test.ts b/packages/core/src/handoff/web-fallback-url.test.tsdeleted file mode 100644index 47ff7c5bf..000000000--- a/packages/core/src/handoff/web-fallback-url.test.ts+++ /dev/null@@ -1,12 +0,0 @@-import { expect, test } from 'bun:test';-import { buildClaudeAiWebUrl } from './web-fallback-url.ts';--test('buildClaudeAiWebUrl emits https://claude.ai/new?q=<encoded>', () => {- expect(buildClaudeAiWebUrl('hello')).toBe('https://claude.ai/new?q=hello');-});--test('buildClaudeAiWebUrl single-encodes edge-case chars: %, em-dash, space, unicode', () => {- expect(buildClaudeAiWebUrl('My %Project — notes café')).toBe(- 'https://claude.ai/new?q=My%20%25Project%20%E2%80%94%20notes%20caf%C3%A9',- );-});diff --git a/packages/core/src/handoff/web-fallback-url.ts b/packages/core/src/handoff/web-fallback-url.tsdeleted file mode 100644index 6ddfaecad..000000000--- a/packages/core/src/handoff/web-fallback-url.ts+++ /dev/null@@ -1,4 +0,0 @@-export function buildClaudeAiWebUrl(prompt: string): string {- const q = encodeURIComponent(prompt);- return `https://claude.ai/new?q=${q}`;-}diff --git a/packages/core/src/index.ts b/packages/core/src/index.tsindex 631231951..16da05287 100644--- a/packages/core/src/index.ts+++ b/packages/core/src/index.ts@@ -344,7 +344,6 @@ export {} from './git/worktree-list-parser.ts';export {assertNeverUrnIpcLookup,- buildClaudeAiWebUrl,buildClaudeLaunchCommand,buildClaudeUrl,buildCodexUrl,