@devries-cameron20 / t3code-1 / commits / d45d1a1ede
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(desktop): Option-click on a chat link opens the system browser (#18238)

Ali Younes committed Oct 11, 2026 at 21:29 UTC d45d1a1ede45cc4daa88843c2e4bffba938df367
1 file changed +17 -1
apps/web/src/components/ChatMarkdown.tsx
+17 -1
@@ -173,6 +173,7 @@ import {
173 type MarkdownFileLinkMeta,
174 } from "../markdown-links";
175 import { isMarkdownFileLinkLabel } from "@t3tools/shared/markdownLinks";
176 +import { isElectron } from "../env";
177 import { readLocalApi } from "../localApi";
178 import { useAssetUrlRefresh, useAssetUrlState } from "../assets/assetUrls";
179 import { cn } from "../lib/utils";
@@ -3035,8 +3036,8 @@ const CHAT_MARKDOWN_COMPONENTS = {
3036 // keeps the `_blank` the shell already handles; the in-app browser needs
3037 // the click intercepted here. A modifier click is the way out of the
3038 // in-app default, so it is left to the shell too.
3039 + if (event.defaultPrevented) return;
3040 if (
3039 - event.defaultPrevented ||
3041 resolveLinkTarget({
3042 url: href,
3043 event,
@@ -3044,6 +3045,21 @@ const CHAT_MARKDOWN_COMPONENTS = {
3045 canOpenInApp: canOpenInPreview,
3046 }) !== "app"
3047 ) {
3048 + // Chromium turns an Option/Alt-click into a download that never reaches the
3049 + // shell. On desktop, open the link here while the key is still down, so link
3050 + // routers such as Finicky can still read it.
3051 + if (isElectron && event.altKey) {
3052 + event.preventDefault();
3053 + event.stopPropagation();
3054 + void readLocalApi()
3055 + ?.shell.openExternal(href)
3056 + .catch((cause) =>
3057 + reportMarkdownActionFailure(
3058 + { operation: "open-link-external", target: href },
3059 + cause,
3060 + ),
3061 + );
3062 + }
3063 return;
3064 }
3065 event.preventDefault();