From bed8af7aa625543cc326dc7c0fe62e40b868d951 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Tue, 9 Jun 2026 13:28:05 +0700 Subject: [PATCH] Open file preview markdown links in external browser FilePreviewMarkdownLink was using Linking.openURL directly, which on web/Electron performs a plain navigation that opens inside the app window. Use openExternalUrl instead so desktop builds route through the preload bridge to shell.openExternal. --- packages/app/src/components/file-pane.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app/src/components/file-pane.tsx b/packages/app/src/components/file-pane.tsx index 3617fd179..8e4bbc727 100644 --- a/packages/app/src/components/file-pane.tsx +++ b/packages/app/src/components/file-pane.tsx @@ -9,7 +9,6 @@ import Markdown, { import { ActivityIndicator, Image as RNImage, - Linking, ScrollView as RNScrollView, Text, type TextProps, @@ -25,6 +24,7 @@ import { useIsCompactFormFactor } from "@/constants/layout"; import { useSessionStore, type ExplorerFile } from "@/stores/session-store"; import { useWebScrollViewScrollbar } from "@/components/use-web-scrollbar"; import { useWebScrollbarStyle } from "@/hooks/use-web-scrollbar-style"; +import { openExternalUrl } from "@/utils/open-external-url"; import { highlightCode, type HighlightToken } from "@getpaseo/highlight"; import { syntaxTokenStyleFor } from "@/styles/syntax-token-styles"; import { inlineUnistylesStyle } from "@/styles/unistyles-inline-style"; @@ -208,7 +208,7 @@ function FilePreviewMarkdownLink({ const handlePress = useCallback(() => { if (!href) return; if (onLinkPress?.(href) === false) return; - void Linking.openURL(href); + void openExternalUrl(href); }, [href, onLinkPress]); return (